idoneam / Canary

Canary is a Python3 bot designed for the McGill University Community Discord Server. The bot provides helper functions to users, as well as fun functions, a quote database and custom greeting messages.
GNU General Public License v3.0
11 stars 7 forks source link

New muting/appeal channels system #564

Closed le-potate closed 1 year ago

le-potate commented 1 year ago

New muting system. Users get muted either by using the mute command or by being given the muted role. Once this happens, all other roles are saved and removed, and an appeal channel for that user is created. When unmuted (either using unmute command or removing roles), the previous roles can be given back, and the appeal channel is deleted. I've tried to make it so that this doesn't break completely if the channel is deleted manually, the role is removed while the bot isn't on, etc.

The part that saves roles when a user is muted was mostly written by @davidlougheed

How Has This Been Tested?

Light testing to ensure the main functions work and this doesn't break the bot completely. We should go ahead and merge this ASAP as this is needed quickly, but we should keep in mind that we may need to work on this again in the near future.

Types of changes

Checklist: