Skip to main content
The Effect Discord Bot is the official automation layer for the Effect community on Discord. It handles automatic thread creation, link embed suppression, scheduled reminders, AI-powered summarization, and more — all built entirely with Effect-TS.

Features

Auto threads

Automatically creates a thread on every new message in configured channels. Uses OpenAI to generate a concise title from the message content.

No embed

Suppresses Discord link previews for whitelisted domains (e.g. effect.website) while excluding specific paths like the playground.

Reminders

Posts scheduled messages to channels on a cron schedule. Configure reminders directly in a channel’s topic using [reminder:CRON:MESSAGE].

AI responses

Generates context-aware replies, thread titles, documentation articles, and summaries using GPT-5.2 via the OpenAI API.

Docs lookup

Looks up Effect documentation references and surfaces relevant results directly in Discord.

Issueifier

Converts Discord conversations into GitHub issues with a single interaction.

Playground

Links to and interacts with the Effect TypeScript playground from within Discord.

Notifications

Sends targeted notifications to community members based on configurable triggers.

Built with Effect-TS

Every component of the bot is built using Effect-TS, a TypeScript library for building robust, composable, and type-safe programs. Key Effect primitives used throughout the codebase:
  • Layer — each feature (AutoThreads, NoEmbed, Reminders, etc.) is a self-contained Layer that declares its own dependencies and is composed into the main application layer in main.ts.
  • Effect — all async and effectful operations (HTTP calls, Discord gateway events, AI generation) are modelled as Effect values with typed errors.
  • ServiceMap — services like AiHelpers are defined as ServiceMap.Service classes, making dependency injection explicit and type-safe.
  • Config / ConfigProvider — environment variables are read with Config.string, Config.boolean, and Config.redacted, and scoped to feature prefixes using ConfigProvider.nested.
  • Schedule — retry policies and cron-based scheduling are composed with Schedule combinators.
  • FiberMap — the Reminders feature manages per-channel reminder fibers with FiberMap for safe concurrent lifecycle management.
The entry point in main.ts assembles every feature layer and runs the application:
main.ts
const MainLive = Layer.mergeAll(
  AiResponse,
  AutoThreadsLive,
  DadJokesLive,
  NoEmbedLive,
  DocsLookupLive,
  IssueifierLive,
  NotificationsLayer,
  PlaygroundLive,
  RemindersLive,
  ReproRequesterLive,
  Summarizer.layer,
).pipe(Layer.provide(TracerLayer("discord-bot")), Layer.provide(LogLevelLive))

NodeRuntime.runMain(Layer.launch(MainLive))

Architecture

The project is a pnpm monorepo with three packages:

discord-bot

The main application. Contains all bot features as composable Layer values — AutoThreads, NoEmbed, Reminders, AI helpers, and more.

discord

Shared Discord infrastructure: gateway setup, REST client configuration, and the DiscordConfig layer that reads the bot token and configures intents.

shared

Cross-package utilities including OpenTelemetry tracing (TracerLayer) and common helper functions.

Docker & Fly.io

The bot ships as a Docker image built with a multi-stage Dockerfile. It is deployed to Fly.io as effectful-discord-bot on a shared-cpu-1x instance.

Next steps

Ready to run the bot yourself? Head to the quickstart to get it running in minutes.

Build docs developers (and LLMs) love