1
0
Fork 0
mirror of synced 2024-05-18 19:42:28 +12:00

Stopped forbidden messages from logging, as it apperas all issues around them have been resolved

This commit is contained in:
Phxntxm 2016-09-05 21:28:07 -05:00
parent 8bd014a345
commit 58e3913f91

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):
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)),