From 58e3913f911d73673fb92be19cb84749abe44f85 Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Mon, 5 Sep 2016 21:28:07 -0500 Subject: [PATCH] Stopped forbidden messages from logging, as it apperas all issues around them have been resolved --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 59d9d3f..a7a0de1 100644 --- a/bot.py +++ b/bot.py @@ -111,7 +111,7 @@ async def on_command_error(error, ctx): await bot.send_message(ctx.message.channel, fmt) elif isinstance(error, commands.MissingRequiredArgument): await bot.send_message(ctx.message.channel, error) - elif not isinstance(error, commands.CommandNotFound): + elif not isinstance(error, commands.CommandNotFound) or isinstance(error, discord.Forbidden): now = datetime.datetime.now() with open("error_log", 'a') as f: print("In server '{0.message.server}' at {1}\nFull command: `{0.message.content}`".format(ctx, str(now)),