Manual Setup
Creating the bot
Creating the bot with Lilybird is a trivial task.
import { createClient, Intents } from "lilybird";
await createClient({ token: process.env.TOKEN, intents: [Intents.GUILDS], listeners: {/* your listeners */}})
Adding types to process.env
In case you are using TypeScript we highly encourage adding proper types to your process.env.
This can be done by creating a globals.d.ts
file on the root of your project.
declare module "bun" { interface Env { TOKEN: string; // Other env variables }}
declare global { namespace NodeJS { interface ProcessEnv { TOKEN: string; // Other env variables } }}
And then adding the following to your tsconfig.json
.
{ "compilerOptions": { "types": [ "./globals" ] }}