JaBa/commands/General/ping.js

30 lines
580 B
JavaScript
Raw Normal View History

const Command = require("../../base/Command");
2022-01-04 02:18:28 +05:00
class Ping extends Command {
constructor(client) {
super(client, {
name: "ping",
dirname: __dirname,
enabled: true,
guildOnly: false,
2022-01-05 22:04:46 +05:00
aliases: ["pi"],
2022-01-04 02:18:28 +05:00
memberPermissions: [],
botPermissions: ["SEND_MESSAGES"],
nsfw: false,
ownerOnly: false,
cooldown: 2000
});
}
async run(message) {
message.sendT("general/ping:CONTENT", {
2022-05-14 22:17:13 +05:00
ping: "..."
2022-01-04 02:18:28 +05:00
}).then((m) => {
m.sendT("general/ping:CONTENT", {
2022-05-14 22:17:13 +05:00
ping: Math.round(this.client.ws.ping)
}, { edit: true });
2022-01-04 02:18:28 +05:00
});
}
2022-01-13 00:26:23 +05:00
}
2022-01-04 02:18:28 +05:00
module.exports = Ping;