diff options
| author | 2019-10-02 14:03:26 +0200 | |
|---|---|---|
| committer | 2019-10-02 14:03:26 +0200 | |
| commit | 678e2dca0ef182ea51982547e78473d20457b46c (patch) | |
| tree | 6451d647994d65df3632acb04490c4fb3e21b656 /bot/decorators.py | |
| parent | fix in_channel_check docstring style (diff) | |
add logging when an overriden in_channel_check fails
Diffstat (limited to 'bot/decorators.py')
| -rw-r--r-- | bot/decorators.py | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/bot/decorators.py b/bot/decorators.py index 32c017d7..471ea3be 100644 --- a/bot/decorators.py +++ b/bot/decorators.py @@ -95,6 +95,11 @@ def in_channel_check(*channels: int, bypass_roles: typing.Container[int] = None)                          f"and the command was used in an overridden whitelisted channel."                      )                      return True + +                log.debug( +                    f"{ctx.author} tried to call the '{ctx.command.name}' command. " +                    f"The overridden in_channel check failed." +                )                  channels_str = ', '.join(f"<#{c_id}>" for c_id in override)                  raise InChannelCheckFailure(                      f"Sorry, but you may only use this command within {channels_str}." | 
