SHARE
TWEET

Untitled

a guest Nov 15th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.channels.get('619999225635274778').send('teste') //passo 1
  2. .then(msg => { //passo 2
  3. let array = ['๐Ÿ˜', '๐Ÿ˜ˆ', '๐Ÿ†', '๐Ÿ˜ก']
  4. for(var i in array){
  5. msg.react(i) //passo 3
  6. }
  7.  
  8. const filter = (reaction, user) => array.includes(reaction.emoji.name);
  9. const collector = msg.createReactionCollector(filter, {max: 100, time: 99999}) //passo 4
  10. collector.on('collect', async r => {
  11. switch(r.emoji.name){ //passo 5
  12.     case '๐Ÿ˜ก':
  13.         //esse vai ser o emoji vencedor
  14.         message.guild.member(r.users.last().id).addRole('625828175104180266') //passo 6
  15.         msg.delete() //passo 7
  16.     break;
  17.     case 'mais vencedores? sem problemas':
  18.         //sรณ repetir a mesma coisa
  19.     break;
  20.     }
  21. })
  22. })
  23.     }, 60000 * 5)
  24.  
  25.     }
  26. });
  27.  
  28. client.login(config.token);
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