Config module reads and validates them at startup — the process exits immediately if a required variable is missing or malformed.
How configuration works
The bot uses Effect’s built-inConfig module. Variables marked with Config.redacted are treated as secrets: their values are never printed to logs or traces. Variables read with Config.string or Config.boolean may appear in diagnostic output.
Several services use a nested config provider that maps a flat UPPER_SNAKE_CASE environment variable to a dotted key path. For example, AutoThreads wraps its config with:
keyword is resolved from the environment variable AUTOTHREADS_KEYWORD. The constantCase transformer converts AUTOTHREADS_KEYWORD → autothreads.keyword automatically.
Required
These variables must be set for the bot to start.Discord bot token from the Discord Developer Portal. Used to authenticate the bot with the Discord Gateway and REST API.Read with
Config.redacted — the value is never logged.OpenAI API key. Used by the AI features (thread title generation, documentation generation, summarization) via the
@effect/ai-openai integration.The bot calls the following models:gpt-5.2— primary chat model for AI responsesgpt-5.2-codex— code-focused tasksgpt-4.1-mini— lightweight tasks
Config.redacted — the value is never logged.Optional
These variables are not required. They either have defaults or enable opt-in features.Set to
true to enable verbose logging. When false, the minimum log level is Info. When true, all log levels including Debug and Trace are emitted.GitHub personal access token. Required for the Read with
/issueify slash command, which creates GitHub issues from Discord messages.Internally this variable is consumed under the github config namespace:Config.redacted — the value is never logged.AutoThreads
TheAutoThreads service automatically creates threads for messages in opted-in channels. These variables are prefixed with AUTOTHREADS_ and mapped via ConfigProvider.nested("autothreads") + ConfigProvider.constantCase.
The keyword that must appear in a channel’s topic for AutoThreads to activate in that channel. Any text channel whose topic contains this string will have every new user message automatically converted into a thread.
NoEmbed
TheNoEmbed service suppresses Discord link previews in opted-in channels. These variables are prefixed with NOEMBED_ and mapped via ConfigProvider.nested("noembed") + ConfigProvider.constantCase.
The keyword that must appear in a channel’s topic for NoEmbed to activate. Any channel whose topic contains this string will have link embeds suppressed.
Comma-separated list of URL substrings. Only embeds whose URL contains at least one of these substrings are suppressed. All others are left untouched.Example:
NOEMBED_URL_WHITELIST=effect.website,example.comComma-separated list of URL substrings. Embeds whose URL matches any of these are excluded from suppression, even if they match the whitelist. This lets you allow-list specific paths within an otherwise suppressed domain.Example:
NOEMBED_URL_EXCLUDE=effect.website/play,effect.website/replOpenTelemetry
The bot emits traces using Effect’s OTLP integration (shared/Otel.ts). When HONEYCOMB_API_KEY is absent, traces are sent to a local OTLP endpoint.
API key for Honeycomb. When set, traces are exported to
https://api.honeycomb.io/v1/traces with the x-honeycomb-team header.Read with Config.redacted and wrapped in Config.option — if not present, the tracer silently falls back to the local OTLP endpoint instead of failing at startup.Honeycomb dataset name. Also sets the OTLP
serviceName resource attribute. Defaults to "discord-bot" (the service name passed to TracerLayer).When
HONEYCOMB_API_KEY is not set, the tracer sends spans to http://localhost:4318. You can receive these locally with the Grafana OTEL stack included in docker-compose.yaml.Summary table
| Variable | Required | Default | Description |
|---|---|---|---|
DISCORD_BOT_TOKEN | Yes | — | Discord bot token |
OPENAI_API_KEY | Yes | — | OpenAI API key |
DEBUG | No | false | Enable verbose logging |
GITHUB_TOKEN | No | — | GitHub token for /issueify |
AUTOTHREADS_KEYWORD | No | [threads] | Channel topic keyword for auto-threading |
NOEMBED_KEYWORD | No | [noembed] | Channel topic keyword for embed suppression |
NOEMBED_URL_WHITELIST | No | effect.website | URLs to suppress embeds for |
NOEMBED_URL_EXCLUDE | No | effect.website/play | URLs to exempt from suppression |
HONEYCOMB_API_KEY | No | — | Honeycomb tracing API key |
HONEYCOMB_DATASET | No | discord-bot | Honeycomb dataset / service name |