> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/watch-admin-menu/features/tickets.md).

# Tickets

Players open a ticket with `/report`. Staff answer it from the **Tickets** tab of the menu or the **Tickets** page of the web panel, and both sides talk in the same thread until it is closed.

## For players

* `/report` opens the ticket window. Pick a category, write a subject and what happened, and send. Text after the command (`/report my car is stuck`) goes into the message box.
* Answers show as they arrive. A notice pops up when staff answer while the window is closed.
* The camera button attaches a screenshot (needs `screenshot-basic`).
* **My problem is solved, close it** closes the ticket. A ticket staff marked resolved closes itself after `resolvedCloseHours`, unless the player answers first.
* One open ticket per player at a time, and `cfg.reports.perHour` new ones per hour.

## For staff

The inbox has the list on the left, the conversation in the middle and the ticket's fields on the right. It updates by itself, in game and on the web.

| Control            | What it does                                                                                                                                                |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Filters            | Active, Needs answer, Mine, Unassigned, Waiting on player, Resolved, Closed, All, plus category, priority and a search over subject, player name and `#id`. |
| Reply              | Sent to the player. Answering a ticket nobody has takes it and sets it to *Waiting on player*.                                                              |
| Internal note      | Only staff see it. Never sent to the player.                                                                                                                |
| Claim, Assigned to | Take it, or hand it to a staff member (they get a notice), or to nobody.                                                                                    |
| Priority           | Low, Normal, High, Urgent. The category sets where it starts.                                                                                               |
| Status             | Open, Claimed, Waiting on player, Resolved. Closing is its own button.                                                                                      |
| Close, Reopen      | Closing sends the transcript to Discord. A closed ticket can be reopened unless the player opened a newer one.                                              |
| Timers             | How long it has been open and how long the first answer took. Unanswered past `firstAnswerMinutes` is marked overdue.                                       |
| Player             | Go to, bring, open the player in game; on the web, show them on the map.                                                                                    |

The sidebar badge is the number of tickets waiting for a staff answer. Staff can also answer with a [voice note](https://docs.rainmad.com/resources/watch-admin-menu/features/voice-notes-and-staff-voice).

## Transcript

When a ticket closes, the whole thread (internal notes included) goes to the `reports` webhook in `server/discord_log.lua` as a text file, with its screenshots.

## Configuration

```lua
cfg.reports = {
    command = 'report',
    perHour = 5,           -- tickets one player may open per hour
}

cfg.tickets = {
    categories = {         -- first one preselected; priority 1 low, 2 normal, 3 high, 4 urgent
        { id = 'general', label = 'Question or help', priority = 2 },
        { id = 'player', label = 'Report a player', priority = 3 },
        { id = 'bug', label = 'Bug or stuck', priority = 3 },
        { id = 'refund', label = 'Refund or lost items', priority = 2 },
        { id = 'other', label = 'Something else', priority = 1 },
    },
    firstAnswerMinutes = 10,
    resolvedCloseHours = 24,
    maxMessages = 100,         -- messages in one ticket before the player waits for staff
    screenshots = true,
    maxScreenshots = 3,        -- per ticket
    keepAttachmentsDays = 30,  -- screenshots of closed tickets are deleted after this; 0 keeps them
    transcript = true,
}
```

Renaming a category `id` leaves the tickets already filed under the old one as they are.

## Permissions

All in the **Tickets** category, moderator by default: `ticket:list`, `ticket:view`, `ticket:claim`, `ticket:assign`, `ticket:reply`, `ticket:note`, `ticket:priority`, `ticket:category`, `ticket:status`, `ticket:close`, `ticket:reopen`, and the reads `ticket:staff`, `ticket:attachment`, `ticket:who`, `ticket:stats`.

{% hint style="info" %}
**Updating from an older rm\_watch with reports:** nothing is lost. Tickets use the same tables, every report keeps its number, and a group's report rights carry over to the ticket actions.
{% endhint %}

{% hint style="info" %}
**RedM:** a key for the ticket window is a game control in `cfg.tickets.key` (off by default). `/report` always works.
{% endhint %}
