Answer the question
In order to leave comments, you need to log in
How to issue a role in discord.py?
I'm making a bot for my Discord server. I want to issue a role to a participant on a bot command.
It should look like this:
User : !command_name @User
Bot : Member @User verified successfully.
Explain how to do it?
PS I am new to discord.py
Answer the question
In order to leave comments, you need to log in
Member.add_roles
@commands.command()
async def command_name(ctx, user: discord.Member):
if role := ctx.guild.get_role(779490160819217032)
await user.add_roles(role)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question