0

I'm trying to make a Pokemon center command on request of a friend. The plan is to continue the dialogue whenever the user reacts with the 'A' emoji (:a:), so I'm trying to have the bot react to its own message first. Here's the code

@bot.command()
async def joy(ctx):
    msg = await ctx.send(f'Welcome to our Pokémon Center!')
    emoji = bot.get_emoji(706288524089098360)
    await msg.add_reaction(msg,emoji)

Whenever I run it I get this error:

TypeError: add_reaction() takes 2 positional arguments but 3 were given
  • 1
    Does this answer your question? [Explaining the 'self' variable to a beginner](https://stackoverflow.com/questions/6990099/explaining-the-self-variable-to-a-beginner) – mkrieger1 May 03 '20 at 00:13

1 Answers1

0

There is no need to put msg as parameter of add_reaction(), just use msg.add_reaction(emoji) with a unicode emoji. Here is the doc for add_reaction()

The self variable mustn't be specified, add_reaction() gets it form msg before the dot by himself in msg.add_reaction(emoji).

kiliz
  • 95
  • 4