2022-12-11 02:38:42 +00:00
|
|
|
const Command = require("../../base/Command.js");
|
2022-12-11 06:23:07 +00:00
|
|
|
const replies = require('../../assets/replies.json');
|
2022-12-11 02:38:42 +00:00
|
|
|
|
|
|
|
module.exports = class Ping extends Command {
|
|
|
|
constructor (name, category) {
|
|
|
|
super (name, category)
|
|
|
|
this.name = name,
|
|
|
|
this.description = 'Check response time between Woomy and Discord',
|
|
|
|
this.category = category
|
|
|
|
}
|
|
|
|
|
2022-12-11 06:23:07 +00:00
|
|
|
async run (client, interaction, data) { //eslint-disable-line no-unused-vars
|
|
|
|
const msg = await interaction.reply({ content: replies.ping.random(), fetchReply: true });
|
|
|
|
interaction.editReply(`${msg.content} Roundtrip: \`${msg.createdTimestamp - interaction.createdTimestamp}ms\` Heartbeat: \`${client.ws.ping}ms\``);
|
2022-12-11 02:38:42 +00:00
|
|
|
}
|
|
|
|
};
|