Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

adding roles discord py

# If you need this in a bot command
@bot.command()
async def online(ctx):
    role = discord.utils.get(bot.get_guild(ctx.guild.id).roles, id ="Role ID")
    await member.add_roles(role)
Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #adding #roles #discord #py
ADD COMMENT
Topic
Name
8+9 =