gregzaal / Auto-Voice-Channels

A Discord bot that automatically creates voice channels as they are needed.
MIT License
189 stars 101 forks source link

Unable to create voice channel - Other Manage Permissions #96

Open DigitalGameMachine opened 2 years ago

DigitalGameMachine commented 2 years ago

If any role has the Manage Message permission on a category it breaks the bots ability to create a new channel.

Self hosted or not has no difference.

I have tested this on a newly created Discord server.

Category: Test
Role Auto-Voice Default (Empty)
Role Manage-Messages Default (Empty)
Role Everyone Default (Empty)

This works.

Now if you change 1 permission setting it breaks the bot.

Category: Test
Role Auto-Voice Default (Empty)
Role Manage-Messages
Manage Messages Allowed
Role Everyone Default (Empty)
gregzaal commented 2 years ago

AVC generally doesn't check for permissions before doing something, it tries to do it, and Discord's API responds with "you're not allowed to do that".

In this case, Discord is wrong, as there seems to be a bug with permission inheritance. The bot should be allowed to do this, but for some reason Discord says it can't, and there's nothing at all that we can do to get around that.

The very best thing I could do is provide some kind of nicer error message to users for this specific edge case, but I'd rather Discord just solve the issue so I don't have to waste my time with that - especially since the workaround is just to give the bot admin permissions.