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