aboutsummaryrefslogtreecommitdiff
path: root/commands/Getting Started/ping.js
blob: 12afaa03d412e9f25472533b0123fe893557d336 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/** **************************************
 *
 *   Ping: Plugin for PokeBot that provides diagnostic information.
 *   Copyright (C) 2018 TheEdge, jtsshieh, Alee
 *
 *   Licensed under the Open Software License version 3.0
 *
 * *************************************/

exports.run = (bot, msg) => {
  const { RichEmbed } = require('discord.js');
  const embed = new RichEmbed();
  embed
    .setColor (0x00ae86)
    .setTitle(':computer: Bot Statistics')
    .setDescription('Showing bot statistics:')
    .setFooter('Galaxy 2.0 Alpha 1');

  embed.addField('Client Heartbeat', Math.floor(bot.ping) + ' ms.');
  
  msg.channel.send({ embed })
};

exports.conf = {
  aliases: [],
  guildOnly: true,
};

exports.help = {
  name: 'ping',
  description: 'Pings the bot and replies with the latency.',
};