modmailbot
modmailbot copied to clipboard
Better error messages when permissions are missing
Hi there, first time for me posting in this github repo, but I found a bug with modmail threads specifically about denied permissions when the requisite function is invoked.
The below are steps to reproduce this with Manage Messages being denied, but could be applied to anything that would cause Error: Missing Permissions to be logged in your error logs.
The general premise of this ticket should be to show more verbose/clearer error messages when attempting to do an action that won't run.
Steps to Reproduce:
- Set up a selfhosted instance
- Invite the bot to your server but don't provide Manage Messages
- Invoke a command that would result in a call to delete the invokers message
- Observe
Expected Result: The bot stays up despite the missing permissions Actual Result: The bot crashes out because it doesn't have a catch for the missing perm.
Hope this can be resolved! Obviously the permissions should be there, but for those like me who completely miss that a perm is needed, it would be good to have more clear error logs. :D