Adding ``` for traceback formating

This commit is contained in:
Zoe Roux
2021-02-22 18:24:30 +01:00
parent 009abbe390
commit 8a2e6f05c0

View File

@@ -32,7 +32,7 @@ class Nemo(discord.Client):
try: try:
await f(args=cmd[1::], message=message, guild=message.guild, channel=message.channel, member=message.author) await f(args=cmd[1::], message=message, guild=message.guild, channel=message.channel, member=message.author)
except Exception: except Exception:
await message.channel.send(f"Fatal error: {traceback.format_exc()}") await message.channel.send(f"Fatal error: ```{traceback.format_exc()}```")
raise raise
def command(self, cmd): def command(self, cmd):
@@ -59,7 +59,7 @@ class Nemo(discord.Client):
guild=reaction.message.guild, guild=reaction.message.guild,
channel=reaction.message.channel) channel=reaction.message.channel)
except Exception: except Exception:
await reaction.message.channel.send(f"Fatal error: {traceback.format_exc()}") await reaction.message.channel.send(f"Fatal error: ```{traceback.format_exc()}```")
raise raise
async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent): async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent):