Skip to content Skip to sidebar Skip to footer

How To Get The List Of Members That Reacted To A Message In Discord.py?

I just couldn't find a way to do it in discord.py. Reaction doesn't include members.

Solution 1:

I think I answered in your last post, but to those who did not see it. Here is a snippet from my own bot that implements it. :)

@client.command(pass_context = True)asyncdeftest(ctx):

    msg = await client.say('TEST')
    await client.add_reaction(msg, "✅")
    await asyncio.sleep(5)

    cache_msg = discord.utils.get(client.messages, id = msg.id)
    for reactor in cache_msg.reactions:
        reactors = await client.get_reaction_users(reactor)

        #from here you can do whatever you need with the member objectsfor member in reactors:
            await client.say(member.name)

Solution 2:

There is actually a coroutine called get_reaction_users

Post a Comment for "How To Get The List Of Members That Reacted To A Message In Discord.py?"