Files
SupportBot/commands/ping.js
T

30 lines
810 B
JavaScript
Raw Normal View History

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");
2021-10-23 20:04:02 -05:00
const yaml = require("js-yaml");
const supportbot = yaml.load(fs.readFileSync("./Data/supportbot.yml", "utf8"));
const cmdconfig = yaml.load(fs.readFileSync("./Data/commands.yml", "utf8"));
2021-10-04 20:41:05 +01:00
const Command = require("../Structures/Command.js");
module.exports = new Command({
2021-10-23 20:04:02 -05:00
name: cmdconfig.PingCommand,
description: cmdconfig.PingCommandDesc,
slashCommandOptions: [],
permission: "SEND_MESSAGES",
2020-04-14 22:45:51 +01:00
2021-10-23 20:04:02 -05:00
async run(interaction) {
const PingEmbed = new Discord.MessageEmbed()
.setDescription(
`:ping_pong: **Ping:** \`${interaction.client.ws.ping} ms\``
)
.setColor(supportbot.EmbedColour);
2020-04-14 22:45:51 +01:00
2021-10-23 20:04:02 -05:00
interaction.reply({
embeds: [PingEmbed],
});
},
});