From e7050906bb87af291625a6bfbaac9f728fec27dd Mon Sep 17 00:00:00 2001 From: phixxy Date: Sat, 3 Feb 2024 04:47:05 -0800 Subject: [PATCH] added error handling of missing commands --- sparkytron3000.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sparkytron3000.py b/sparkytron3000.py index fdfd7c1..6dbfb27 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -92,7 +92,9 @@ async def on_message(ctx): try: await bot.process_commands(ctx) except commands.CommandNotFound: - pass + bot.logger.info("Command not found.") + except discord.ext.commands.errors.CommandNotFound: + bot.logger.info("Command not found.") except Exception as e: bot.logger.warning(f"Error processing commands: {e}")