Permissions Issue?

question, i check if bot has ManageChannels in guild, and then create a channel, log shows that it has perm, but then when trying it errors with "Missing Permissions", why https://cdn.crni.xyz/r/ppaAMMmeE.png
20 Replies
d.js toolkit
d.js toolkit•3y 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!
Digital
DigitalOP•3y ago
14.11.0 & 20.2
treble/luna
treble/luna•3y ago
use the PermissionsBitField enum to check permissions i dont see ManageChannels in thate list of perms either
Digital
DigitalOP•3y ago
that changes absolutely nothing lol its cut at top
Digital
DigitalOP•3y ago
treble/luna
treble/luna•3y ago
it does fix the way you check your permissions
Digital
DigitalOP•3y ago
no it doesnt, else there would be type error PermissionResolvable is keyof PermissionFlagsBits which means its good
space
space•3y ago
It seems like you are specifying overwrites there, which your bot may lack permission to apply.
treble/luna
treble/luna•3y ago
it does, permissions.has takes a BigInt, not a string
Digital
DigitalOP•3y ago
facepalm not true
Digital
DigitalOP•3y ago
Digital
DigitalOP•3y ago
why am i wasting time explaining to you how types work
Digital
DigitalOP•3y ago
which permissions would it need to apply those?
Digital
DigitalOP•3y ago
those listed or
space
space•3y ago
Applying manage roles requires administrator (or already having it in a channel overwrites, which is not possible when creating)
Digital
DigitalOP•3y ago
oh only manage roles?
space
space•3y ago
Yeah
Digital
DigitalOP•3y ago
ah thanks lol
space
space•3y ago
For the others it's sufficient to have them in the guild I believe.
Digital
DigitalOP•3y ago
lemme check yup ty

Did you find this page helpful?