The in_channel decorator should have more options:
Rename in_channel to a more meaningful in_whitelist
Rename InChannelCheckFailure to InWhitelistCheckFailure
Pass channels as a keyword argument
Add option to whitelist categories
Add option to add redirect channel which will be used when printing error message (default value of this should be the #commands channel)
In case no redirect channel is provided (explicitly set to None) there shouldn't be any channel mentioned in the error message
If the decorator is called from DM, raise InWhitelistCheckFailure with Commands issued in DM channel should be rejected as error message
This will provide more flexibility for future usage as it will not necessarily give the channel name where the command should be used, or the channel can be specified instead of printing a list of all possibilities.
The
in_channel
decorator should have more options:in_channel
to a more meaningfulin_whitelist
InChannelCheckFailure
toInWhitelistCheckFailure
InWhitelistCheckFailure
withCommands issued in DM channel should be rejected
as error message This will provide more flexibility for future usage as it will not necessarily give the channel name where the command should be used, or the channel can be specified instead of printing a list of all possibilities.