Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 287
Configuration
Ticket-Bot is configured with config/config.ts. The example file is config/config.example.ts.
The file exports:
import{defineConfig}from"@/config/index.js";exportdefaultdefineConfig("0.0.1",{// options here});Keep the version string as "0.0.1" unless the project adds a newer config version.
| Option | Type | Purpose |
|---|---|---|
clientId | string | Discord application ID. |
guildId | string | Discord server ID where commands and panels are installed. |
lang | "en" or "fr" | Bot language. |
uuidType | "uuid" or "emoji" | Transcript ID style for ticket.pm uploads. |
minimalTracking | boolean | Reduces telemetry to bot/runtime version only. |
showWSLog | boolean | Logs websocket lifecycle events for telemetry/debugging. |
logs | object | Audit log configuration. |
status | object | Bot presence configuration. |
tickets | object | Global ticket behavior. |
ticketTypes | object | Available ticket categories/types. |
panels | object | Public messages users interact with to open tickets. |
status controls the bot presence shown in Discord.
status: {enabled: true,text: "Powered by git.new/ticketbot",type: "WATCHING",url: "https://twitch.tv/example",status: "online"}Supported type values:
PLAYINGSTREAMINGLISTENINGWATCHINGCUSTOMCOMPETING
Supported status values:
onlineidledndinvisible
The license requires visible attribution. Keeping the default powered-by text is the easiest way to satisfy that requirement.
logs: {enabled: true,channelId: "171717171717171717",events: {ticketCreate: true,ticketClaim: true,ticketUnclaim: true,ticketClose: true,ticketDelete: true,userAdded: true,userRemoved: true,ticketRename: true}}Set enabled to false to disable audit logging. Omit events to enable every supported log type.
See Logging.
tickets: {channelNameTemplate: "{ticketNumber}-ticket-{username}",maxOpenPerUser: 1,staffRoleIds: ["111111111111111111"],blockedRoleIds: ["222222222222222222"],mentionRoleIds: ["333333333333333333"],defaultWelcomeMessage: "tickets/ticket-opened",defaultWelcomeContent: "A staff member will be with you shortly.",claims: { ... },close: { ... }}| Option | Purpose |
|---|---|
channelNameTemplate | Default channel name for created tickets. |
maxOpenPerUser | Maximum open tickets per user. Use 0 for unlimited. |
staffRoleIds | Global roles that can manage tickets. |
blockedRoleIds | Global roles blocked from opening tickets. |
mentionRoleIds | Roles mentioned in the ticket welcome message. |
defaultWelcomeMessage | Default template under messages/. |
defaultWelcomeContent | Runtime text appended to the welcome message. |
Ticket channel templates can use:
{ticketNumber}{ticketId}{ticketTypeKey}{ticketTypeName}{createdById}{createdByUsername}{userId}{username}
Claim rename templates can also use:
{claimerId}{claimerMention}{claimerUsername}{createdById}{createdByMention}{createdByUsername}{ticketId}{ticketNumber}{ticketTypeKey}{ticketTypeName}{userId}{username}
Each ticketTypes entry defines one support category.
ticketTypes: {general: {name: "General Support",description: "General help and account questions.",emoji: "<:ticket:171717171717171717>",categoryId: "777777777777777777",channelNameTemplate: "{ticketNumber}-general-{username}",message: "tickets/ticket-opened",welcomeContent: "Tell us what you need help with.",blockedRoleIds: [],staffRoleIds: []}}Panels are messages that let users open tickets.
panels: {supportSelect: {channelId: "141414141414141414",message: "tickets/open-panel",content: "Choose the ticket type that fits your issue best.",opener: {type: "inline-select",ticketTypes: ["general","billing","report"],placeholder: "Open a ticket"}}}Supported opener types:
inline-selectbutton-selectbuttons
See Panels.