TGPy
TGPy copied to clipboard
First line in traceback isn't shown in some cases
First line in traceback isn't shown when function is not awaited in message, thus awaited by meval instead. In this case, this line is skipped, because it's not message's code
Example: Original traceback:
async def delete():
ctx_orig = await ctx.msg.get_reply_message()
await ctx_orig.delete()
await ctx.msg.delete()
delete()
TGPy> Error occurred
Traceback (most recent call last):
File ".../app/run_code/meval.py", line 177, in <listcomp>
ret = [await el if inspect.isawaitable(el) else el for el in ret]
File "tgpy://message/...", line 3, in delete
await ctx_orig.delete()
AttributeError: 'NoneType' object has no attribute 'delete'
Stripped traceback:
Traceback (most recent call last):
File "tgpy://message/...", line 3, in delete
await ctx_orig.delete()
AttributeError: 'NoneType' object has no attribute 'delete'