How to give user role without manage role permission in discord.py


from discord.ext import commands

client = commands.Bot(command_prefix='m.')
token = 'a token goes here'


@client.command()
async def player(ctx):
    role = discord.utils.get(ctx.guild.roles, name = "player")
    if role is not None:
       await ctx.author.add_roles(role)


client.run(token)

You need to have the player role in your server too. The user sends m. player as example and the bot gives him that role.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top