Skip to main content
This guide walks you through running the Effect Discord Bot locally or with Docker.

Prerequisites

Before you start, make sure you have the following:
  • Node.js 24+ — the Dockerfile targets node:24-alpine
  • pnpm — the monorepo uses pnpm for package management
  • Discord bot token — create a bot at the Discord Developer Portal
  • OpenAI API key — required for AI title generation, summarization, and responses
  • GitHub token — required for the Issueifier feature
Your Discord bot must be invited to your server with the bot and applications.commands scopes. Enable the Message Content and Server Members privileged intents in the Developer Portal.

Steps

1

Clone the repository

git clone https://github.com/Effect-TS/discord-bot.git
cd discord-bot
2

Install dependencies

From the repo root, install all workspace dependencies:
pnpm install
3

Set up environment variables

Create a .env file (or export variables in your shell) with the following:
.env
# Required
DISCORD_BOT_TOKEN=your_discord_bot_token
OPENAI_API_KEY=your_openai_api_key
GITHUB_TOKEN=your_github_token

# Optional
DEBUG=false

# AutoThreads feature
AUTOTHREADS_KEYWORD=[threads]

# NoEmbed feature
NOEMBED_KEYWORD=[noembed]
NOEMBED_URL_WHITELIST=effect.website
NOEMBED_URL_EXCLUDE=effect.website/play
See the configuration reference for a full description of every variable.
4

Build the bot

Build the discord-bot package:
pnpm run --filter=discord-bot build
This compiles the TypeScript source and outputs a CommonJS bundle to packages/discord-bot/dist/main.cjs.
5

Run the bot

You can start the bot directly with Node.js or via Docker.
node packages/discord-bot/dist/main.cjs
The bot connects to the Discord gateway and begins listening for events. You should see Info-level logs in the terminal once connected.
Set DEBUG=true to switch the log level to All, which outputs verbose tracing information useful during development.

Deploying to Fly.io

The repository includes a fly.toml configured for the effectful-discord-bot app on Fly.io. To deploy:
fly deploy
Fly builds the image using the Dockerfile and deploys it to the iad region on a shared-cpu-1x instance with 512 MB of memory. Set your secrets with fly secrets set DISCORD_BOT_TOKEN=... OPENAI_API_KEY=... GITHUB_TOKEN=... before deploying.

Build docs developers (and LLMs) love