SHARE
TWEET

Untitled

a guest Feb 27th, 2020 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. message.react('👍').then(() => message.react('👎'));
  2.  
  3.         const filter = (reaction, user) => {
  4.             return ['👍', '👎'].includes(reaction.emoji.name) && user.id === message.author.id;
  5.         };
  6.        
  7.         message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
  8.             .then(collected => {
  9.                 const reaction = collected.first();
  10.                
  11.                 if (reaction.emoji.name === '👍') {
  12.                     message.reply('you reacted with a thumbs up.');
  13.                     reaction.remove("Here goes the users");
  14.  
  15.                 } else {
  16.                     message.reply('you reacted with a thumbs down.');
  17.                 }
  18.             })
  19.             .catch(collected => {
  20.                 message.reply('you reacted with neither a thumbs up, nor a thumbs down.');
  21.             });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top