discord python get reactions on message code example
Example 1: discord.py add reaction to message
message = ctx.send("text")
message = channel.send("text")
message = channel.fetch_message(messageid)
emoji = '\N{THUMBS UP SIGN}'
await message.add_reaction(emoji)
Example 2: python discord action when someone reacts to message
@bot.event
async def on_reaction_add(reaction, user):
embed = reaction.embeds[0]
emoji = reaction.emoji
if user.bot:
return
if emoji == "emoji 1":
fixed_channel = bot.get_channel(channel_id)
await fixed_channel.send(embed=embed)
elif emoji == "emoji 2":
elif emoji == "emoji 3":
else:
return