aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-09-14 16:23:56 -0700
committerGravatar MarkKoz <[email protected]>2019-09-14 16:23:56 -0700
commitdf3f385acfc48e7a97147e32bc03f6f5f69610e3 (patch)
treeac0e9923efc44c44b0abeb6e766422d52cb76e98
parentImprove logging of command errors (diff)
Fix cog error handler check when command is None
-rw-r--r--bot/cogs/error_handler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py
index 59b6c0573..994950c84 100644
--- a/bot/cogs/error_handler.py
+++ b/bot/cogs/error_handler.py
@@ -43,7 +43,7 @@ class ErrorHandler:
else:
help_command = (self.bot.get_command("help"),)
- if hasattr(command, "on_error") or hasattr(command.instance, f"_{command.cog_name}__error"):
+ if hasattr(command, "on_error") or hasattr(ctx.cog, f"_{command.cog_name}__error"):
log.debug(f"Command {command} has a local error handler; ignoring.")
return