From 31e712be86e59e957dbcdc57d014f74cfdaa4ecb Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Mon, 7 Jan 2019 11:51:27 +0300 Subject: [PATCH] Ignore unknown command error logging --- Robocop.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Robocop.py b/Robocop.py index 667f014..03b17f2 100755 --- a/Robocop.py +++ b/Robocop.py @@ -130,8 +130,9 @@ async def on_command_error(ctx, error): log.error(err_msg) - err_msg = bot.escape_message(err_msg) - await bot.botlog_channel.send(err_msg) + if not isinstance(error, commands.CommandNotFound): + err_msg = bot.escape_message(err_msg) + await bot.botlog_channel.send(err_msg) if isinstance(error, commands.NoPrivateMessage): return await ctx.send("This command doesn't work on DMs.")