ItsDrike / CommandBot

Discord Bot which can handle most administrative tasks for servers.
Other
0 stars 0 forks source link

Rework `in_channel` decorator #28

Closed ItsDrike closed 4 years ago

ItsDrike commented 4 years ago

Closes #27

As suggested in #27 decorator in_channel was reworked and changed to in_whitelist. The exception InChannelCheckFailure was also renamed to InWhitelistCheckFailure.

Added all suggested features from the corresponding issue.

ItsDrike commented 4 years ago

The error_handler cog should also be updated to catch this new exception class instead of using the old one

https://github.com/ItsDrike/CommandBot/blob/a91edd69c4b00c23e1a89755e3ba171b30a2302f/bot/cogs/error_handler.py#L8

https://github.com/ItsDrike/CommandBot/blob/a91edd69c4b00c23e1a89755e3ba171b30a2302f/bot/cogs/error_handler.py#L133

https://github.com/ItsDrike/CommandBot/blob/a91edd69c4b00c23e1a89755e3ba171b30a2302f/bot/cogs/error_handler.py#L143

These references to old InChannelCheckFailure should also be reworked in the information cog:

https://github.com/ItsDrike/CommandBot/blob/a91edd69c4b00c23e1a89755e3ba171b30a2302f/bot/cogs/information.py#L16

https://github.com/ItsDrike/CommandBot/blob/a91edd69c4b00c23e1a89755e3ba171b30a2302f/bot/cogs/information.py#L192-L195

https://github.com/ItsDrike/CommandBot/blob/a91edd69c4b00c23e1a89755e3ba171b30a2302f/bot/cogs/information.py#L159-L162