Files
SupportBot/commands/ping.js
T

25 lines
781 B
JavaScript
Raw Normal View History

2020-06-15 23:58:37 +01:00
// SupportBot 6.0, Created by Emerald Services
// Help Command
2019-06-09 23:52:41 +01:00
const Discord = require("discord.js");
2020-04-15 15:08:13 +01:00
const fs = require("fs");
2019-06-09 23:52:41 +01:00
2020-06-15 23:58:37 +01:00
const yaml = require('js-yaml');
2020-04-15 15:08:13 +01:00
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
2020-04-14 22:45:51 +01:00
2020-06-15 23:58:37 +01:00
module.exports = {
name: supportbot.PingCommand,
2020-07-14 19:42:46 +01:00
description: supportbot.PingDesc,
2020-04-14 22:45:51 +01:00
2020-06-15 23:58:37 +01:00
execute(message, args) {
2020-07-27 10:43:25 -04:00
if (supportbot.DeleteMessages == "true") message.delete();
2020-06-15 23:58:37 +01:00
let ping = Date.now() - message.createdTimestamp + " ms";
const PingCommandEmbed = new Discord.MessageEmbed()
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
.setColor(supportbot.EmbedColour)
2020-04-14 22:45:51 +01:00
2020-06-15 23:58:37 +01:00
message.channel.send({ embed: PingCommandEmbed });
}
2020-07-27 10:43:25 -04:00
};