modmailbot icon indicating copy to clipboard operation
modmailbot copied to clipboard

Better error messages when permissions are missing

Open SuperSajuuk opened this issue 4 years ago • 3 comments

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:

  1. Set up a selfhosted instance
  2. Invite the bot to your server but don't provide Manage Messages
  3. Invoke a command that would result in a call to delete the invokers message
  4. 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

SuperSajuuk avatar Jun 13 '20 19:06 SuperSajuuk