Skip to content

Configuration

Sayrix edited this page May 20, 2026 · 3 revisions

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.

Top-Level Options

OptionTypePurpose
clientIdstringDiscord application ID.
guildIdstringDiscord 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.
minimalTrackingbooleanReduces telemetry to bot/runtime version only.
showWSLogbooleanLogs websocket lifecycle events for telemetry/debugging.
logsobjectAudit log configuration.
statusobjectBot presence configuration.
ticketsobjectGlobal ticket behavior.
ticketTypesobjectAvailable ticket categories/types.
panelsobjectPublic messages users interact with to open tickets.

Status

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:

  • PLAYING
  • STREAMING
  • LISTENING
  • WATCHING
  • CUSTOM
  • COMPETING

Supported status values:

  • online
  • idle
  • dnd
  • invisible

The license requires visible attribution. Keeping the default powered-by text is the easiest way to satisfy that requirement.

Logs

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.

Global Ticket Options

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: { ... }}
OptionPurpose
channelNameTemplateDefault channel name for created tickets.
maxOpenPerUserMaximum open tickets per user. Use 0 for unlimited.
staffRoleIdsGlobal roles that can manage tickets.
blockedRoleIdsGlobal roles blocked from opening tickets.
mentionRoleIdsRoles mentioned in the ticket welcome message.
defaultWelcomeMessageDefault template under messages/.
defaultWelcomeContentRuntime text appended to the welcome message.

Channel Name Tokens

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}

Ticket Types

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: []}}

See Ticket Types and Forms.

Panels

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-select
  • button-select
  • buttons

See Panels.

Clone this wiki locally