2021-12-10 21:39:54 +05:00
|
|
|
const Command = require("../../base/Command.js");
|
|
|
|
|
|
|
|
class Ping extends Command {
|
2021-12-26 19:29:37 +05:00
|
|
|
constructor(client) {
|
2021-12-10 21:39:54 +05:00
|
|
|
super(client, {
|
|
|
|
name: "ping",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: false,
|
2021-12-26 19:29:37 +05:00
|
|
|
aliases: ["pong", "latency"],
|
2021-12-10 21:39:54 +05:00
|
|
|
memberPermissions: [],
|
2021-12-26 19:29:37 +05:00
|
|
|
botPermissions: ["SEND_MESSAGES"],
|
2021-12-10 21:39:54 +05:00
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
2021-12-22 17:32:50 +05:00
|
|
|
cooldown: 2000
|
2021-12-10 21:39:54 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-26 19:29:37 +05:00
|
|
|
async run(message) {
|
|
|
|
message.sendT("general/ping:CONTENT", {
|
|
|
|
ping: "..."
|
|
|
|
}).then((m) => {
|
|
|
|
m.sendT("general/ping:CONTENT", {
|
|
|
|
ping: m.createdTimestamp - message.createdTimestamp
|
|
|
|
}, {
|
|
|
|
edit: true
|
|
|
|
});
|
2021-12-10 21:39:54 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Ping;
|