2019-10-14 23:37:04 -04:00
|
|
|
import { Message } from 'eris';
|
|
|
|
import Client from '../Client';
|
|
|
|
import Command from '../class/Command';
|
2019-10-14 18:02:04 -04:00
|
|
|
|
|
|
|
export default class Ping extends Command {
|
2019-10-14 23:37:04 -04:00
|
|
|
constructor(client: Client) {
|
|
|
|
super(client);
|
|
|
|
this.name = 'ping';
|
|
|
|
this.description = 'Pings the bot';
|
|
|
|
}
|
2019-10-14 18:02:04 -04:00
|
|
|
|
2019-10-14 23:37:04 -04:00
|
|
|
public async run(message: Message) {
|
|
|
|
const clientStart: number = Date.now();
|
|
|
|
const msg: Message = await message.channel.createMessage('🏓 Pong!');
|
|
|
|
msg.edit(`🏓 Pong!\nClient: \`${Date.now() - clientStart}ms\`\nResponse: \`${msg.createdAt - message.createdAt}ms\``);
|
|
|
|
}
|
|
|
|
}
|