Answer the question
In order to leave comments, you need to log in
Database not working for Discord bot Python?
I have a bot, it should give out the top by reputation, but it writes only the first one, then the for stops.
No errors are written.
@client.command()
async def top_rep(ctx):
embed = discord.Embed(title = 'Топ сервера')
numb = 0
for row in cursor.execute("SELECT name, rep From users WHERE server_id = {} ORDER BY rep DESC LIMIT 5".format(ctx.guild.id)):
numb += 1
embed.add_field(name = f'# {numb} | {row[0]} ',value = f'Репутация: {row[1]}', inline = False)
await ctx.reply(embed=embed)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question