Checking permission to create channels/roles
I have a command which can create a channel and/or role so I have code to ensure the bot has the correct permission to do so as shown below:
After I check this I then proceed to create the channel as shown in the screenshot.
For the majority of servers this seems to work, but for some reason I still get some errors in my logs for
Missing Permission
(also shown in a screenshot) when trying to create either the channel or role.![](https://cdn.answeroverflow.com/1123697501929754664/image.png)
![](https://cdn.answeroverflow.com/1123697502227538041/image.png)
6 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Am I checking the permission wrong or missing something?
u can always try to create the channel and catch it if its fails
Yea I just would like to prevent that call if possible
I don't assign it to a parent
could you reword this?
I do
![](https://cdn.answeroverflow.com/1123700625406951465/image.png)
I see what you are saying
I need all those I have set in allow for the bot
👍 Thanks!
you guys should let normal members use reactions in forums 😂
@qjuh are you certain this is the case? I just tested where my Bot only had 4 permissions:
View Channels
, Manage Roles
, Manage Channels
and Send Messages & Create Posts
while the @everyone
role had all permission turned off, but the bot can still make a channel with the overrides I have listed above
Also, I can confirm this also happens for the when creating a role
so I know the only issue, if it is one, can't be the overrides