aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Qwerty-133 <[email protected]>2021-09-15 21:17:29 +0530
committerGravatar Qwerty-133 <[email protected]>2021-09-15 21:17:29 +0530
commit157b19b5b99d5ab0ea5f62bb8231765916bf90d8 (patch)
tree1ae249ab1c591683fce372a99f86ec703fd5a3c0
parentMerge pull request #864 from NIRDERIi/hanukkah_cmd_month (diff)
Don't call `on_command_error` when a check errors.sim_matches
-rw-r--r--bot/exts/core/error_handler.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/bot/exts/core/error_handler.py b/bot/exts/core/error_handler.py
index fd2123e7..01f620a3 100644
--- a/bot/exts/core/error_handler.py
+++ b/bot/exts/core/error_handler.py
@@ -160,14 +160,13 @@ class CommandErrorHandler(commands.Cog):
if not similar_command:
return
- log_msg = "Cancelling attempt to suggest a command due to failed checks."
+ base_log_msg = "Cancelling attempt to suggest a command due to failed checks."
try:
if not await similar_command.can_run(ctx):
- log.debug(log_msg)
+ log.debug(base_log_msg)
return
- except commands.errors.CommandError as cmd_error:
- log.debug(log_msg)
- await self.on_command_error(ctx, cmd_error)
+ except commands.errors.CommandError as error:
+ log.debug(f"{base_log_msg} A check raised an error: {type(error).__name__} - {str(error)}")
return
misspelled_content = ctx.message.content