diff options
author | 2021-01-22 11:59:37 +0530 | |
---|---|---|
committer | 2021-01-22 11:59:37 +0530 | |
commit | dfdebdbab564b8493c6a8c251a32227227c834e6 (patch) | |
tree | 60ad18b8eaedf9ff7ba35af827bbeebb2a0058f4 /bot/exts/evergreen/error_handler.py | |
parent | Fix bug in auto_poster_loop() regarding embed description. (diff) | |
parent | Merge pull request #564 from rijusougata13/master (diff) |
Merge branch 'master' of https://github.com/python-discord/sir-lancebot into reddit_migration
Diffstat (limited to 'bot/exts/evergreen/error_handler.py')
-rw-r--r-- | bot/exts/evergreen/error_handler.py | 4 |
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) |