Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord  = require("discord.js")
  2. const config = require("../config.json")
  3. exports.run = async (client, msg, args) => {
  4.  
  5.   var rock = "697913704850784296"
  6.   var paper = "697913280819232789"
  7.   var scissors = "✂️"
  8.  
  9. if(args[0] === "solo"){
  10.  
  11.   let emb = new Discord.RichEmbed()
  12.  
  13.   .setTitle("rps", msg.author.displayAvatarURL)
  14.   .setColor(config.color)
  15.   .addField(`rps`, "rps")
  16.   .setFooter(`rps`)
  17.   msg.channel.send(emb).then(async(message) => {
  18.  await message.react(rock).then(async(afterReaction) => {
  19.   await message.react(paper)
  20.   await message.react(scissors)
  21.  
  22.       const rockFilter = (reaction, user) => reaction.emoji.id === rock && user.id === msg.author.id;
  23.       const paperFilter = (reaction, user) => reaction.emoji.id === paper && user.id === msg.author.id;
  24.       const scissorsFilter = (reaction, user) => reaction.emoji.name === scissors && user.id === msg.author.id;
  25.      
  26.       const rock = message.createReactionCollector(rockFilter, { time: 3000 });
  27.       const paper = message.createReactionCollector(paperFilter, { time: 3000});
  28.       const scissors = message.createReactionCollector(scissorsFilter, { time: 3000});
  29.  
  30.       rock.on('end', a => {
  31.      
  32.       console.log(a)
  33.       return;
  34.      
  35.     })
  36.  
  37.   });
  38. });
  39.  
  40.   }
  41. exports.run = {
  42. name:"rps";
  43. aliases: []
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement