i am trying to get it to print the line of code that the, print("command used, line") print(frameinfo.filename, frameinfo.lineno)
, is on but it prints the frameinfo = getframeinfo(currentframe())
instead. does anyone know how to fix this?
import discord
frameinfo = getframeinfo(currentframe())
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('~myid'):
await message.channel.send(myid)
print("command used, line")
print(frameinfo.filename, frameinfo.lineno)