Skip to content
This repository was archived by the owner on Feb 13, 2022. It is now read-only.

Commit 2dea289

Browse files
committed
Silently fail if an invoked command doesn't exist
1 parent 442ec9c commit 2dea289

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bot/exts/utils/error_handler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ async def on_command_error(self, ctx: Context, e: errors.CommandError) -> None:
5151
await self.handle_check_failure(ctx, e)
5252
elif isinstance(e, errors.CommandOnCooldown):
5353
await ctx.send(e)
54+
elif isinstance(e, errors.CommandNotFound):
55+
# Silently fail if command doesn't exist
56+
return
5457
elif not isinstance(e, errors.DisabledCommand):
5558
# MaxConcurrencyReached, ExtensionError
5659
await self.handle_unexpected_error(ctx, e)

0 commit comments

Comments
 (0)