> ## 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.

# Syntax and separators

> Naming rules, the definition separator, and how argument declarations are parsed.

# Syntax and separators

> Naming rules, the definition separator, and how argument declarations are parsed.

Every `;cc set` looks like this:

```text theme={null} theme={null}
;cc set NAME  ARGUMENT DECLARATIONS  SEPARATOR  RESPONSE SCRIPT
```

```bash theme={null} theme={null}
;cc set  warnuser  (target) [reason...]  --  {mod:warn {target} && {reason|No reason given}}Warned {target}.
```

***

## Command names

* **Allowed characters:** lowercase letters, digits, `_`, and `-` (regex `^[a-z0-9_-]{1,32}$`).
* **Length:** 1–32 characters.
* **Collisions:** the name cannot match any built-in raze command, nor the reserved names `cc`, `customcommand`, or `customcommands`.

Names are lowercased automatically, so `;cc set Greet ...` saves as `greet`.

***

## Separators

The separator marks where the declaration ends and the response begins. Any one of these works:

| Separator | Example                 |
| :-------- | :---------------------- |
| `--`      | `;cc set ping -- Pong!` |
| `=>`      | `;cc set ping => Pong!` |
| `->`      | `;cc set ping -> Pong!` |

Only the **first** standalone occurrence counts. Later occurrences are ordinary text in your response, so an arrow inside the response is safe:

```bash theme={null} theme={null}
;cc set rules -- Read #rules -> then react to verify.
```

<Warning>
  The separator must stand alone, surrounded by whitespace or at the start/end of the input. `;cc set ping--Pong!` is rejected with a missing-separator error.
</Warning>

***

## Argument declarations

Declarations go between the name and the separator. There are three kinds.

<AccordionGroup>
  <Accordion title="Required argument" icon="asterisk">
    Declared as `(name)`. Captures exactly one word. If the invoker leaves it out, the command replies with a missing-argument error and stops.

    ```bash theme={null} theme={null}
    ;cc set hug (member) -- {user.mention} hugs {member}!
    ```

    ```bash theme={null} theme={null}
    ;hug @wanderer
    ```

    > @you hugs @wanderer!
  </Accordion>

  <Accordion title="Optional argument" icon="brackets-square">
    Declared as `[name]`. Captures one word if present, otherwise resolves to an empty string. Pair it with a [fallback](/server-config/custom-commands/arguments-variables#fallback-syntax) so it never renders blank.

    ```bash theme={null} theme={null}
    ;cc set greet [name] -- Hello {name|stranger}!
    ```

    ```bash theme={null} theme={null}
    ;greet
    ```

    > Hello stranger!
  </Accordion>

  <Accordion title="Rest argument" icon="ellipsis">
    Declared as `(name...)` or `[name...]`. Captures everything remaining on the line, spaces included. A rest argument must be the **last** declaration.

    ```bash theme={null} theme={null}
    ;cc set say (message...) -- {message}
    ```

    ```bash theme={null} theme={null}
    ;say hello everyone, welcome back
    ```

    > hello everyone, welcome back
  </Accordion>
</AccordionGroup>

<Note>
  Angle brackets are accepted as a legacy alias for required arguments — `<member>` behaves exactly like `(member)`, and `<message...>` like `(message...)`. New commands should use parentheses; brackets must match, so `(member>` is rejected.
</Note>

<Warning>
  Declaring anything after a rest argument is rejected at creation time: `` `[extra]` cannot follow a rest argument (`...`) — it must be last. ``
</Warning>

### How input is split

Arguments are filled left to right:

1. Single-word arguments take the next whitespace-separated word.
2. A rest argument takes everything still unconsumed, trimmed.
3. Leftover text beyond your declarations is dropped from named arguments — but it is still reachable through `{args}` and the positional `{1}`, `{2}`, … placeholders.

Given `;cc set report (target) (category) [details...] -- ...`:

| Input                                        | `{target}`  | `{category}` | `{details}`                     |
| :------------------------------------------- | :---------- | :----------- | :------------------------------ |
| `;report @wanderer spam posting links twice` | `@wanderer` | `spam`       | `posting links twice`           |
| `;report @wanderer spam`                     | `@wanderer` | `spam`       | *(empty)*                       |
| `;report @wanderer`                          | —           | —            | — *(fails: missing `category`)* |

<Note>
  Declaration names must start with a letter and may contain letters, digits, `_`, and `-`. Mismatched brackets like `<member]` are rejected.
</Note>
