2022-07-31 17:08:00 +05:00
|
|
|
const { SlashCommandBuilder } = require("discord.js");
|
2022-07-26 17:20:10 +05:00
|
|
|
const BaseCommand = require("../../base/BaseCommand");
|
2022-07-23 17:14:42 +05:00
|
|
|
|
|
|
|
class Ping extends BaseCommand {
|
|
|
|
/**
|
|
|
|
*
|
2022-07-29 23:31:08 +05:00
|
|
|
* @param {import("../base/JaBa")} client
|
2022-07-23 17:14:42 +05:00
|
|
|
*/
|
2022-07-29 23:31:08 +05:00
|
|
|
constructor(client) {
|
2022-07-23 17:14:42 +05:00
|
|
|
super({
|
|
|
|
command: new SlashCommandBuilder()
|
|
|
|
.setName("ping")
|
2022-07-29 23:31:08 +05:00
|
|
|
.setDescription(client.translate("general/ping:DESCRIPTION")),
|
|
|
|
aliases: [],
|
2022-07-26 17:20:10 +05:00
|
|
|
dirname: __dirname,
|
2022-07-29 23:31:08 +05:00
|
|
|
guildOnly: true,
|
|
|
|
ownerOnly: false
|
2022-07-23 17:14:42 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
2022-07-26 17:20:10 +05:00
|
|
|
* @param {import("../../base/JaBa")} client
|
2022-07-23 17:14:42 +05:00
|
|
|
*/
|
|
|
|
async onLoad() {
|
|
|
|
//...
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
2022-07-26 17:20:10 +05:00
|
|
|
* @param {import("../../base/JaBa")} client
|
2022-07-23 17:14:42 +05:00
|
|
|
* @param {import("discord.js").CommandInteraction} interaction
|
2022-07-29 23:31:08 +05:00
|
|
|
* @param {Array} data
|
2022-07-23 17:14:42 +05:00
|
|
|
*/
|
|
|
|
async execute(client, interaction) {
|
2022-07-29 23:31:08 +05:00
|
|
|
interaction.replyT("general/ping:CONTENT", {
|
|
|
|
ping: Math.round(client.ws.ping)
|
|
|
|
});
|
2022-07-23 17:14:42 +05:00
|
|
|
}
|
|
|
|
}
|
2022-07-29 23:31:08 +05:00
|
|
|
|
2022-07-23 17:14:42 +05:00
|
|
|
module.exports = Ping;
|