import { CommandInitializer, Command } from '../parser.js'; const initializer = new CommandInitializer(); class PingCommand extends Command { name = 'ping'; func(msg, args, ctx) { msg.channel.createMessage('p').then((m) => { m.edit( `rtt: ${Math.floor(m.timestamp - msg.timestamp)}, gateway: ${ ctx.bot.shards.get(ctx.bot.guildShardMap[ctx.bot.channelGuildMap[msg.channel.id]] || 0).latency }` ); }); } } initializer.addCommand(new PingCommand()); export default initializer;