Skip to content

Configuration

Sayrix edited this page Apr 25, 2026 · 2 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";

export default defineConfig("0.0.1", {
  // options here
});

Keep the version string as "0.0.1" unless the project adds a newer config version.

Top-Level Options

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

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: { ... }
}
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.

Channel Name Tokens

Ticket channel templates can use:

  • {ticketNumber}
  • {ticketTypeKey}
  • {ticketTypeName}
  • {userId}
  • {username}

Claim rename templates can also use:

  • {claimerId}
  • {claimerUsername}
  • {createdById}
  • {createdByUsername}

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