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-containedLayerthat declares its own dependencies and is composed into the main application layer inmain.ts.Effect— all async and effectful operations (HTTP calls, Discord gateway events, AI generation) are modelled asEffectvalues with typed errors.ServiceMap— services likeAiHelpersare defined asServiceMap.Serviceclasses, making dependency injection explicit and type-safe.Config/ConfigProvider— environment variables are read withConfig.string,Config.boolean, andConfig.redacted, and scoped to feature prefixes usingConfigProvider.nested.Schedule— retry policies and cron-based scheduling are composed withSchedulecombinators.FiberMap— the Reminders feature manages per-channel reminder fibers withFiberMapfor safe concurrent lifecycle management.
main.ts assembles every feature layer and runs the application:
main.ts
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.