📝 Better Logging

This commit is contained in:
NikolajDanger
2021-04-02 20:55:47 +02:00
parent 4281d43f7a
commit 41bc121a91
2 changed files with 23 additions and 11 deletions

View File

@@ -30,7 +30,10 @@ class ErrorHandler():
exceptionString = "".join(exception)
self.bot.log([f"exception in /{ctx.name}", f"{exceptionString}"],str(ctx.channel_id), 40)
await ctx.send("Something went wrong (error code 000)")
if isinstance(error, discord.errors.NotFound):
self.bot.log("Context is non-existant", level = 40)
else:
await ctx.send("Something went wrong (error code 000)")
async def on_error(self, method):
exception = traceback.format_exc()