JaBa/commands/General/ping.js
2022-04-08 01:36:49 +05:00

32 lines
No EOL
657 B
JavaScript

const Command = require("../../base/Command");
class Ping extends Command {
constructor(client) {
super(client, {
name: "ping",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: ["pi"],
memberPermissions: [],
botPermissions: ["SEND_MESSAGES"],
nsfw: false,
ownerOnly: false,
cooldown: 2000
});
}
async run(message) {
message.sendT("general/ping:CONTENT", {
ping: "...",
wsping: "..."
}).then((m) => {
m.sendT("general/ping:CONTENT", {
ping: m.createdTimestamp - message.createdTimestamp,
wsping: Math.round(this.client.ws.ping)
}, { edit: true });
});
}
}
module.exports = Ping;