aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2022-12-15 18:19:31 +0000
committerGravatar GitHub <[email protected]>2022-12-15 18:19:31 +0000
commitc8e9aa6c2b3c4e0b5bcc154075f4af007acee869 (patch)
treedadc16ae29f63db2e966256258e76c408017f514
parentMerge pull request #1169 from python-discord/kata (diff)
parentMerge branch 'main' into let-me-ellipsize (diff)
Merge pull request #1167 from camcaswell/let-me-ellipsize
Ignore ellipses when suggesting commands
-rw-r--r--bot/exts/core/error_handler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/core/error_handler.py b/bot/exts/core/error_handler.py
index f62b3d4e..04ab55d7 100644
--- a/bot/exts/core/error_handler.py
+++ b/bot/exts/core/error_handler.py
@@ -66,7 +66,9 @@ class CommandErrorHandler(commands.Cog):
)
if isinstance(error, commands.CommandNotFound):
- await self.send_command_suggestion(ctx, ctx.invoked_with)
+ # Ignore messages that start with "..", as they were likely not meant to be commands
+ if not ctx.invoked_with.startswith("."):
+ await self.send_command_suggestion(ctx, ctx.invoked_with)
return
if isinstance(error, (InChannelCheckFailure, InMonthCheckFailure)):