Issue while creating a category with permission overrides
24 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!
- ✅
Marked as resolved by OPthe bot also needs the permission it's allowing or denying
It has all permissions it’s allowing/denying :yescat:
I have a permission check middleware that runs before this handler that makes sure it has them on its role
I’ll check once again once I’m back home and send a screenshot here :thumbsup:
Use PermissionsBitField to read off the permissions, not BitField. Huge blunder by me
Ahhh. Okay lemmi check that
All good :heartWumpus:

These are all the permissions I am making sure the bot has. Second image has all the permissions I'm assigning/denying


yeah the bot has all the perms as well
Perms it has in the discord server

^
guild does not require 2FA, I do have 2FA. But if that was the issue it wouldn't work with Admin perms.
I should note, the bot is able to create roles. It only breaks when it tries to create a category
I'll drop the full code just in case.
ooooooo
breh
so the bot most definitely needs admin while setup
because bot needs to set Manage Permissions as allowed in the category it creates for itself
I don't want the bot to rely on role based perms in case someone in the server removes it.
The bot creates its category and after that it will only ever do stuff in that category
hmm, if you put it like that :Thonk:
anyway, it does need Manage Roles to give players the player role anyway
so it would break regardless if that perm is removed.
let me quickly test this out and update here
ticket tool also requires manage permissions as a category permission in the ticket category. I wouldn't call that shady business though
depends on the use case of the bot
that didn't fix it :pain:
I removed ManageRoles from both botPermissions and manageRolePermissions.

wait.
WAIT
hm that's a new error actually. It created the category this time
i wish Missing Permissions gave more info about what is missing.
I do. Check
commonPermissions
I also tested with admin perms to see the channel perms the bot gets, it has it.
In fact, for the registration channel, @ everyone has View Channel as well.

alright. give me a min
ye
wait hold on. permissionsFor is wrong. i did it for the role
from above
hmmmmmmmm
think I found it.
nop nevermind
yeah I'm stumped.
that's what I said nevermind for
because
the bot does have it
ohh wait. So. I deny the perm on everyone
but I don't allow it for the bot role
and since channel perms override
ah.
okay
It has it now
BUT.

:HH_cryAqua:
yea. It's the same.

@Qjuh
yes. I added it to
botPermissions
. It gets added in every channel.
wait
lmfao.
i see the issue.
bro :HH_cryCat:
this is just embarrasing atpWould you look at that


glorious
where can I find this information? So I know where to look next time
much appreciated. Thanks all!