A
A
Adam Salavatov2019-07-13 13:17:28
JavaScript
Adam Salavatov, 2019-07-13 13:17:28

How to make it so that when a participant clicks on an emoji, the bot will remove it (Discord Bot)?

Hello, I'm writing a Discord bot in JavaScript.
I make a team that issues roles by reaction. That is, the bot sends a message, and puts reactions on its message using message.react
There was a problem, I want that when a participant clicks on an emoji, the bot removes it. I've seen this on other bots, I've looked in the discord.js manual but I can't find it.
Please suggest a function.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Adam Salavatov, 2020-03-25
@darkvessel

Already solved the issue a long time ago.

message.reactions.cache.forEach(e => e.users.remove(message.author.id));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question