如何获得在消息中对表情符号做出反应的用户(discord.py)

时间:2020-08-24 11:32:37

标签: python discord.py-rewrite

请有人提供一个示例,说明如何使在消息中对表情符号做出反应的用户吗?

python-discord.py-rewrite

编辑: 我从获取消息并输出内容开始 代码:

   channel_name = bot.get_channel(735207841572454546)
   msg = await channel_name.fetch_message(id)
   await ctx.channel.send(msg.content)

1 个答案:

答案 0 :(得分:0)

答案:

channel_name = bot.get_channel(735222904530141244)
msg = await channel_name.fetch_message(id)
await ctx.channel.send(msg.reactions[0])
reaction = msg.reactions[0]
users = await reaction.users().flatten()
await ctx.channel.send('\n'.join(map(str, users)))