Actual traceback

This commit is contained in:
Zeva Rose 2021-06-27 19:23:53 -06:00
parent 73f8332fe8
commit 43d2eee27a

View file

@ -5,6 +5,7 @@ import re
import ulid
import base64
import subprocess
import traceback
from discord.ext import commands
from jarvis.utils import build_embed, convert_bytesize
from jarvis.utils.field import Field
@ -241,8 +242,8 @@ class DevCog(commands.Cog):
async def _eval(self, ctx, *, code: str):
try:
output = eval(code, locals(), globals())
except Exception as e:
output = e.__traceback__
except Exception:
output = traceback.format_tb()
await ctx.send(f"```{output}```")