Added a bit more information on errors
This commit is contained in:
parent
0998e85950
commit
6004664bf1
1 changed files with 2 additions and 1 deletions
3
bot.py
3
bot.py
|
@ -89,8 +89,9 @@ async def on_command_error(error, ctx):
|
||||||
.format(round(m), round(s))
|
.format(round(m), round(s))
|
||||||
await bot.send_message(ctx.message.channel, fmt)
|
await bot.send_message(ctx.message.channel, fmt)
|
||||||
elif not isinstance(error, commands.CommandNotFound):
|
elif not isinstance(error, commands.CommandNotFound):
|
||||||
|
now = datetime.datetime.now()
|
||||||
with open("/home/phxntx5/public_html/Bonfire/error_log", 'a') as f:
|
with open("/home/phxntx5/public_html/Bonfire/error_log", 'a') as f:
|
||||||
print('In {0.command.qualified_name}:'.format(ctx), file=f)
|
print('In server '{0.message.server}' command '{0.command.qualified_name}' on {1} :'.format(ctx,str(now)), file=f)
|
||||||
traceback.print_tb(error.original.__traceback__, file=f)
|
traceback.print_tb(error.original.__traceback__, file=f)
|
||||||
print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
|
print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue