diff options
author | 2020-12-04 20:33:03 +0530 | |
---|---|---|
committer | 2020-12-04 20:33:03 +0530 | |
commit | cd24f9b4e70ebe654fa771238fca7e207e8cb0de (patch) | |
tree | 374894098f9bb3e9d1ec2519e8be51f37cbcfc66 /bot/exts | |
parent | Modify error handler check for locally handled errors. (diff) |
Check value of handled attribute on error in global error handler.
Diffstat (limited to 'bot/exts')
-rw-r--r-- | bot/exts/evergreen/error_handler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/evergreen/error_handler.py index b502dd4e..99af1519 100644 --- a/bot/exts/evergreen/error_handler.py +++ b/bot/exts/evergreen/error_handler.py @@ -42,7 +42,7 @@ 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(error, 'handled'): + if getattr(error, 'handled', False): logging.debug(f"Command {ctx.command} had its error already handled locally; ignoring.") return |