As title suggest, I have a bot that basically accepts 3 ints via command and stores them in a database by username and user id. i'm now trying to make a command that lets the user recall the information they submitted.
however, when I run the code, it is obtaining the bots userID instead of the userID of the person running the command. here is my code:
async def picked(ctx):
@bot.event
async def on_message(message):
logger.info(f"User: '{message.author.id}' ran picked command")
currentpick1 = cursor.execute("SELECT currentpick1 FROM nascarpool WHERE id='{message.author.id}'")
currentlpick2 = cursor.execute("SELECT currentlpick2 FROM nascarpool WHERE id='{message.author.id}'")
currentlpick3 = cursor.execute("SELECT currentlpick3 FROM nascarpool WHERE id='{message.author.id}'")
cursor.execute(currentpick1, currentlpick2, currentlpick3)
await ctx.send(f"You have registered the following picks: '{currentpick1}', '{currentlpick2}', and '{currentlpick3}'")
cursor.close
mydb.close
I've tried lots of different syntax. I'm new to python so I've just been reading and researching, and I really cant say specifically what I've tried over the last 12 hours trying to fix this.