Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

reaction role discord.py

roleVer = 'BOT' #role to add
user = ctx.message.author #user
role = roleVer # change the name from roleVer to role

await ctx.send("""Attempting to Verify {}""".format(user))
try:
    await user.add_roles(discord.utils.get(user.guild.roles, name=role)) #add the role
except Exception as e:
    await ctx.send('There was an error running this command ' + str(e)) #if error
else:
    await ctx.send("""Verified: {}""".format(user)) # no errors, say verified
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reaction #role
ADD COMMENT
Topic
Name
6+1 =