diff options
| -rw-r--r-- | bot/cogs/error_handler.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py index bad6e51a3..6a622d2ce 100644 --- a/bot/cogs/error_handler.py +++ b/bot/cogs/error_handler.py @@ -104,7 +104,12 @@ class ErrorHandler(Cog): """ command = ctx.invoked_with.lower() silence_command = self.bot.get_command("silence") - if not await silence_command.can_run(ctx): + ctx.invoked_from_error_handler = True + try: + if not await silence_command.can_run(ctx): + log.debug("Cancelling attempt to invoke silence/unsilence due to failed checks.") + return False + except errors.CommandError: log.debug("Cancelling attempt to invoke silence/unsilence due to failed checks.") return False if command.startswith("shh"): |