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