Add traceback return on eval

This commit is contained in:
Zeva Rose 2021-06-27 19:22:26 -06:00
parent 231b28da5f
commit 73f8332fe8

View file

@ -239,7 +239,10 @@ class DevCog(commands.Cog):
@commands.is_owner()
@commands.command(name="eval")
async def _eval(self, ctx, *, code: str):
output = eval(code, locals(), globals())
try:
output = eval(code, locals(), globals())
except Exception as e:
output = e.__traceback__
await ctx.send(f"```{output}```")