Bot's role hierarchy position problem

So apparently in order to allow a bot to add a role to a user, the bot's role position should be above the role you are trying to assign to the user or else you will get a Missing Permissions error. Is there a way to programmatically place the bot's role in the highest position in the server's role hierarchy? I tried using the setPosition method but nothing seems to work
2 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
mustafazeydani
mustafazeydaniOP4mo ago
Ah, I see what you mean now. I was hoping the bot could move its role higher up the hierarchy on its own. I’ll just have to manually adjust the role position. thanks for explaining
Want results from more Discord servers?
Add your server