harmony/test/cmds/ping.ts

11 lines
279 B
TypeScript
Raw Normal View History

2021-04-04 05:52:47 +00:00
import { Command, CommandContext } from '../../mod.ts'
export default class PingCommand extends Command {
2020-12-02 12:29:52 +00:00
name = 'ping'
execute(ctx: CommandContext): void {
2021-03-26 11:33:21 +00:00
console.log(ctx.args, ctx.argString)
2021-04-17 08:19:26 +00:00
ctx.message.reply(`Pong! Latency: ${ctx.client.gateway.ping}ms`)
}
2020-12-02 12:29:52 +00:00
}