1
0
Fork 0
mirror of synced 2024-06-15 17:14:34 +12:00

Corrected logic of stopping errors from logging

This commit is contained in:
Phxntxm 2016-09-05 21:30:05 -05:00
parent e3e60b5997
commit f67f78a62a

2
bot.py
View file

@ -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) or isinstance(error, discord.Forbidden):
elif not isinstance(error, commands.CommandNotFound) and 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)),