R
R
rodgi2020-08-24 22:35:11
Node.js
rodgi, 2020-08-24 22:35:11

How to create a list of those people who clicked on the reaction?

How to create a list of those people who clicked on the reaction?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-08-24
@rodgi

const filter = (reaction, user) => {
  return reaction.emoji.name === "реакция";
};

const collector = коллектор реакций с вашими параметрами

var members = []; // массив, в который будут записываться пользователи

collector.on('collect', (reaction, user) => { // при обнаружении реакции . . .
  
members.push(user.tag) // записали в массив имя и тег пользователя

});

collector.on('end', collected => { // при окончании сбора реакций . . .

  console.log(members) // вывели в консоль массив с пользователями

});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question