> ## Documentation Index
> Fetch the complete documentation index at: https://docs.celestia.rest/llms.txt
> Use this file to discover all available pages before exploring further.

# Ticket System

> Support tickets with categories, panels, staff roles, and customizable messages

## Overview

The Ticket System lets members open private support channels that only they and the appropriate staff can see.

Administrators configure **categories** — each with its own staff roles, parent channel, close behavior, open-ticket limit, questions, and customizable ticket messages — and **panels** that members use to open tickets.

Category setup is handled through an interactive Components V2 configuration flow. Ticket actions such as claiming, closing, adding participants, and renaming are available directly inside ticket channels.

For custom panel designs, use Celestia's **Container Builder** with the ticket panel's `ticket_open:PANEL_ID` button instead of configuring the panel's appearance through the Ticket System.

***

## Features

<CardGroup cols={2}>
  <Card title="Categories" icon="folder">
    Configure staff roles, parent channel, close behavior, ticket limits, and open questions
  </Card>

  <Card title="Panels" icon="table-columns">
    Create ticket panels that open one category directly or let members choose from multiple categories
  </Card>

  <Card title="Claim & Close" icon="lock">
    Staff can claim a ticket and close it with an optional reason
  </Card>

  <Card title="Transcripts" icon="file-lines">
    Automatically generated and uploaded when a ticket is closed
  </Card>

  <Card title="Custom Messages" icon="pen">
    Replace the open, claim, or close messages with a saved container or embed
  </Card>

  <Card title="Participants" icon="users">
    Add or remove additional users from an open ticket
  </Card>
</CardGroup>

***

## Commands

<AccordionGroup>
  <Accordion title="ticket category create" icon="folder-plus">
    Opens an interactive setup flow to create a new ticket category.

    The setup lets you configure the category name, emoji, staff roles, parent channel, close behavior, maximum open tickets, questions, custom messages, and default ticket buttons.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket category create
      ```

      ```bash Example theme={null}
      /ticket category create
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket category edit" icon="pen-to-square">
    Edit an existing ticket category using the same interactive setup flow.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket category edit <category>
      ```

      ```bash Example theme={null}
      /ticket category edit Support
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket category delete" icon="trash">
    Delete a ticket category after confirmation.

    Panels or buttons pointing to the deleted category will stop offering it.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket category delete <category>
      ```

      ```bash Example theme={null}
      /ticket category delete Support
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket category list" icon="list">
    List every ticket category configured in the server, including its staff roles and maximum open-ticket limit.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket category list
      ```

      ```bash Example theme={null}
      /ticket category list
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket panel create" icon="square-plus">
    Create a ticket panel and choose which categories it offers.

    A panel with one category opens that category directly. A panel with multiple categories displays a category picker.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket panel create <name>
      ```

      ```bash Example theme={null}
      /ticket panel create Support Panel
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket panel send" icon="paper-plane">
    Post a ticket panel to a channel.

    The built-in panel uses a simple message with an **Open Ticket** button. Its appearance is intentionally kept simple so custom panel designs can be created through the Container Builder.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket panel send <panel> [channel]
      ```

      ```bash Example theme={null}
      /ticket panel send "Support Panel" #support
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket panel delete" icon="trash">
    Delete a ticket panel.

    Any button referencing the deleted panel, including buttons placed manually with the Container Builder, will stop working.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket panel delete <panel>
      ```

      ```bash Example theme={null}
      /ticket panel delete "Support Panel"
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket panel list" icon="list">
    List every ticket panel configured in the server.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket panel list
      ```

      ```bash Example theme={null}
      /ticket panel list
      ```
    </CodeGroup>

    **Permissions:** Manage Guild
  </Accordion>

  <Accordion title="ticket claim" icon="hand">
    Claim the ticket in the current channel.

    Only staff assigned to the ticket's category can claim it.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket claim
      ```

      ```bash Example theme={null}
      /ticket claim
      ```
    </CodeGroup>

    **Permissions:** Category staff, or Manage Guild
  </Accordion>

  <Accordion title="ticket close" icon="lock">
    Close the ticket in the current channel with an optional reason.

    Closing a ticket generates a transcript when possible and follows the category's configured close behavior.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket close [reason]
      ```

      ```bash Example theme={null}
      /ticket close
      /ticket close Resolved via DM
      ```
    </CodeGroup>

    **Permissions:** Category staff, or Manage Guild
  </Accordion>

  <Accordion title="ticket add" icon="user-plus">
    Add a user to the current ticket so they can view and send messages.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket add <user>
      ```

      ```bash Example theme={null}
      /ticket add @Zenith
      ```
    </CodeGroup>

    **Permissions:** Category staff, or Manage Guild
  </Accordion>

  <Accordion title="ticket remove" icon="user-minus">
    Remove a user from the current ticket.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket remove <user>
      ```

      ```bash Example theme={null}
      /ticket remove @Zenith
      ```
    </CodeGroup>

    **Permissions:** Category staff, or Manage Guild
  </Accordion>

  <Accordion title="ticket rename" icon="input-text">
    Rename the current ticket channel.

    <CodeGroup>
      ```bash Syntax theme={null}
      /ticket rename <name>
      ```

      ```bash Example theme={null}
      /ticket rename billing-question
      ```
    </CodeGroup>

    **Permissions:** Category staff, or Manage Guild
  </Accordion>
</AccordionGroup>

***

## Categories

A category defines how tickets in that category are created and managed.

Each category can configure:

* Name and emoji
* Staff roles who can view, claim, close, and manage tickets
* Parent category where ticket channels are created
* Close behavior
* Maximum number of open tickets per user
* Optional questions asked before opening the ticket
* Custom open, claim, and close messages
* Whether the default Claim and Close buttons are attached to the open message

<Info>
  Members with Manage Guild are always treated as staff for ticket management, even without an assigned staff role.
</Info>

### Close Behavior

A category can use one of two close behaviors:

* **Delete** — generates the transcript, sends the close message, then deletes the ticket channel after a short delay.
* **Lock** — generates the transcript, sends the close message, prevents the opener from sending messages, and renames the channel with a `closed-` prefix.

***

## Panels

A panel is the entry point members use to open tickets.

When creating a panel, you select which ticket categories it offers:

* A panel with **one category** shows a direct **Open Ticket** button.
* A panel with **multiple categories** shows a category picker when clicked.

The Ticket System intentionally does **not** include a panel message customization system.

Instead, panel functionality and panel design are separated:

* **Ticket System** — manages the panel, its categories, and the ticket-opening logic.
* **Container Builder** — controls the appearance and layout of a custom panel.

This means you can design a completely custom panel without duplicating panel-building functionality inside the Ticket System.

### Built-in Panels

Using `/ticket panel send` posts Celestia's built-in panel with an **Open Ticket** button.

This is the quickest way to get a working ticket panel without creating a custom design.

### Custom Panels

For a fully custom panel, create a container with Celestia's **Container Builder** and add a button using the panel's ticket-open custom ID:

`ticket_open:PANEL_ID`

Replace `PANEL_ID` with the ID of the ticket panel you want the button to open.

The button can be placed inside your custom container alongside your own text, separators, sections, thumbnails, and other supported Container Builder components.

<Info>
  The Container Builder handles the panel's presentation. The Ticket System handles what happens when the `ticket_open:PANEL_ID` button is clicked.
</Info>

<Warning>
  The `PANEL_ID` must reference an existing ticket panel. If the panel is deleted, buttons referencing it will stop working.
</Warning>

***

## Opening Tickets

When a member clicks an **Open Ticket** button, Celestia checks whether they are allowed to open another ticket in that category.

If the category has open questions configured, the member is shown a modal and must answer them before the ticket is created.

Each question and answer is preserved and displayed in the ticket's opening message.

<Info>
  The maximum number of open tickets is checked again when the question modal is submitted, preventing multiple simultaneous setup flows from bypassing the category limit.
</Info>

***

## Custom Messages

Each category can customize three ticket messages:

* **Open** — sent when a ticket is created
* **Claim** — sent when a staff member claims a ticket
* **Close** — sent when a ticket is closed

Each message can reference either a saved **container** or **embed** created with `/container` or `/embed`.

Leaving a message unset uses Celestia's built-in default.

### Open Message

The default open message includes:

* The category name and emoji
* The member who opened the ticket
* Each configured question and its answer
* The category's staff roles
* Claim and Close buttons when default buttons are enabled

### Default Buttons

Categories can control whether Celestia automatically attaches the default ticket buttons to the open message.

* **Default (on):** Claim and Close buttons are automatically appended to the open message.
* **Custom (off):** No buttons are appended. Your saved container must provide its own functional buttons.

This allows fully custom ticket layouts while keeping the default configuration simple.

### Action Button IDs

`ticket_open:PANEL_ID` • Open a ticket for the given panel

`ticket_claim:{ticket.id}` • Claim the current ticket

`ticket_close:{ticket.id}` • Close the current ticket

<Warning>
  Buttons must use these exact custom IDs to function. A duplicate custom ID in the same message will cause Discord to reject the message.
</Warning>

***

## Placeholders

Custom ticket messages support these placeholders:

<CardGroup cols={2}>
  <Card title="{ticket.category}" icon="folder">
    The ticket's category name
  </Card>

  <Card title="{ticket.id}" icon="hashtag">
    The ticket's numeric ID
  </Card>

  <Card title="{ticket.opener}" icon="user">
    Mention of the member who opened the ticket
  </Card>

  <Card title="{ticket.opener_tag}" icon="at">
    Username of the member who opened the ticket
  </Card>

  <Card title="{ticket.claimed_by}" icon="hand">
    Mention of the staff member who claimed the ticket
  </Card>

  <Card title="{ticket.close_reason}" icon="message">
    The reason given when the ticket was closed
  </Card>

  <Card title="{ticket.answer}" icon="reply">
    The member's answers to the category's open questions
  </Card>

  <Card title="{ticket.opened_at}" icon="clock">
    Timestamp the ticket was opened
  </Card>

  <Card title="{ticket.closed_at}" icon="clock">
    Timestamp the ticket was closed
  </Card>
</CardGroup>

***

## Transcripts

When a ticket is closed, a transcript is automatically generated and uploaded.

If transcript generation fails, the ticket still closes. The failure is logged instead of preventing the close operation.

If a category has a log channel configured, Celestia posts a summary there containing:

* Ticket category
* Member who opened the ticket
* Staff member who closed it
* Close reason, when provided
* Transcript link, when available

***

## Participants

Staff can manage additional ticket participants from inside an open ticket.

### Add

Adds a user to the ticket and grants them permission to view and send messages.

```bash theme={null}
/ticket add <user>
```

### Remove

Removes a user from the ticket and removes their explicit ticket permissions.

```bash theme={null}
/ticket remove <user>
```

***

## Ticket Management

Staff can also rename tickets directly from inside the ticket channel.

```bash theme={null}
/ticket rename <name>
```

Only staff assigned to the category, or members with Manage Guild, can manage tickets.

***

## Best Practices

* Keep staff roles scoped per category rather than granting broad access.
* Use open questions when a category needs context before the ticket is created.
* Use **Lock** instead of **Delete** when tickets need to remain available for manual review.
* Use `/ticket panel send` when you want a quick, ready-to-use panel.
* Use the Container Builder when you want complete control over the panel's appearance.
* Keep the default buttons enabled while testing custom open messages.
* When creating custom ticket buttons, use the exact ticket action custom IDs.
* Test custom containers before disabling the default Claim and Close buttons.

***

## Logging

Ticket actions can be logged to a category's configured log channel.

When configured, the log contains information about ticket closures, including:

* Ticket category
* Opener
* Closer
* Close reason
* Transcript link when available
