© 2026 Hedgehog Software, LLC
import { Command } from '@sapphire/framework'; import { Message } from 'discord.js'; export class PingCommand extends Command { public constructor(context: Command.LoaderContext, options: Command.Options) { super(context, { ...options, name: 'test', description: 'testy test test', }); } public async messageRun(message: Message) { const msg = await message.channel.send('Test...'); const content = `Pong from JavaScript! Bot Latency ${Math.round(this.container.client.ws.ping)}ms. API Latency ${ msg.createdTimestamp - message.createdTimestamp }ms.`; return msg.edit(content); } }
if (!message.channel.isSendable()) return;