2020-04-17 17:23:13 +02:00
|
|
|
const { Command } = require('../../../../interfaces/');
|
2020-04-09 23:08:28 +02:00
|
|
|
|
|
|
|
class PingCommand extends Command {
|
|
|
|
|
|
|
|
constructor(client) {
|
|
|
|
|
|
|
|
super(client, {
|
|
|
|
name: 'ping',
|
|
|
|
module: 'utility',
|
2020-04-16 14:37:04 +02:00
|
|
|
description: "Determines the ping of the bot."
|
2020-04-09 23:08:28 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
this.client = client;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async execute(message) {
|
2020-04-16 14:37:04 +02:00
|
|
|
const ping = this.client.ws.ping.toFixed(0);
|
2020-05-06 01:40:46 +02:00
|
|
|
//console.log(message.format('C_PING_RESPONSE'))
|
|
|
|
return message.respond(`${message.format('C_PING_RESPONSE')} \`${ping}ms\``, { emoji: 'success' });
|
2020-04-09 23:08:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = PingCommand;
|