Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
230 lines (186 loc) · 9.25 KB
/
Copy path.env.example
File metadata and controls
230 lines (186 loc) · 9.25 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
# ================================================================
# CTFBot Environment Configuration
# ================================================================
# Copy this file to .env and fill in your values
# Never commit .env to version control!
# ----------------------------------------------------------------
# Discord Bot Configuration (REQUIRED)
# ----------------------------------------------------------------
# Your Discord bot token from https://discord.com/developers/applications
# 1. Go to Discord Developer Portal
# 2. Select your application
# 3. Go to "Bot" section
# 4. Click "Reset Token" or "Copy" to get your token
DISCORD_TOKEN=your_discord_bot_token_here
# ----------------------------------------------------------------
# Development Configuration (OPTIONAL)
# ----------------------------------------------------------------
# Guild (Server) ID for instant command registration during development
# When set, slash commands will appear instantly in this server
# When empty, commands are registered globally (takes up to 1 hour)
# To get your server ID, enable Developer Mode in Discord, then right-click the
# server and copy the ID
GUILD_ID=
# Environment mode (development, production, staging)
NODE_ENV=development
# Bot owner IDs (comma-separated Discord user IDs)
# These users will have access to owner-only commands (if implemented)
# Example is OWNERS=123456789012345678,987654321098765432
OWNERS=
# ----------------------------------------------------------------
# Admin Configuration (OPTIONAL)
# ----------------------------------------------------------------
# Admin user IDs (comma-separated Discord user IDs)
# Users with these IDs will bypass all permission checks and have full access.
# When set in environment, this takes precedence over the database.
# Example is ADMIN_IDS=123456789012345678,987654321098765432
# Default is 470159562918592512
ADMIN_IDS=470159562918592512
# ----------------------------------------------------------------
# CTF Configuration (REQUIRED)
# ----------------------------------------------------------------
# Category ID where CTF channels will be created
# 1. Create a category in your Discord server (e.g., "CTF Competitions")
# 2. Right-click the category > Copy ID (Developer Mode must be enabled)
# 3. Paste the ID here
CTF_CATEGORY_ID=
# ----------------------------------------------------------------
# CTF Platform Credentials (OPTIONAL)
# ----------------------------------------------------------------
# Platform credentials are NOT read from the environment. They are stored per
# CTF in the database and set from Discord with /setctfplatform, because two
# CTFs running at the same time can use different platforms with different
# tokens.
#
# /setctfplatform platform:ctfd api_token:<token>
# /setctfplatform platform:noctf api_base_url:https://api-k17ctf.secso.cc api_token:<token> division_id:2
# /setctfplatform show:true
#
# CTFd sends the token as `Authorization: Token <api_token>` and serves its API
# from the same origin as its web UI. api_base_url can therefore be left unset.
# noCTF sends it as `Authorization: Bearer <token>` from a separate API origin
# and scopes its scoreboard to a division. Both api_base_url and division_id
# are therefore usually needed. A noCTF session token lasts 7 days and cannot be
# refreshed. Replace it periodically with /setctfplatform.
#
# CTFD_API_TOKEN is no longer read by the bot. Per-CTF platform credentials
# replaced it. It is left here so an existing .env keeps a familiar key.
CTFD_API_TOKEN=
# ----------------------------------------------------------------
# Database Configuration (OPTIONAL)
# ----------------------------------------------------------------
# ----------------------------------------------------------------
# Luce Blockchain Configuration (OPTIONAL)
# ----------------------------------------------------------------
# Port where the Luce blockchain RPC server is listening (default 5500)
# The blockchain is assumed to run on the same machine (localhost-only RPC)
LUCE_PORT=5500
# ----------------------------------------------------------------
# Task Suggestions from Conversation (OPTIONAL)
# ----------------------------------------------------------------
# Watch governance channels and propose a task when admins decide to do
# something in the future (true/false). Requires the OpenAI-compatible
# settings below, and a model that supports tool calling.
# TASK_SUGGESTIONS_ENABLED=false
# Any OpenAI-compatible Chat Completions endpoint (OpenAI, OpenRouter, Groq,
# Ollama, vLLM, LiteLLM, ...). Defaults to https://api.openai.com/v1
# OPENAI_BASE_URL=https://api.openai.com/v1
# OPENAI_API_KEY=your_api_key_here
# Model name as your provider spells it (e.g. gpt-4o-mini)
# OPENAI_MODEL=your_model_here
# How long to wait for the model to reply, in milliseconds (default 300000,
# i.e. 5 minutes, which gives reasoning models time to think).
# OPENAI_TIMEOUT_MS=300000
# ----------------------------------------------------------------
# Proactive Chat (OPTIONAL)
# ----------------------------------------------------------------
# Let the bot speak up on its own in any channel, like a member of the server
# (true/false). Requires the OPENAI_* settings above.
# CHAT_ENABLED=false
# Wait this long after the last message before looking at a channel.
# CHAT_QUIET_MS=20000
# Never speak twice in one channel faster than this.
# CHAT_COOLDOWN_MS=360000
# Send budget per channel and for the whole guild per day. This keeps a busy
# server from running up an unbounded model bill.
# CHAT_MAX_PER_HOUR=5
# CHAT_MAX_PER_DAY=20
# CHAT_GUILD_MAX_PER_DAY=200
# Chance of speaking in a busy channel with no question, link or error to
# react to. Kept low on purpose. 0 makes the bot strictly reactive.
# CHAT_SPARK_PROBABILITY=0.02
# Whether the bot may talk without being addressed. false makes it answer only
# a mention, a reply, or a direct question.
# CHAT_UNPROMPTED_ENABLED=true
# Channels where the bot must never speak, comma-separated ids.
# CHAT_DENY_CHANNEL_IDS=
# Server-wide personality memory, the layer tuned with /memory global. Anyone
# may add a note, so it is capped and rate limited per member per day.
# CHAT_GLOBAL_MEMORY_MAX=60
# CHAT_GLOBAL_MEMORY_PER_DAY=5
# Longest proactive message, in characters.
# CHAT_MAX_MESSAGE_CHARS=600
# Pictures, GIFs and link previews. Images are read and sent to the model, a
# GIF as four frames (first, 25%, 50%, last). A provider without vision is
# detected once and the bot falls back to text.
# CHAT_VISION_ENABLED=true
# CHAT_VISION_MAX_IMAGES=6
# CHAT_VISION_MAX_WIDTH=1024
# CHAT_VISION_MAX_BYTES=8388608
# Documents dropped in a channel: PDF, DOCX, XLSX, CSV and TSV. The text is
# read into the prompt, so the bot can quote a spreadsheet or a report instead
# of guessing from the filename. Budgets are per file and per prompt; a file
# that cannot be read keeps its marker and costs only its text.
# CHAT_DOCUMENTS_ENABLED=true
# CHAT_DOCUMENT_MAX_FILES=3
# CHAT_DOCUMENT_MAX_BYTES=8388608
# CHAT_DOCUMENT_MAX_CHARS=12000
# CHAT_DOCUMENT_MAX_TOTAL_CHARS=24000
# CHAT_DOCUMENT_MAX_PAGES=30
# CHAT_DOCUMENT_MAX_ROWS=200
# CHAT_DOCUMENT_TIMEOUT_MS=15000
# Allow tool calling. Proactive chat needs it: replies and silence are tool
# calls, so false disables chat. Task suggestions use tools either way.
# LLM_TOOLS_ENABLED=true
# Google search for the bot, via https://serpbase.dev. Keep the key here only.
# Never commit it. Rotate it if it leaks.
# SERPBASE_API_KEY=
# SERPBASE_DAILY_CREDITS=100
# SERPBASE_CACHE_HOURS=24
# SERPBASE_TIMEOUT_MS=10000
# SERPBASE_GL=id
# SERPBASE_HL=id
# ----------------------------------------------------------------
# Google Calendar Bidirectional Sync (OPTIONAL)
# ----------------------------------------------------------------
# Enable Google Calendar sync for tasks (true/false)
# GOOGLE_CALENDAR_ENABLED=false
# OAuth 2.0 credentials. Create a Google Cloud Project, enable the Calendar
# API and create an OAuth 2.0 Client ID (Desktop app type). Then run
# `pnpm google:auth` to obtain a refresh token with the calendar scope.
# GOOGLE_CLIENT_ID=your_client_id_here
# GOOGLE_CLIENT_SECRET=your_client_secret_here
# Shared Google Calendar ID (e.g. "primary" or "abc123@group.calendar.google.com")
# GOOGLE_CALENDAR_ID=your_calendar_id_here
# Long-lived refresh token obtained via the one-time OAuth consent flow.
# GOOGLE_REFRESH_TOKEN=your_refresh_token_here
# ----------------------------------------------------------------
# Database Configuration (OPTIONAL)
# ----------------------------------------------------------------
# Database file name (default ctfbot.db)
# The database file will be created in the project root
# DATABASE_FILE=ctfbot.db
# ----------------------------------------------------------------
# Logging Configuration (OPTIONAL)
# ----------------------------------------------------------------
# Log level controls the verbosity of console output.
# Available levels, least to most verbose, are error, warn, info, debug, trace
# - error Only fatal errors
# - warn Errors + warnings
# - info Normal operational messages (default)
# - debug Detailed debugging information
# - trace Everything including CTF platform HTTP request tracing
LOG_LEVEL=info
# Enable verbose logging for Sapphire framework internals
# Set to true when debugging framework-level issues
# VERBOSE_LOGGING=false