1
0
Fork 0
mirror of synced 2024-06-23 08:40:41 +12:00

Printing traceback for loading, as it doesn't seem to be working

This commit is contained in:
Phxntxm 2016-08-13 20:58:10 -05:00
parent 9394f4ebeb
commit f58e1290c7

View file

@ -8,6 +8,7 @@ import sys
import discord
import inspect
import aiohttp
import traceback
getter = re.compile(r'`(?!`)(.*?)`')
multi = re.compile(r'```(.*?)```', re.DOTALL)
@ -121,8 +122,9 @@ class Owner:
except Exception as error:
fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```'
await self.bot.say(fmt.format(type(error).__name__, error))
await self.bot.say(error.__traceback__)
with open("error_log", 'a') as f:
traceback.print_tb(error.__traceback__, file=f)
@commands.command()
@commands.check(checks.isOwner)
async def unload(self, *, module: str):