OmegaBot uses .env for required credentials, optional feature flags, and runtime settings.
This page is the config reference. For feature-specific walkthroughs, use the dedicated setup pages such as Notion Wiki Setup.
Create a local env file from the example:
cp .env.example .envThen fill in at least the required Discord values before starting the bot.
Important:
- do not commit
.env - treat
.envvalues as secrets unless they are clearly non-sensitive - restart the bot after changing runtime config
These are required for OmegaBot to start normally:
DISCORD_TOKEN=your-bot-token
DISCORD_APP_ID=your-application-id
DISCORD_GUILD_ID=your-guild-idDISCORD_TOKEN- bot token from the Discord Developer PortalDISCORD_APP_ID- application ID used for command registrationDISCORD_GUILD_ID- guild ID used for scoped command registration
Without these, the bot cannot fully boot or register slash commands correctly.
OmegaBot uses SQLite via better-sqlite3.
DATABASE_PATH=data/omegabot.db- default:
data/omegabot.db - use
:memory:in tests when you want an in-memory database - server configuration such as welcome channels, welcome message text, starboard, rules, moderator roles, self-assignable roles, and leveling settings is stored in SQLite
METRICS_PORT=0METRICS_PORT- enables
/healthand/metricswhen set to a non-zero value - example:
9090
- enables
ADMIN_DASHBOARD_TOKEN- optional token for
/dashboardand/ - useful when exposing the metrics/dashboard port outside localhost
- optional token for
If METRICS_PORT is unset or 0, the HTTP monitoring server stays disabled.
REMINDER_TIMING_LOGS=0- set to
1to emit extra debug timing logs for the reminder scheduler
When running the optional API with npm run api, these values apply:
WEB_API_PORT=4000WEB_API_PORT- HTTP port for the API serverWEB_API_KEY- optional API key for authenticated write endpointsDISCORD_OAUTH_CLIENT_ID- required for Discord OAuth login on the web sideDISCORD_OAUTH_CLIENT_SECRET- required for the OAuth callback exchangeDISCORD_OAUTH_REDIRECT_URI- optional explicit callback URL overrideWEB_APP_URL- optional post-login redirect targetCORS_ORIGIN- optional CORS allow-origin value
See Web platform for the full web/API flow.
If optional config is missing, OmegaBot should disable that feature cleanly rather than crash.
SUMMARY_MODE=local
OPENAI_API_KEY=your-openai-keySUMMARY_MODElocalfor heuristic/local summariesllmfor OpenAI-backed summaries
OPENAI_API_KEY- required when
SUMMARY_MODE=llm
- required when
WEATHERAPI_KEY=your-weatherapi-key- required for weather commands
- if missing, weather commands return a friendly error instead of crashing the bot
Get a key from https://www.weatherapi.com/.
GITHUB_TOKEN=your-github-pat
GITHUB_OWNER=org-or-user
GITHUB_REPO=repo-nameRecommended token permissions:
- Contents: Read
- Issues: Read
- Pull Requests: Read
GITHUB_ANNOUNCE_CHANNEL_ID=channel-id
GITHUB_PR_ANNOUNCE_CHANNEL_ID=channel-id
GITHUB_ASSIGNEE_ANNOUNCE_CHANNEL_ID=channel-idIf these channels are not configured, GitHub announcement features stay disabled.
JOKE_MODERATOR_ROLE_ID=Recommended setup:
- create a role such as
Joke Moderator - assign it to trusted members
- paste the role ID into
.env
HANGMAN_ADMIN_ROLE_ID=Users with this role can add and list Hangman words via /fun hangman words add and /fun hangman words list.
If unset, only the built-in word list is available.
ADMIN_USER_IDS=123456789012345678,987654321098765432
MODERATION_ALLOWED_ROLE_IDS=111111111111111111ADMIN_USER_IDS- comma-separated Discord user IDs
- allows those users to run
/adminmoderation commands even without moderator roles
MODERATION_ALLOWED_ROLE_IDS- optional comma-separated role IDs
- when set, these roles become the stricter allowlist for timeout/kick/ban actions
If MODERATION_ALLOWED_ROLE_IDS is unset, normal moderator access rules apply instead.
See FAQ for Server Admins for the behavior breakdown.
BOT_ADMIN_ROLE_IDS=111111111111111111,222222222222222222
BOT_ADMIN_AUDIT_CHANNEL_ID=333333333333333333BOT_ADMIN_ROLE_IDS- comma-separated role IDs for broader documentation/knowledge-base admin access
- applies to actions like
/faq add,/faq remove,/notion status,/notion templates,/notion create-page, and/notion add
BOT_ADMIN_AUDIT_CHANNEL_ID- optional audit channel for lightweight admin/audit messages
- the bot role must have View Channel and Send Messages in that channel
This lets you delegate docs and Notion maintenance without handing out full moderation powers.
NOTION_TOKEN=secret_xxx
NOTION_DATABASE_ID=0123456789abcdef0123456789abcdef
NOTION_INVITE_URL=https://www.notion.so/your-workspace/Your-Wiki-Page-Id?source=copy_linkNOTION_TOKEN- internal Notion integration token
- the integration needs Notion capabilities for Read content, Update content, and Insert content
NOTION_DATABASE_ID- the specific database OmegaBot should search and write to
NOTION_INVITE_URL- optional share/invite URL to show in welcome or onboarding messages
- intended for users; not used by the Notion API client for search/create
Notion-related commands enabled by this setup:
/wiki/notion search/notion status/notion templates/notion create-page/notion add
Use Notion Wiki Setup for the full workflow, including the critical "share the database with the integration" step.
DISCORD_ENABLE_GUILD_MEMBERS_INTENT=false
DISCORD_ENABLE_MESSAGE_CONTENT_INTENT=falseDISCORD_ENABLE_GUILD_MEMBERS_INTENT- required for member-join flows like auto-role and welcome logic
DISCORD_ENABLE_MESSAGE_CONTENT_INTENT- required for DM and
@mentionchat behavior
- required for DM and
If you set either to true in .env, you must also enable the same intent in the Discord Developer Portal.
OmegaBot still always requests its normal non-privileged core intents in code.
Welcome messages are configured with slash commands and stored in SQLite:
/config welcome set channel:#welcome
/config welcome set-message text:"Welcome {user} to {server}!"
/config welcome test
The message supports {user}, {name}, {username}, and {server}.
If no custom message is set, OmegaBot uses a generic built-in welcome message
with the server name. Use /config welcome set-message for server-specific
links, rules, forms, or onboarding instructions.
DISCORD_WELCOME_CHANNEL_ID is only an environment fallback for simple
single-server deployments. Prefer /config welcome set because it persists the
channel in the database per server.
Welcome-on-join requires:
DISCORD_ENABLE_GUILD_MEMBERS_INTENT=true- Discord Developer Portal → Bot → Privileged Gateway Intents → Server Members Intent
- bot permissions in the welcome channel: View Channel and Send Messages
OmegaBot is designed to fail fast for required config and degrade gracefully for optional config.
That means:
- required Discord config should stop startup quickly
- optional features like weather, GitHub, Notion, or LLM-backed summaries should log clear status and disable themselves cleanly when not configured
When in doubt, check startup logs and the relevant feature setup page.