SHARE
TWEET

Untitled

a guest Jun 15th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js');
  2. const ms = require('ms');
  3.  
  4. exports.run = async (client, message, args) => {
  5.  
  6.     let reminderTime = args[0];
  7.     if (!reminderTime) {
  8.         let embed = new Discord.RichEmbed()
  9.             .setTitle('Remind me')
  10.             .setDescription(`\`!!remindme <time in mins> <task>\``)
  11.  
  12.         return message.channel.send(embed)
  13.     }
  14.  
  15.     let reminder = args.slice(1).join(" ");
  16.  
  17.     let remindEmbed = new Discord.RichEmbed()
  18.         .setColor(colours.light_blue)
  19.         .addField('Reminder', `\`\`\`${reminder}\`\`\``)
  20.         .addField('Time', `\`\`\`${reminderTime}\`\`\``)
  21.         .setTimestamp();
  22.  
  23.     message.channel.send(remindEmbed);
  24.  
  25.     setTimeout(function() {
  26.         let remindEmbed = new Discord.RichEmbed()
  27.             .setColor(colours.light_blue)
  28.             .addField('Reminder', `\`\`\`${reminder}\`\`\``)
  29.             .setTimestamp()
  30.  
  31.             message.channel.send(remindEmbed);
  32.     }, ms(reminderTime));
  33.  
  34. }
  35.  
  36. module.exports.config = {
  37.     name: "remindme",
  38.     description: "Creates a remindme timer!",
  39.     usage: "!!remindme <time> <task>",
  40.     accessableby: "Member",
  41.     aliases: ["remindme", "timekeeper"]
  42. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top