Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Bot missing permissions #26

Open
vigenere23 opened this issue Jan 3, 2023 · 1 comment
Open

Bug: Bot missing permissions #26

vigenere23 opened this issue Jan 3, 2023 · 1 comment
Labels
bug Something isn't working to investiguate To verify, needs more info, not ready
Milestone

Comments

@vigenere23
Copy link
Owner

vigenere23 commented Jan 3, 2023

Sometimes, a bot with Administrator privileges still does not have enough permissions to update or delete items (roles, categories, channels, etc.). This seems to be either a bug on Discord's end or some missing detail somewhere in the permission's logic.

Potential problems and solutions

Was trying to update/delete the role Disma

The bot cannot delete it's own role, even if it has the MANAGE_ROLE permission (good thing I guess?), which means this is not a bug.

@vigenere23 vigenere23 added the bug Something isn't working label Jan 10, 2023
@vigenere23 vigenere23 added the to investiguate To verify, needs more info, not ready label Jan 26, 2023
@vigenere23 vigenere23 added this to the MVP milestone Aug 5, 2023
vigenere23 added a commit that referenced this issue Sep 9, 2023
Relates to #26 (probably fixes it)
@vigenere23
Copy link
Owner Author

It seems that the order of roles is important to determine access to roles and channels management. If two roles have the MANAGE_ROLES permission, the second one will not be able to edit the first one.

Also, if a role has the ADMINISTRATOR permission and the bot only has MANAGE_ROLES and MANAGE_CHANNELS, the bot won't be able to manage that role.

Therefore, the bot must either have higher permissions than all the roles, have a higher order is same permissions, or not include the more priviledged roles in the configuration (with extra_items: KEEP to prevent deletion attempts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to investiguate To verify, needs more info, not ready
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant