Big Problem
Hello, I have a problem, when I try to assign a role to a user, my bot receives a message that it does not have permissions, even though it has all the intentions, and on the server itself it also has the highest level of permissions, but it still has a problem, does anyone know what's going on? It was working normally before, but now something isn't working.
5 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 OP- Bots cannot moderate (kick/ban/nickname/...) a target with a higher or equally high highest role or the guild owner.
- Bots cannot modify (edit/add/remove) roles that are higher or equally high compared to the bot's highest role.
- The
Administrator
permission does not skip these checks.I am perfectly aware of this, the role is to be assigned to a person who has just joined the server.
console.log(<guild>.members.me.permissions.serialize())
console.log(<guild>.members.me.roles.highest.position)
console.log(<role>.position, <role>.manageable)
Make sure the bot's role is higher than the role it tries to give