im trying to add a role when the user react to this emojis but i cant get
Setup Roles
@bot.command()
async def roles(ctx):
global IDMessage
reaction = await ctx.reply("Select your Game" + '\n' + '\n' + "- Valorant ♀️" '\n' + "- World of Warcraft ⚔" + '\n' + "- League of Legends ♀️" + '\n' + "- Cs:Go ")
await reaction.add_reaction('♀️')
await reaction.add_reaction('⚔')
await reaction.add_reaction('♀️')
await reaction.add_reaction('')
IDMessage = reaction.message_id
And this is the part of the code that doesnt work for me
Add role on reaction
@bot.event
async def on_reaction_add(reaction, user):
ChID = '920320584032870424'
if reaction.message.channel.id != ChID:
return
if reaction.emoji == "♀️":
Valorant = discord.utils.get(user.server.roles, name="Valorant")
await bot.add_roles(user, Valorant)