Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  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. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement