Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- message.react('👍').then(() => message.react('👎'));
- const filter = (reaction, user) => {
- return ['👍', '👎'].includes(reaction.emoji.name) && user.id === message.author.id;
- };
- message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
- .then(collected => {
- const reaction = collected.first();
- if (reaction.emoji.name === '👍') {
- message.reply('you reacted with a thumbs up.');
- reaction.remove("Here goes the users");
- } else {
- message.reply('you reacted with a thumbs down.');
- }
- })
- .catch(collected => {
- message.reply('you reacted with neither a thumbs up, nor a thumbs down.');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement