Skip to content Skip to sidebar Skip to footer

Get The User Who Triggered The On_raw_reaction_remove(payload)

I am using async def on_raw_reaction_remove(payload) to track when a user removes a reaction.. How do I get the user who triggered the event? In my code i have my bot trigger this

Solution 1:

The answer is - there is nothing in the discord python API that can tell you who removed the reaction.

For my case, I solved it with a workaround - I just had to track if my bot removed a reaction with a variable - I am using a global variable to track when my bot removes a reaction and then just check later if the variable is True or False and respond accordingly and reset the variable back.

Thanks

Solution 2:

What I did in this case was this:

guild = discord.utils.find(lambda g: g.id == payload.guild_id, bot.guilds)
member = discord.utils.find(lambda m: m.id == payload.user_id, guild.members)

You now just have to build this into your code

Post a Comment for "Get The User Who Triggered The On_raw_reaction_remove(payload)"