⚙️ Configuration Overview
The bot's configuration is split across two files:
| File | Purpose | Commit to git? |
|---|---|---|
.env | Secrets — bot token, guild ID, channel ID | ❌ Never |
config.json | Structure — ticket types, messages, colours | ✅ Safe |
At startup, config.js reads both files, validates every value, and exits with a clear error message if anything is wrong.
File locations
Both files live in the project root (next to package.json), not inside the src/ directory.
fluxer-ticket-bot/
├── .env ← secrets (never commit)
├── .env.example ← template (safe to commit)
├── config.json ← structure (safe to commit)
├── config.example.json ← template
└── src/
└── ...
Top-level config.json fields
{
"prefix": "!ticket",
"channelNamePattern": "ticket-{type}-{username}-{id}",
"selectionTimeoutSecs": 60,
"allowMultipleOpenTickets": false,
"globalStaffRoles": [],
"panel": { ... },
"archive": { ... },
"ticketTypes": [ ... ]
}
| Field | Type | Default | Description |
|---|---|---|---|
prefix | string | "!ticket" | Command prefix for admin text commands |
channelNamePattern | string | "ticket-{type}-{username}-{id}" | Template for new channel names. Supports {type}, {username}, {id} |
selectionTimeoutSecs | number | 60 | Seconds before an unconfirmed ticket prompt auto-cancels |
allowMultipleOpenTickets | boolean | false | Set true to allow one user to have multiple open tickets simultaneously |
globalStaffRoles | string[] | [] | Role IDs that get read/write access to all ticket types (no ping) |
panel | object | — | Embed text and colour for the ticket selection panel |
archive | object | — | Controls transcript saving and delivery |
ticketTypes | array | — | The ticket categories users can open (1–9) |
Validation at startup
If your configuration has errors you'll see something like:
[TicketBot] ❌ Configuration Error
Configuration has 2 errors:
✗ ticketTypes[0] (id="general"): "categoryId" is missing or still a placeholder
✗ ticketTypes[1] (id="billing"): "supportRoles" must have at least one valid role ID
Check your config.json and .env files.
See config.example.json and .env.example for reference.
Fix each error and restart the bot.
Sections
- .env File Reference — all environment variables
- Ticket Types — defining ticket categories
- Panel Settings — customising the selection embed
- Archiving — transcript behaviour