aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/error_handler.py
diff options
context:
space:
mode:
authorGravatar William Da Silva <[email protected]>2020-12-28 21:29:09 -0500
committerGravatar GitHub <[email protected]>2020-12-28 21:29:09 -0500
commit88c9175453b5ac7653b9ead817c4d262cdd4cacc (patch)
treea7f948470a6d404ed1b5afb8b8b46b86804ad0b6 /bot/exts/evergreen/error_handler.py
parentMerge branch 'master' into omdb-to-tmdb (diff)
parentMerge pull request #483 from WillDaSilva/prideavatar-url (diff)
Merge branch 'master' into omdb-to-tmdb
Diffstat (limited to 'bot/exts/evergreen/error_handler.py')
-rw-r--r--bot/exts/evergreen/error_handler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/evergreen/error_handler.py
index 6e518435..99af1519 100644
--- a/bot/exts/evergreen/error_handler.py
+++ b/bot/exts/evergreen/error_handler.py
@@ -42,8 +42,8 @@ class CommandErrorHandler(commands.Cog):
@commands.Cog.listener()
async def on_command_error(self, ctx: commands.Context, error: commands.CommandError) -> None:
"""Activates when a command opens an error."""
- if hasattr(ctx.command, 'on_error'):
- logging.debug("A command error occured but the command had it's own error handler.")
+ if getattr(error, 'handled', False):
+ logging.debug(f"Command {ctx.command} had its error already handled locally; ignoring.")
return
error = getattr(error, 'original', error)