Printing traceback for loading, as it doesn't seem to be working
This commit is contained in:
parent
9394f4ebeb
commit
f58e1290c7
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue