SHARE
TWEET

Untitled

a guest Nov 9th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js')
  2. const client = new Discord.Client();
  3. const config = require("./config.json");
  4.  
  5.  
  6.  
  7. client.on("ready", () =>{
  8.     console.log(`Bot iniciado`);
  9.     client.user.setGame(`Quem pegar minhas tags sรฃo gays`);
  10. });
  11.  
  12. client.on('message', message => {
  13. setInterval(() => {
  14.     let arr = ['625828175104180266', '633555035862597652', '630531594268049419']
  15.     const random = arr[Math.floor(Math.random() * arr.length)]
  16.     switch(random){
  17.     case '625828175104180266':
  18.     client.channels.get('619999225635274778').send('teste') //passo 1
  19.     .then(msg => { //passo 2
  20.     let array = ['๐Ÿ˜', '๐Ÿ˜ˆ', '๐Ÿ†', '๐Ÿ˜ก']
  21.     array.forEach(emoji => msg.react(emoji))
  22.     }
  23.    
  24.     const filter = (reaction, user) => array.includes(reaction.emoji.name);
  25.     const collector = msg.createReactionCollector(filter, {max: 100, time: 99999}) //passo 4
  26.     collector.on('collect', async r => {
  27.     switch(r.emoji.name){ //passo 5
  28.         case '๐Ÿ˜ก':
  29.             //esse vai ser o emoji vencedor
  30.             message.guild.member(r.users.last().id).addRole('625828175104180266') //passo 6
  31.             msg.delete() //passo 7
  32.         break;
  33.         case 'mais vencedores? sem problemas':
  34.             //sรณ repetir a mesma coisa
  35.         break;
  36.     }
  37.     })
  38.     })
  39.     break;
  40.     case '633555035862597652':
  41. client.channels.get('619999225635274778').send('teste') //passo 1
  42.     .then(msg => { //passo 2
  43.     let array = ['๐Ÿ˜', '๐Ÿ˜ˆ', '๐Ÿ†', '๐Ÿ˜ก']
  44.     for(var i in array){
  45.     msg.react(i) //passo 3
  46.     }
  47.    
  48.     const filter = (reaction, user) => array.includes(reaction.emoji.name);
  49.     const collector = msg.createReactionCollector(filter, {max: 100, time: 99999}) //passo 4
  50.     collector.on('collect', async r => {
  51.     switch(r.emoji.name){ //passo 5
  52.         case '๐Ÿ˜ก':
  53.             //esse vai ser o emoji vencedor
  54.             message.guild.member(r.users.last().id).addRole('625828175104180266') //passo 6
  55.             msg.delete() //passo 7
  56.         break;
  57.         case 'mais vencedores? sem problemas':
  58.             //sรณ repetir a mesma coisa
  59.         break;
  60.     }
  61. })
  62. })
  63. break;
  64. case '630531594268049419':
  65. client.channels.get('619999225635274778').send('teste') //passo 1
  66. .then(msg => { //passo 2
  67. let array = ['๐Ÿ˜', '๐Ÿ˜ˆ', '๐Ÿ†', '๐Ÿ˜ก']
  68. array.forEach(emoji => msg.react(emoji))
  69. }
  70.  
  71. const filter = (reaction, user) => array.includes(reaction.emoji.name);
  72. const collector = msg.createReactionCollector(filter, {max: 100, time: 99999}) //passo 4
  73. collector.on('collect', async r => {
  74. switch(r.emoji.name){ //passo 5
  75.     case '๐Ÿ˜ก':
  76.         //esse vai ser o emoji vencedor
  77.         message.guild.member(r.users.last().id).addRole('625828175104180266') //passo 6
  78.         msg.delete() //passo 7
  79.     break;
  80.     case 'mais vencedores? sem problemas':
  81.         //sรณ repetir a mesma coisa
  82.     break;
  83.     }
  84.   })
  85. })
  86. }
  87.     }, 60000 * 5)
  88.  
  89.  
  90. });
  91.  
  92. 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