discord.py add reaction to message

121

add reaction discord.py -

await message.add_reaction(emoji)

add reaction discord.py -

await bot.add_reaction(msg, emoji)

how to add reaction by message id in discord.py -

#react command
@bot.command()
@commands.has_permissions(manage_messages=True)
async def react(ctx,emoji,message_id):
  channel = ctx.channel
  msg = await channel.fetch_message(message_id)
  await msg.add_reaction(emoji)

Comments

Submit
0 Comments