quick hello world
vi did:web:vt3e.cat
Tue, 16 Jun 2026 16:29:35 +0100
1 files changed,
28 insertions(+),
0 deletions(-)
jump to
M
README.md
→
README.md
@@ -4,6 +4,34 @@ a meowing, typesafe interaction router for discord.js
see [GET-STARTED.md](./GET-STARTED.md) for a quick introduction to using kitten +here is a quick hello world example + +```ts +import { Client } from "discord.js"; +import { Kitten } from "@purrkit/core"; + +const client = new Client({ intents: [] }); +const kitten = new Kitten(client); + +const helloWorldCommand = kitten.command("hello-world", { + description: "replies with hello world", + run: (interaction) => { + interaction.reply("Hello World!"); + }, +}); + +client.once("clientReady", async () => { + kitten.register({ + commands: [helloWorldCommand], + }); + + await kitten.sync(); + console.log("ready!!!"); +}); + +client.login(process.env.DISCORD_TOKEN); +``` + ## copying this project is licensed under the european union public license (eupl) v1.2.