Update exception-handler.py

Remove unknown command error
This commit is contained in:
Cal Corum 2023-07-17 23:36:44 -05:00
parent 3ea1b0cf5e
commit d80fedff51

View File

@ -10,7 +10,10 @@ class ExceptionHandler(commands.Cog):
@commands.Cog.listener()
async def on_command_error(self, ctx: commands.Context, error) -> None:
await ctx.send(f'Hmm...do you know what this error means:\n\n{error}')
if error[:7] == 'Command' and 'not found' in error:
pass
else:
await ctx.send(f'Hmm...do you know what this error means:\n\n{error}')
# attaching the handler when the cog is loaded
# and storing the old handler