我怎样才能得到反应中的表情符号的 ID?

how can i get the id of an emoji in reaction?

我想在消息的反应中获取表情符号的 ID,但我不知道该怎么做。

@client.event 
async def on_message(message):
    channal = client.get_channel(825523364844142601)
    embeds = message.embeds
    for embed in embeds:
        if embed.author.name in wishlist:
            reaction = get(message.reactions)
            print(reaction)
            await channal.send("yes")
        else:
            await channal.send("false")

上下文:我在玩一个不和谐的游戏,其中一个机器人发送一个带有角色名称的嵌入,然后在这个嵌入上,机器人自动添加一个反应。我想要的是获取机器人反应的 ID,并使用该 ID 添加相同的内容

您无需再次获取表情符号即可做出反应。您可以只添加来自表情符号的反应 class.
我还建议稍等片刻,然后再次收到消息,因为反应不会立即出现在 Message 对象上。

@client.event 
async def on_message(message):
    channal = client.get_channel(825523364844142601)
    embeds = message.embeds
    for embed in embeds:
        if embed.author.name in wishlist:
            await asyncio.sleep(1.0) # Give time for reaction to update on cache
            message = await message.channel.fetch_message(message.id) # Update message object 
            reaction = message.reactions[0] # Get first reaction of a message
            emoji = reaction.emoji
            emoji_id = emoji.id
            await message.add_reaction(emoji) # You can just add with emoji, you don't need to get emoji again
            await channal.send("yes")
        else:
            await channal.send("false")

查看 discord.Reaction 对象。