From 678e2dca0ef182ea51982547e78473d20457b46c Mon Sep 17 00:00:00 2001 From: Numerlor Date: Wed, 2 Oct 2019 14:03:26 +0200 Subject: add logging when an overriden in_channel_check fails --- bot/decorators.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bot/decorators.py') 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}." -- cgit v1.2.3