M
M
menma_uzumakie2022-04-10 20:47:04
Python
menma_uzumakie, 2022-04-10 20:47:04

How to mark users with a specific role?

There is this code

bot.command()
async def play(ctx, member: discord.Member = None):
    if member == None:
        return
    
    else:
        await ctx.channel.send(f"{ctx.author.mention} зовет играть:{member.mention}")

Instead of {member.mention}, you need to mark all users of a certain role (general)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2022-04-10
@Vindicar

1. Get the guild object
2. Get the role object from it 3. Access the mention
property of the role

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question