Cannot create permissionOverwrites for users with server booster
Hi, I implement some manual "mute" action for my bot (so that the user can see the channels, can't message but can interact with the bot), and for that I used permissionOverwrites like this:
But this doesn't work for users with "server booster" role because as I understand, this role is handled by Discord. So this code would give
DiscordAPIError[50013]: Missing Permissions
. But still, I just want to "mute" them. I searched on Google but I can only find the problem, not the solution. Is there actually any possible solution? Thank you so much!9 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!- 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.Oh and for context, I have checked all of the conditions (bot should be of higher role than target user, bot has permission to kick, bot cannot kick guild owner and etc)
It works well for normal members but just not those with "server booster" role
Yeah because you can't remove that role
So... dont
Is it not possible to still keep that role but mute them? D:
(Line 175 is the code I posted in the question!)
Yeah, when you're calling set, include the booster role too if they had it
So it doesn't try to remove it
Wait actually now I'm not sure
But it's indeed line 175 of my code tho D:
The bot currently has ManageChannels and ManageRoles. But also before that line of code, I have checked the bot's permission in that channel (line 174: , shouldn't that prevent the bot to access channels that it can't view already?
But what's strange is that it works for other members who don't have the Server Booster role, and only gives error to this one person (that have the Booster role)...
So I supposed it should already have the other roles that it needs
These were all the conditions I've checked before executing the command... And the person is just a member and not a mod, so I felt like the Booster role was the only thing that I noticed was different...