T
T
theinlao2020-09-22 23:21:46
Python
theinlao, 2020-09-22 23:21:46

User mention?

How to make the bot mention the user with @ instead of like this
5yjdX15q.jpg?download=1

@client.command(aliases = ['leaderboard', 'lb'])
async def __leaderboard(ctx):
    embed = discord.Embed(title = 'Топ 10 сервера')
    counter = 0
 
    for row in cursor.execute("SELECT name, cash FROM users WHERE server_id = {} ORDER BY cash DESC LIMIT 10".format(ctx.guild.id)):
        counter += 1
        embed.add_field(
            name = f'# {counter} | `{row[0]}`',
            value = f'Баланс: {row[1]}',
            inline = False
        )
 
    await ctx.send(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 question

Ask a Question

731 491 924 answers to any question