SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js");
  2.  
  3. const agree = "✅";
  4. const disagree = "❎";
  5.  
  6. module.exports.run = async (bot, message, args) => {
  7.     let rreason = args.join(" ");
  8.  
  9.     message.delete().catch(O_o=>{});
  10.     let msg = await message.channel.send(`Question: ` + rreason);
  11.     await msg.react(agree);
  12.     await msg.react(disagree);
  13.  
  14.     const reactions = await msg.awaitReactions(reaction => reaction.emoji.name === agree || reaction.emoji.name === disagree, {time: 15000});
  15.     message.channel.send(`Question: ${rreason}\n\n${agree}: ${reactions.get(agree).count-1}\n\n${disagree}: ${reactions.get(disagree).count-1}`);
  16. }
  17.  
  18. module.exports.help = {
  19.     name: "vote"
  20. }
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