1
0
Fork 0
mirror of synced 2024-06-01 18:29:38 +12:00

Printing full traceback for error testing

This commit is contained in:
phxntxm 2016-07-15 18:06:28 -05:00
parent c6926a4830
commit 3b1551aab5

2
bot.py
View file

@ -1,6 +1,7 @@
#!/usr/local/bin/python3.5
import discord
import traceback
from discord.ext import commands
from cogs.utils import config
@ -64,6 +65,7 @@ async def on_command_error(error, ctx):
else:
fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```'
await bot.send_message(ctx.message.channel, fmt.format(type(error).__name__, error))
await bot.send_message(ctx.message.channel, "```{}```".format(traceback.format_exc()))
if __name__ == '__main__':
for e in extensions: