galactic-bot/structure/client/components/commands/utility/Ping.js

25 lines
548 B
JavaScript
Raw Normal View History

const { Command } = require('../../../../interfaces/');
class PingCommand extends Command {
constructor(client) {
super(client, {
name: 'ping',
module: 'utility',
description: "Determines the ping of the bot."
});
this.client = client;
}
async execute(message) {
const ping = this.client.ws.ping.toFixed(0);
2020-05-01 16:13:12 +02:00
return message.respond(`${message.format('PING_COMMAND_RESPONSE')} \`${ping}ms\``, { emoji: 'success' });
}
}
module.exports = PingCommand;