'Reacting to a certain user with a discord bot in discord.py

I want to create a discord bot which has the goal to react with the dog emoji for a certain user. I wrote this function but it doesn't work. Do you have any idea to correct the problem?

Thank you all!

@client.event
async def dog_react(message,author,id):
  emoji="🐶"
  if message.author.id==xxxxx:
    await message.add_reaction(emoji)
    return
  return


Solution 1:[1]

You could do something like:

@client.event
async def on_message(ctx):
    emoji = "?"
    if ctx.author.id == xxxxx:
        await ctx.add_reaction(emoji)

Highly suggest checking out the Discord.py FAQ

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 lemon