lilserf / bot-on-the-clocktower

Bot to assist with playing Blood on the Clocktower via Discord
MIT License
22 stars 4 forks source link

Better error message when not allowed to change nickname #27

Closed magroader closed 3 years ago

magroader commented 3 years ago

If the person whose nickname needs to be changed has a role higher in the role list than the bot - including being the owner of the server - then the error message is messy. We should catch this error message and send an explanation about what can be done to fix it, e.g.:

Attempted to change nickname "Colin" to "(ST) Colin" but was unable. This is likely for one of these reasons:

  • Colin has a role that is higher in the role list than the Bot on the Clocktower role
  • Colin is the owner of the server
  • Bot on the Clocktower needs to be re-invited to the server to grant it nickname-changing permissions

This could be sent to the mover channel rather than being a private message

magroader commented 3 years ago

Because this is going to affect server owners as well, which is really annoying to fix, I think the best bet here is to just silently fail it.