Add traceback return on eval
This commit is contained in:
parent
231b28da5f
commit
73f8332fe8
1 changed files with 4 additions and 1 deletions
|
@ -239,7 +239,10 @@ class DevCog(commands.Cog):
|
||||||
@commands.is_owner()
|
@commands.is_owner()
|
||||||
@commands.command(name="eval")
|
@commands.command(name="eval")
|
||||||
async def _eval(self, ctx, *, code: str):
|
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}```")
|
await ctx.send(f"```{output}```")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue