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 toolkit16mo 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
DigitalOP16mo ago
14.11.0 & 20.2
treble/luna
treble/luna16mo ago
use the PermissionsBitField enum to check permissions i dont see ManageChannels in thate list of perms either
Digital
DigitalOP16mo ago
that changes absolutely nothing lol its cut at top
Digital
DigitalOP16mo ago
treble/luna
treble/luna16mo ago
it does fix the way you check your permissions
Digital
DigitalOP16mo ago
no it doesnt, else there would be type error PermissionResolvable is keyof PermissionFlagsBits which means its good
space
space16mo ago
It seems like you are specifying overwrites there, which your bot may lack permission to apply.
treble/luna
treble/luna16mo ago
it does, permissions.has takes a BigInt, not a string
Digital
DigitalOP16mo ago
facepalm not true
Digital
DigitalOP16mo ago
Digital
DigitalOP16mo ago
why am i wasting time explaining to you how types work
Digital
DigitalOP16mo ago
which permissions would it need to apply those?
Digital
DigitalOP16mo ago
those listed or
space
space16mo ago
Applying manage roles requires administrator (or already having it in a channel overwrites, which is not possible when creating)
Digital
DigitalOP16mo ago
oh only manage roles?
space
space16mo ago
Yeah
Digital
DigitalOP16mo ago
ah thanks lol
space
space16mo ago
For the others it's sufficient to have them in the guild I believe.
Digital
DigitalOP16mo ago
lemme check yup ty
Want results from more Discord servers?
Add your server