Advertisement
xxxKookie

Help React Collect

Mar 2nd, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js');
  2.  
  3. exports.run = async (bot, message, args) => {
  4.    
  5.     let pEmbed = new Discord.RichEmbed()
  6.         //CRIE SEU EMBED DE PÁGINA INICIAL
  7.  
  8.     message.channel.send(pEmbed).then(msg => {
  9.         msg.react("EMOJI_UNICODE1")
  10.         .then(() => msg.react("EMOJI_UNICODE2"))
  11.         .then(() => msg.react("EMOJI_UNICODE3"))
  12.        
  13.        
  14.     let qEmbed = new Discord.RichEmbed()
  15.         //EMBED DA PAGINA DO PRIMEIRO EMOJI
  16.  
  17.     let filtro = (reaction, user) => reaction.emoji.name === "EMOJI_UNICODE1" && user.id === message.author.id;  
  18.    
  19.     const coletor = msg.createReactionCollector(filtro, {max: 1, time: 60000});
  20.  
  21.     coletor.on("collect", () => {
  22.         msg.edit(qEmbed)
  23.     });
  24.  });        
  25. }
  26.  
  27. exports.help = {
  28.     name: "NOME_DO_COMANDO"
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement