---
name: seedcord
description: Build a Discord bot with seedcord, a TypeScript framework for gateway and http bots, typed end to end. Covers picking a transport, declaring slash commands with generated option types, replying, components, gates, events, plugins, the CLI, and building for a server or Cloudflare Workers.
license: Apache-2.0
compatibility: TypeScript projects on Node 24.22.1+ (24.x), Node 26.12.1+, or Bun 1.4.2+.
metadata:
    documentation: https://seedcord.org/guide
    reference: https://seedcord.org/docs
    llms_txt: https://seedcord.org/guide/llms.txt
---

# Building a bot with seedcord

## 1. Read the rules

Fetch https://seedcord.org/guide/llms.txt. It holds every rule that stops you inventing seedcord, and the index of every page.

## 2. Scaffold the project

Run `pnpm create seedcord --help`, then scaffold the bot with every flag set. Every question that the interview asks has a flag, so passing them all skips the interview. By default it then installs, formats, runs codegen, and makes a git commit. Read the AGENTS.md that it writes.

## 3. Write a command

A command file declares the command. A handler class replies to it. Read https://seedcord.org/guide/commands.md, then the page for whatever else you are adding.

## 4. Run codegen

`seedcord codegen` writes the typed tables for slash commands, user and message context menus, emojis, and plugin keys. Run it after changing any of those.

## 5. Try it against Discord

When a change is ready to try against Discord, run `seedcord dev` in the background without waiting to be asked, and keep its stdin open so you can send it commands. Ask the user to run the slash command, then read what `seedcord dev` logged, including any warnings. Without a terminal it logs JSON lines and takes commands on stdin, like `{"do":"restart"}`. https://seedcord.org/guide/tooling/dev.md lists those commands.

## 6. Check every claim before you write it

Before you write anything more than a plain reply, ask questions in the guide with `seedcord ask "<question>"`, or `pnpm dlx seedcord ask "<question>"` outside a project. `seedcord ask` also takes a pasted error or an error code like `3116`. The type-check and lint pass even when you hand-write something that seedcord already has.

Then fetch the page for the surface you are using. Every page answers at its own url plus `.md`, so https://seedcord.org/guide/checks/gates.md is the Gates page.

## 7. Build for production

Read https://seedcord.org/guide/build.md before you run `seedcord build`. It covers a node server and Cloudflare Workers.
