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

# Messages & forms

> Everything the ticket system says, and how to collect information before a ticket opens.

## Ticket messages

Each option has its own set of messages, all written in the [scripting language](/scripting/overview).

```javascript theme={null}
!tickets option message <panel> <option> <kind> <script>
```

| Kind         | Sent when                                                                                   |
| ------------ | ------------------------------------------------------------------------------------------- |
| `greeting`   | The ticket is opened                                                                        |
| `claim`      | A staff member claims it                                                                    |
| `move`       | It's moved to another option                                                                |
| `close`      | It's closed                                                                                 |
| `reopen`     | It's reopened                                                                               |
| `auto_close` | It's closed automatically for inactivity                                                    |
| `inactivity` | The inactivity reminder fires                                                               |
| `denial`     | Someone lacking the [required roles](/setup/tickets/access#required-roles) tries to open it |

Aliases: `msg`.

### Variables

| Variable    | Value                                |
| ----------- | ------------------------------------ |
| `{case}`    | The ticket's case number             |
| `{panel}`   | The panel name                       |
| `{option}`  | The option name                      |
| `{creator}` | Who opened the ticket                |
| `{claimer}` | Who claimed it                       |
| `{reason}`  | The reason given on close or move    |
| `{user}`    | Whoever triggered the current action |

Plus every standard [variable](/scripting/variables) — `{guild.name}`, `{channel.mention}` and so on.

### Examples

<CodeGroup>
  ```javascript Greeting theme={null}
  !tickets option message Support general greeting {content: {creator.mention}} {title: Ticket #{case}} {description: Someone will be with you shortly. Describe your problem and include screenshots if you have them.} {color: #5cacec}
  ```

  ```javascript Claim theme={null}
  !tickets option message Support general claim {description: {claimer.mention} is handling this ticket.}
  ```

  ```javascript Inactivity nudge theme={null}
  !tickets option message Support general inactivity {content: {creator.mention}} {description: Still need help? This ticket closes automatically if there's no reply.}
  ```

  ```javascript Auto-close theme={null}
  !tickets option message Support general auto_close {description: Closed for inactivity. Open a new ticket if you still need help.}
  ```

  ```javascript Denial theme={null}
  !tickets option message Support billing denial {description: Billing support is for customers only.}
  ```
</CodeGroup>

A greeting with a container and useful links:

```javascript theme={null}
!tickets option message Support general greeting {content: {creator.mention}}
{box: #5cacec}
{box.header: Ticket #{case}}
{box.text: Thanks for reaching out. A member of staff will respond as soon as they can.

**While you wait:**
- Check #faq — most questions are answered there
- Include screenshots and your username if it's account-related}
{box.separator}
{box.text: -# opened by {creator} · {option}}
```

<Tip>
  Mention `{creator}` in `{content:}` rather than inside an embed. Mentions inside embeds render but don't notify.
</Tip>

## Forms

Forms collect information **before** the ticket channel is created, as a Discord modal. Instead of a ticket that says "hi", you get one that already contains everything you'd have had to ask for.

<CodeGroup>
  ```javascript Create a form theme={null}
  !tickets form add report "Report a User"
  ```

  ```javascript List forms theme={null}
  !tickets form list
  ```

  ```javascript Delete one theme={null}
  !tickets form remove report
  ```
</CodeGroup>

Arguments are the internal **name** and the **title** shown at the top of the modal. Requires ticket staff.

Forms are reusable across options, so one "report" form can back both a `#support` panel and a `#staff-only` panel.

<Info>
  Attach a form to an option, and add or edit its fields, through the interactive interface — `!tickets setup`. It's a modal builder; doing it through flat commands would be worse.
</Info>

Answers are posted into the ticket when it opens, and captured in the [transcript](/setup/tickets/transcripts).

### What to ask for

Keep it short — every field is friction, and Discord caps a modal at five.

<AccordionGroup>
  <Accordion title="User report">
    * Who are you reporting? (username or ID)
    * What did they do?
    * When did it happen?
    * Do you have evidence? (links or screenshots)
  </Accordion>

  <Accordion title="Ban appeal">
    * What's your user ID?
    * Why were you banned?
    * Why should we unban you?
  </Accordion>

  <Accordion title="Staff application">
    * How old are you?
    * What's your timezone?
    * How much time can you commit weekly?
    * Any previous moderation experience?
  </Accordion>

  <Accordion title="Bug report">
    * What happened?
    * What did you expect to happen?
    * How do we reproduce it?
  </Accordion>
</AccordionGroup>

## Opening tickets without the panel

```javascript theme={null}
!tickets open Support general "can't access voice channels"
```

Members can open a ticket by command. The subject is optional and becomes the initial context. Required roles, blacklists and ticket limits are all still enforced.

Useful when someone's already in a channel and you don't want to send them to `#support`.

## Command reference

| Command                                                   | Aliases               | Description              |
| --------------------------------------------------------- | --------------------- | ------------------------ |
| `tickets option message <panel> <option> <kind> <script>` | `msg`                 | Set a message            |
| `tickets form add <name> <title>`                         | `create`, `new`       | Create a form            |
| `tickets form list`                                       | `ls`                  | View forms               |
| `tickets form remove <name>`                              | `delete`, `del`, `rm` | Delete a form            |
| `tickets open <panel> <option> [subject]`                 | —                     | Open a ticket by command |
| `tickets setup`                                           | `configure`, `config` | Interactive builder      |
