Skip to main content

⚙️ Configuration Overview

The bot's configuration is split across two files:

FilePurposeCommit to git?
.envSecrets — bot token, guild ID, channel ID❌ Never
config.jsonStructure — 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": [ ... ]
}
FieldTypeDefaultDescription
prefixstring"!ticket"Command prefix for admin text commands
channelNamePatternstring"ticket-{type}-{username}-{id}"Template for new channel names. Supports {type}, {username}, {id}
selectionTimeoutSecsnumber60Seconds before an unconfirmed ticket prompt auto-cancels
allowMultipleOpenTicketsbooleanfalseSet true to allow one user to have multiple open tickets simultaneously
globalStaffRolesstring[][]Role IDs that get read/write access to all ticket types (no ping)
panelobjectEmbed text and colour for the ticket selection panel
archiveobjectControls transcript saving and delivery
ticketTypesarrayThe 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