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

# Tournaments

> One-off tournament registration with a confirmation feed, group generation and a self-serve slot manager.

# Tournaments

> One-off tournament registration with a confirmation feed, group generation and a self-serve slot manager.

## How tournaments work

A **tournament** is a single event rather than a daily recurring one. You open registration when you're ready, teams register in the registration channel, each confirmed team is posted to a **confirmation channel**, and registration closes when the slot count is reached. From there you can generate **groups** and post a **slot manager** panel that lets teams cancel or claim slots themselves.

All tournament commands live under `;tourney` (alias `;tournament`) and require **Manage Server**.

## Create a tournament

```bash theme={null} theme={null}
;tourney create reg:#register confirm:#confirmed slots:25 group:12 role:@Players name:Cup
```

Like scrims, `create` uses named flags and only `reg` is required.

<ParamField path="reg" type="channel" required>
  The registration channel. *Aliases: `channel`, `registration`.*
</ParamField>

<ParamField path="confirm" type="channel">
  Channel where a confirmation card is posted for each registered team.
</ParamField>

<ParamField path="slots" type="number" default="25">
  Total slots (2–1000). *Alias: `total`.*
</ParamField>

<ParamField path="group" type="number" default="0">
  Teams per group, used by `;tourney groups`. `0` means one single group. *Alias: `groupsize`.*
</ParamField>

<ParamField path="role" type="role">
  Role granted to every confirmed team.
</ParamField>

<ParamField path="mentions" type="number" default="4">
  Required teammate mentions per registration.
</ParamField>

<ParamField path="lines" type="number" default="0">
  Minimum non-empty lines per registration. `0` disables the check.
</ParamField>

<ParamField path="openrole" type="role">
  If set, only members with this role may register.
</ParamField>

<ParamField path="pingrole" type="role">
  Role pinged when registration opens.
</ParamField>

<ParamField path="name" type="string" default="Tournament">
  A label for the tournament.
</ParamField>

<ParamField path="format" type="string">
  Custom registration template format string using placeholders like `{name}`, `{index}`, `{player}`, `{ign}`, `{role}`. *Aliases: `regformat`, `template`.*
</ParamField>

## Registration Format

You can set or customize a registration format template for a tournament. When registration opens, the bot announces this exact format in the open notice so players know how to send their message.

```bash theme={null} theme={null}
;tourney format [id] Team name: {name}
{index}: {player} - {ign} | {role}
```

### Supported Placeholders

* `{name}` / `{team}` / `{team_name}` — Matches team name.
* `{index}` / `{num}` / `{slot}` — Matches slot or line number (e.g. `1:`).
* `{player}` / `{mention}` / `{user}` / `{owner}` — Matches user mention (e.g. `@player1`).
* `{ign}` — Matches in-game name.
* `{role}` — Matches in-game role (e.g. `Entry Fragger`, `Sniper`, `IGL`).

Use `;tourney format [id]` without arguments to view the active format, `;tourney format presets` to view pre-built format templates (such as `squad`, `duo`, `solo`), or `;tourney format [id] clear` to remove format validation.

## Running it

Commands take an optional **tournament id** (shown as `#3` on `;tourney list`). Omit it to target the tournament in the current channel.

<AccordionGroup>
  <Accordion title="Open & Close Registration">
    ```bash theme={null} theme={null}
    ;tourney open 3
    ;tourney close 3
    ```

    Unlike scrims, tournaments do not open on a schedule — you open them manually. Registration also closes automatically when every slot is filled.
  </Accordion>

  <Accordion title="Tournament Info & Status">
    ```bash theme={null} theme={null}
    ;tourney info 3
    ```

    Displays detailed breakdown of tournament status, slot progress, channels, roles, and configured registration format. *Aliases: `;tourney show`, `;tourney status`.*
  </Accordion>

  <Accordion title="Slots & Slot Management">
    ```bash theme={null} theme={null}
    ;tourney slot [id]           # View all registered teams and slot assignments
    ;tourney slot remove 5 [id]   # Remove a team from slot #5
    ;tourney slot manager [id]  # Post interactive slot manager panel
    ```

    * **View Slots**: `;tourney slot` (or `;tourney slots`, `;tourney teams`)
    * **Remove Slot**: `;tourney slot remove 5` (or `;tourney removeslot 5`, `;tourney kickteam 5`)
    * **Slot Manager Panel**: `;tourney slot manager` (or `;tourney slotmanager`, `;tourney slotm`)
  </Accordion>

  <Accordion title="Registration Format">
    ```bash theme={null} theme={null}
    ;tourney format [id] set (template)  # Set registration template
    ;tourney format presets             # View and apply pre-built format presets (squad, duo, solo)
    ;tourney format clear               # Clear custom format template
    ```

    Configures and enforces custom registration format rules.
  </Accordion>

  <Accordion title="Tournament List & Toggle">
    ```bash theme={null} theme={null}
    ;tourney list      # List all tournaments in the server
    ;tourney toggle 3  # Enable or disable a tournament
    ;tourney delete 3  # Delete a tournament
    ```
  </Accordion>
</AccordionGroup>

## Groups

Once teams are registered, split them into groups based on the `group` size set at creation.

```bash theme={null} theme={null}
;tourney groups 3
```

Posts the group lists to the confirmation channel (or the current channel if none is set). Each group lists its teams in slot order. *Aliases: `group`, `grp`.*

## Slot manager

The slot manager is a **persistent panel** that lets members manage their own slot without staff — handy after registration closes when a team drops out.

```bash theme={null} theme={null}
;tourney slotmanager 3
```

Posts the panel to the current channel and links it to the tournament. *Aliases: `slotm`, `panel`.*

### Interactive Buttons

* **Claim Slot (+)**: Takes a free slot. Opens a short form for the team name, assigns the next open number, and grants the team role.
* **Cancel Slot (✕)**: Releases the member's own slot, removes the team role, and deletes their confirmation card — freeing the number for someone else to claim.

<Note>
  The panel survives restarts — its buttons keep working indefinitely because it's registered as a persistent view. The filled/free counter updates live as teams register, claim, or cancel.
</Note>

## Bans

```bash theme={null} theme={null}
;tourney ban @user 3 cheating
;tourney unban @user 3
```

Banned users get a 🚫 reaction on any registration attempt and cannot claim a slot from the slot manager.

<Warning>
  raze toggles **Send Messages** on the registration channel to open and close it — make sure the bot's role can manage that channel's permissions.
</Warning>
