Berry26
Berry26

Reputation: 37

Discord.py: how to wait for user reaction to the BOT comment?

I want to make a BOT that do something depending on the user reaction on the BOT post. Somethign like this https://i.sstatic.net/Vz0dZ.jpg, but not for voting only to know if the user is sure to execute the command, hope I'm clear. Thank you for any reply.

Upvotes: 0

Views: 3089

Answers (2)

Deru
Deru

Reputation: 1173

In the documentation you will see a function wait_for(). This can be used to wait for a certain event. Such as a message or reaction add. In this case you want to wait for a reaction add.

In the second example of the documentation is explained how you can use it:

reaction, user = await client.wait_for('reaction_add', timeout=60.0, check=check)

Upvotes: 4

chluebi
chluebi

Reputation: 1829

Use client.on_reaction_add(reaction, user) documentation

Upvotes: 2

Related Questions