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 work2 Replies
- 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 OPAh, 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