Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js")
- const config = require("../config.json")
- exports.run = async (client, msg, args) => {
- var rock = "697913704850784296"
- var paper = "697913280819232789"
- var scissors = "✂️"
- if(args[0] === "solo"){
- let emb = new Discord.RichEmbed()
- .setTitle("rps", msg.author.displayAvatarURL)
- .setColor(config.color)
- .addField(`rps`, "rps")
- .setFooter(`rps`)
- msg.channel.send(emb).then(async(message) => {
- await message.react(rock).then(async(afterReaction) => {
- await message.react(paper)
- await message.react(scissors)
- const rockFilter = (reaction, user) => reaction.emoji.id === rock && user.id === msg.author.id;
- const paperFilter = (reaction, user) => reaction.emoji.id === paper && user.id === msg.author.id;
- const scissorsFilter = (reaction, user) => reaction.emoji.name === scissors && user.id === msg.author.id;
- const rock = message.createReactionCollector(rockFilter, { time: 3000 });
- const paper = message.createReactionCollector(paperFilter, { time: 3000});
- const scissors = message.createReactionCollector(scissorsFilter, { time: 3000});
- rock.on('end', a => {
- console.log(a)
- return;
- })
- });
- });
- }
- exports.run = {
- name:"rps";
- aliases: []
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement