-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
409 lines (356 loc) · 13.7 KB
/
.env.example
File metadata and controls
409 lines (356 loc) · 13.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# ============================================================
# OmegaBot Environment Configuration (EXAMPLE)
# ============================================================
#
# Copy this file to `.env` and fill in real values.
# NEVER commit `.env` with secrets.
#
# Quick setup:
# cp .env.example .env
# # Edit .env and add your bot token, app ID, and guild ID
# npm run register
# npm start
#
# ============================================================
# Discord (REQUIRED)
# ============================================================
# Your Discord bot token from the Developer Portal
# Get it from: https://discord.com/developers/applications
# Location: Your App → Bot → Token
#
# IMPORTANT: Keep this secret! Never commit it to git.
DISCORD_TOKEN=
# Your Discord application ID (also called Client ID)
# Get it from: https://discord.com/developers/applications
# Location: Your App → General Information → Application ID
#
# Used for: Slash command registration
DISCORD_APP_ID=
# Your development server (guild) ID
# Get it by: Right-click your server → Copy ID
# (Requires Developer Mode enabled in Discord settings)
#
# Purpose:
# - If set: Commands register to this guild (instant, recommended for dev)
# - If unset: Commands register globally (takes ~1 hour to appear)
DISCORD_GUILD_ID=
# ============================================================
# Discord Gateway Intents (OPTIONAL)
# ============================================================
# Privileged Discord intents are disabled by default.
# Set these to true only when you also enable the matching toggle in:
# Discord Developer Portal → Your App → Bot → Privileged Gateway Intents.
#
# Required for member-join flows:
# - welcome messages
# - auto-role assignment
DISCORD_ENABLE_GUILD_MEMBERS_INTENT=false
# Required for message-content flows:
# - DM / @mention chat
# - message XP / leveling
DISCORD_ENABLE_MESSAGE_CONTENT_INTENT=false
# ============================================================
# Discord Welcome & Onboarding (OPTIONAL)
# ============================================================
# Optional channel ID where welcome messages should be sent.
# Get it by: Right-click the channel → Copy ID.
#
# If unset, OmegaBot uses the configured server system channel,
# then falls back to the first text channel it can send to.
# Requires DISCORD_ENABLE_GUILD_MEMBERS_INTENT=true below.
DISCORD_WELCOME_CHANNEL_ID=
# ============================================================
# Discord Role Automation (OPTIONAL)
# ============================================================
# Auto-assign role ID for new members when they join the server.
#
# If set, the bot will attempt to assign this role on guildMemberAdd.
# If unset, auto-role assignment is skipped.
#
# Requirements:
# - Must be a numeric role ID (not a role name)
# - Bot requires "Manage Roles" permission
# - Bot's role must be ABOVE this role in the role hierarchy
# - "Server Members Intent" must be enabled in Developer Portal
#
# Get it by: Server Settings → Roles → Right-click role → Copy ID
DISCORD_AUTO_ROLE_ID=
# ============================================================
# Admin / Moderation (OPTIONAL)
# ============================================================
# Comma-separated Discord user IDs allowed to use /admin (timeout, kick, ban).
# Get your user ID: Enable Developer Mode → Right-click yourself → Copy ID
#
# These users can run admin moderation even without Discord Administrator or
# moderator roles. If unset, only server roles (Administrator, Manage Server,
# Moderate Members, or roles added via /config moderator-role) can use /admin.
#
# Example: ADMIN_USER_IDS=123456789012345678,987654321098765432
ADMIN_USER_IDS=
# Optional: Restrict timeout/kick/ban to specific roles only.
# Comma-separated role IDs; e.g. MODERATION_ALLOWED_ROLE_IDS=111111111,222222222
#
# If set: only users with one of these roles (or in ADMIN_USER_IDS above) can use
# /admin timeout, kick, and ban. Stats and health remain available to anyone with
# normal moderator permissions.
#
# If unset: anyone with Administrator, Manage Server, Moderate Members, or a role
# added via /config moderator-role can use moderation.
#
# Get role ID: Server Settings → Roles → Right-click role → Copy ID
MODERATION_ALLOWED_ROLE_IDS=
# ============================================================
# Bot Admin / Knowledge Base Admin (OPTIONAL)
# ============================================================
# Optional: broader role allowlist for non-moderation admin tasks such as:
# - /faq add
# - /faq remove
# - /notion status
# - /notion create-page
#
# Users in ADMIN_USER_IDS still work too, and Discord Administrator / Manage Server
# also count as bot-admin access.
#
# Example: BOT_ADMIN_ROLE_IDS=111111111111111111,222222222222222222
BOT_ADMIN_ROLE_IDS=
# Optional: channel ID that receives lightweight audit messages when admins curate
# docs or create Notion pages.
#
# Example: BOT_ADMIN_AUDIT_CHANNEL_ID=123456789012345678
BOT_ADMIN_AUDIT_CHANNEL_ID=
# ============================================================
# Notion Wiki Integration (OPTIONAL)
# ============================================================
# Internal integration token from Notion
# Create it at: https://www.notion.so/my-integrations
#
# Share your target wiki database with the integration after creating it.
NOTION_TOKEN=
# The database ID for the Notion wiki database the bot should search/create pages in.
# You can find it in the Notion URL after the workspace slug.
#
# Example URL:
# https://www.notion.so/<workspace>/<database-name>-0123456789abcdef0123456789abcdef?v=...
# Database ID:
# 0123456789abcdef0123456789abcdef
NOTION_DATABASE_ID=
# Optional: public share/invite URL for your Notion wiki.
# Use this in welcome/onboarding messaging so new members can open the wiki quickly.
#
# Example:
# NOTION_INVITE_URL=https://www.notion.so/From-Zero-Wiki-303c98a25b2381088fdec934ed15897a?source=copy_link
NOTION_INVITE_URL=
# ============================================================
# Fun Commands - Joke Moderation (OPTIONAL)
# ============================================================
# Role ID for users who can moderate jokes (remove inappropriate ones)
# Get it by: Server Settings → Roles → Right-click role → Copy ID
#
# Users with this role can use:
# - /fun joke remove <id> → Delete jokes from the database
#
# If unset, only the bot owner can remove jokes.
#
# Recommended setup:
# 1. Create a "Joke Moderator" role in your Discord server
# 2. Assign it to trusted members
# 3. Add the role ID here
JOKE_MODERATOR_ROLE_ID=
# ============================================================
# Hangman - Word Management (OPTIONAL)
# ============================================================
# Role ID for users who can add/list Hangman words.
# Get it by: Server Settings → Roles → Right-click role → Copy ID
#
# Users with this role can use:
# - /fun hangman words add <word> <difficulty>
# - /fun hangman words list [difficulty]
#
# If unset, only the built-in word list is used and no one can add words.
HANGMAN_ADMIN_ROLE_ID=
# ============================================================
# AI Services (OPTIONAL)
# ============================================================
# Anthropic API key for Claude AI
# Get it from: https://console.anthropic.com/
# Used for: /gh history, /gh summary; /fun chat (if OPENAI_API_KEY is not set)
# Cost: ~$0.003 per summary (much cheaper than ChatGPT!)
ANTHROPIC_API_KEY=
# ============================================================
# Weather (OPTIONAL)
# ============================================================
# API key from WeatherAPI.com
# Get it from: https://www.weatherapi.com/signup.aspx
# Free tier: 1,000,000 calls/month
#
# Used for:
# - /fun weather → Current weather conditions
# - /fun weather7 → 7-day forecast
#
# Features:
# - Current weather with feels-like temperature
# - Multi-day forecasts
# - Sunrise / sunset times
# - Automatic timezone resolution
#
# If unset, weather commands return a friendly error message
WEATHERAPI_KEY=
# ============================================================
# GitHub Integration (OPTIONAL)
# ============================================================
# Personal Access Token (PAT) for GitHub API access
# Create one: https://github.com/settings/tokens
#
# Recommended: Fine-grained token with specific repository access
# Minimum repository permissions:
# - Issues: Read
# - Pull requests: Read
# - Contents: Read (optional, for file lookups)
#
# Classic token scopes (if using classic PAT):
# - repo (or public_repo for public repos only)
#
# NOTE:
# For organization-owned repositories, this token may require
# approval by an organization admin before it works.
GITHUB_TOKEN=
# GitHub repository owner (organization or username)
# Example: octocat
GITHUB_OWNER=
# GitHub repository name (without owner prefix)
# Example: hello-world
GITHUB_REPO=
# ============================================================
# GitHub Announcement Channels (OPTIONAL)
# ============================================================
# These channels receive automated GitHub notifications.
# All are optional. If unset, that type of announcement is disabled.
#
# Get channel IDs by: Right-click channel → Copy ID
# Legacy fallback channel for GitHub announcements
# If set, it will be used as the default for any announcement type
# that doesn't have its own specific channel configured below.
GITHUB_ANNOUNCE_CHANNEL_ID=
# Channel for pull request announcements
# Receives:
# - New PR created
# - New PR announcements from prPoller
#
# Note: PR assignee changes and PR status updates are NOT announced
# (filtered out to reduce noise - only Issues trigger these notifications)
#
# If unset, falls back to GITHUB_ANNOUNCE_CHANNEL_ID
GITHUB_PR_ANNOUNCE_CHANNEL_ID=
# Channel for Issue activity (assignees and closures)
# Receives:
# - Assignee added to ISSUE (not PRs)
# - Assignee removed from ISSUE (not PRs)
# - Self-assignment notifications for ISSUES
# - ISSUE closed
#
# Note: PR assignee changes and closures are NOT announced here
# (filtered out to reduce noise)
#
# If unset, falls back to GITHUB_ANNOUNCE_CHANNEL_ID
# If neither is set, assignee polling is disabled
GITHUB_ASSIGNEE_ANNOUNCE_CHANNEL_ID=
# ============================================================
# GitHub Polling Settings (OPTIONAL)
# ============================================================
# How often to check GitHub for updates (in milliseconds)
#
# Default: 60000 (60 seconds, recommended)
# Minimum: 30000 (30 seconds, avoid going lower to prevent rate limits)
# Maximum: 300000 (5 minutes, for low-traffic repos)
#
# Note: GitHub API has rate limits:
# - Authenticated: 5,000 requests/hour
# - Unauthenticated: 60 requests/hour
GITHUB_POLL_INTERVAL_MS=60000
# ============================================================
# Logging (OPTIONAL)
# ============================================================
# Log level determines what gets logged
#
# Options (from most to least verbose):
# - trace → Everything (very noisy, debug only)
# - debug → Detailed debugging information
# - info → General informational messages (recommended)
# - warn → Warnings and recoverable errors
# - error → Errors only
# - fatal → Critical failures only
#
# Default: info
LOG_LEVEL=info
# Pretty-print logs for human readability
#
# Options:
# - true → Formatted logs (good for local development)
# - false → JSON logs (good for production/log aggregation)
#
# Default: true
LOG_PRETTY=true
# Colorize pretty logs
#
# Options:
# - true → Always emit ANSI color codes
# - false → Never emit ANSI color codes
# - unset → Auto-detect terminal support
#
# Default: unset
# LOG_COLOR=false
# ============================================================
# Advanced: Database (OPTIONAL)
# ============================================================
# Path to SQLite database file (games, quotes, giveaways, reminders, etc.)
#
# Default: data/omegabot.db
DATABASE_PATH=data/omegabot.db
# Number of backups to keep in data/backups/ (default: 7)
# Used by: npm run db:backup
BACKUP_KEEP=7
# ============================================================
# Metrics & Health HTTP Server (OPTIONAL)
# ============================================================
# Port for /health and /metrics (Prometheus) endpoints.
# If 0 or unset, the HTTP server is disabled.
# Example: METRICS_PORT=9090
METRICS_PORT=0
# Optional: Require ?token=<value> to access /dashboard and /.
# If unset, dashboard is open (OK for localhost; set when exposing publicly).
# Example: ADMIN_DASHBOARD_TOKEN=your-secret-token
ADMIN_DASHBOARD_TOKEN=
# ============================================================
# AI Services (OPTIONAL)
# ============================================================
#
# OmegaBot can summarize recent channel messages using either:
# - Local mode (no API calls, free, lower quality)
# - LLM mode (uses OpenAI, higher quality)
#
# Commands that use summarization:
# - /summary → DM you a summary of recent messages
#
# History command does NOT use an LLM:
# - /history → DMs raw recent messages (no AI)
#
# Summary mode:
# - local → Use lightweight local summarizer (default, no API key needed)
# - llm → Use OpenAI for higher quality summaries (requires OPENAI_API_KEY)
SUMMARY_MODE=local
# OpenAI API Key (required only if SUMMARY_MODE=llm)
# Get it from: https://platform.openai.com/api-keys
#
# Used for:
# - /summary (when SUMMARY_MODE=llm)
# - /fun chat (if set; otherwise /fun chat uses ANTHROPIC_API_KEY)
#
# IMPORTANT: Keep this secret. Never commit it to git.
OPENAI_API_KEY=
# Optional: Override which model is used for LLM summaries.
# If unset, the bot will use a safe default (ex: gpt-4o-mini).
#
# Examples:
# OPENAI_MODEL=gpt-4o-mini
# OPENAI_MODEL=gpt-4o
OPENAI_MODEL=