2021-10-04 20:41:05 +01:00
|
|
|
// SupportBot | Emerald Services
|
2020-12-11 21:42:04 +00:00
|
|
|
// Ping Command
|
2019-06-09 23:52:41 +01:00
|
|
|
|
2020-04-15 15:08:13 +01:00
|
|
|
const fs = require("fs");
|
2019-06-09 23:52:41 +01:00
|
|
|
|
2021-10-04 20:41:05 +01:00
|
|
|
const Discord = require("discord.js");
|
2020-06-15 23:58:37 +01:00
|
|
|
const yaml = require('js-yaml');
|
2021-10-04 20:41:05 +01:00
|
|
|
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
|
|
|
|
|
|
|
|
|
|
const Command = require("../Structures/Command.js");
|
|
|
|
|
|
|
|
|
|
module.exports = new Command({
|
|
|
|
|
name: "ping",
|
|
|
|
|
description: "Shows the ping of the bot!",
|
|
|
|
|
type: "BOTH",
|
|
|
|
|
slashCommandOptions: [],
|
|
|
|
|
permission: "SEND_MESSAGES",
|
2020-04-14 22:45:51 +01:00
|
|
|
|
2021-10-04 20:41:05 +01:00
|
|
|
async run(message, args, client) {
|
2020-04-14 22:45:51 +01:00
|
|
|
|
2021-10-04 20:41:05 +01:00
|
|
|
const PingEmbed = new Discord.MessageEmbed()
|
|
|
|
|
.setDescription(`:ping_pong: **Ping:** \`${client.ws.ping} ms\``)
|
|
|
|
|
.setColor(supportbot.EmbedColour)
|
2020-04-14 22:45:51 +01:00
|
|
|
|
2021-10-04 20:41:05 +01:00
|
|
|
message.channel.send({
|
|
|
|
|
embeds: [PingEmbed]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|