Skip to main content

Prerequisites

Discord intents

Enable these in the Developer Portal (they match src/bot.ts): Slash commands register per guild (botGuilds), so changes show up immediately rather than after Discord’s global propagation delay.

Install

  1. Clone and install
    yarn setup installs dependencies, generates the Prisma client into src/generated/prisma (gitignored), and pushes the schema to the database. A fresh clone will not typecheck or boot until yarn prisma:generate has run.
  2. Create .env from .env.example:
  3. Invite the bot with the intents above, then start it:

Environment variables

Keep .env, src/generated/, and build/ out of git. Never commit tokens or database URLs.

Scripts

Project structure

There are two entry points (main.ts and dev.ts) and they are not equivalent — production installs global error handlers and closes Prisma on shutdown; development does neither.