diff options
author | 2020-12-11 01:55:40 -0800 | |
---|---|---|
committer | 2020-12-11 01:55:40 -0800 | |
commit | e6e8afdca3a11b33c4c0be0ed12039dff12a656f (patch) | |
tree | 0489461e419639d679ca6e47de59afd36f292378 /bot/exts/evergreen/error_handler.py | |
parent | Make sure PR artifacts are always uploaded (diff) | |
parent | Check if error.original is an instance of OSError. (diff) |
Merge pull request #540 from RohanJnr/error_handler_changes
Modify error handler check for locally handled errors.
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) |