SHARE
TWEET

Untitled

a guest Feb 16th, 2020 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js');
  2. const { graphics } = require('./../config.json');
  3.  
  4. module.invalidable = true;
  5. module.exports = {
  6.     name: 'ping',
  7.     aliases: [],
  8.     description: 'Delay betwen messages.',
  9.     enabled: true,
  10.     arguments: [],
  11.     execute(message, args) {
  12.     return new Promise((resolve, reject) =>
  13.     {
  14.       message.reply({
  15.         "content": message.author,
  16.         "embed": {
  17.                     "author": {
  18.                         "name": "...",
  19.                         "icon_url": graphics.timer
  20.                     },
  21.           "description": "The time it takes from you sending a command to me doing something about it."
  22.         }
  23.       }).then(response => {
  24.           var embed = new Discord.RichEmbed(response.embeds[0])
  25.           .setAuthor(`${new Date().getTime() - message.createdTimestamp}ms`,graphics.timer)
  26.  
  27.             response.edit(response.content, embed).then(r => {
  28.               resolve(r);
  29.             }).catch(e => {
  30.               reject(e);
  31.             })
  32.                         resolve();
  33.           }).then(e => {
  34.             reject(e);
  35.           })
  36.         })
  37.     },
  38. };
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