Answer the question
In order to leave comments, you need to log in
How to get data from sqlite table?
@bot.command()
async def balls(ctx, userID=None):
if userID == None:
balls = cursor.execute(f"""
SELECT balls
FROM balls
WHERE id = {ctx.message.author.id};
""")
await ctx.send(f"У тебя {balls}Б")
else:
balls = cursor.execute(f"""
SELECT balls
FROM balls
WHERE id = {userID};
""")
await ctx.send(f"У {userID} {balls}Б")
У тебя <sqlite3.Cursor object at 0x7f644b7af6c0>Б
У 930093253917802546 <sqlite3.Cursor object at 0x7f644b7af6c0>Б
Answer the question
In order to leave comments, you need to log in
1. For f-sides for requests in a decent society they beat in the face
2. fetchone / fetchall for whom did they come up with?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question