Skip to content
Advertisement

role overwrites when creating a role discord.js

When my bot joins a new guild it creates a role & sets overwrites.

JavaScript

I have 2 questions:
Is it possible to move this role to the top of the list or at least somewhere close?
How would I go on displaying this role separately from online members?

Advertisement

Answer

To display a role separately from online members, you can use the Role#setHoist method.

JavaScript

You cannot move a role above your bot’s highest role in the roles hierarchy.

I recommend you to get your bot’s highest role, get its position, and set your role’s position accordingly.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement