JaBa/commands/General/ping.js

30 lines
611 B
JavaScript
Raw Normal View History

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,
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
2022-01-03 23:20:33 +05:00
}, { edit: true });
2021-12-10 21:39:54 +05:00
});
}
};
module.exports = Ping;