Skip to content

Getting Started

Before you start

Lilybird is a thing wrapper on top of the Discord API, if you are not using transformers the best documentation you can read is the official one that can be found here.

All the interfaces, types and REST methods in lilybird follow the naming scheme found in the official documentation, if you ever find something that doesn’t match feel free to open a pull request.

Installation

The fastest way to get started with Lilybird is by using our template generator.

bun create @lilybird

Running your first bot

After running the command you should see a file structure somewhat like this:

  • globals.d.ts
  • tsconfig.json
  • package.json
  • .env <- add your token here
  • Directorysrc
    • index.ts

Don’t forget to add your token as mentioned above.

Starting your bot

To start your first bot all you need to do is run the dev script found in your package.json.

bun dev

Ready for production

Running your bot is rather simple, however we have a few recommendations that can help improve performance in some cases:

  • If you are using Bun or Node, add NODE_ENV="production" to your .env file.
  • If you are using Bun, change or add a script to run production using bun --smol.
bun run build
bun start