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

# Create and preview

> Build your first custom command, then inspect, preview, list, and toggle it.

# Create and preview

> Build your first custom command, then inspect, preview, list, and toggle it.

## Your first custom command

<Steps>
  <Step title="Write the definition">
    A definition is a name, optional argument declarations, a separator, and the response script.

    ```bash theme={null} theme={null}
    ;cc set greet (member) [message...] -- Hello {member}! {message|Welcome to the server.}
    ```

    * `greet` — the command name.
    * `(member)` — a required argument (one word).
    * `[message...]` — an optional argument that swallows the rest of the line.
    * `--` — the separator between the definition and the response.
    * everything after `--` — the response script.
  </Step>

  <Step title="Preview it before anyone sees it">
    Dry-run it with sample arguments. Nothing is banned, logged, or written to the database.

    ```bash theme={null} theme={null}
    ;cc preview greet @wanderer good to have you
    ```

    Output:

    > Hello @wanderer! good to have you
  </Step>

  <Step title="Run it for real">
    Anyone allowed to use it can now type:

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

    Output:

    > Hello @wanderer! Welcome to the server.
  </Step>

  <Step title="Lock it down (optional)">
    Restrict who can run it before you announce it.

    ```bash theme={null} theme={null}
    ;cc allow greet @Staff
    ```

    See [Restrictions](/server-config/custom-commands/restrictions) for the full model.
  </Step>
</Steps>

***

## Management commands

All of these require **Manage Server**.

<Tabs>
  <Tab title="Create / update">
    ```bash theme={null} theme={null}
    ;cc set (name) [arguments...] -- (response)
    ```

    `=>` and `->` work in place of `--`.

    ```bash theme={null} theme={null}
    ;cc set (name) [arguments...] => (response)
    ;cc set (name) [arguments...] -> (response)
    ```

    Running `;cc set` on a name that already exists **updates** it in place and keeps a revision in the command's history. Creating a brand new command counts against your [tier limit](/server-config/custom-commands/overview#limits-by-tier).

    ```bash theme={null} theme={null}
    ;cc set ping -- Pong!
    ;cc set d20 -- You rolled a {range:1-20}.
    ```
  </Tab>

  <Tab title="Inspect">
    ```bash theme={null} theme={null}
    ;cc show (name)
    ```

    Shows the saved script, the declared arguments, whether it is enabled, and which Discord permissions its actions require.

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

    <Note>
      The response field is truncated to the first 1000 characters in the embed. Very long scripts are stored in full — only the preview of them is shortened.
    </Note>
  </Tab>

  <Tab title="List">
    ```bash theme={null} theme={null}
    ;cc list
    ```

    A paginated list of every custom command in the server, 15 per page. Disabled commands are marked *(disabled)*.
  </Tab>

  <Tab title="Enable / disable">
    ```bash theme={null} theme={null}
    ;cc enable (name)
    ;cc disable (name)
    ```

    Disabling keeps the script, arguments, and restrictions in the database but stops anyone from invoking it. Useful while you are editing something that is already in use.

    ```bash theme={null} theme={null}
    ;cc disable greet
    ```
  </Tab>

  <Tab title="Remove">
    ```bash theme={null} theme={null}
    ;cc remove (name)
    ```

    *Alias: `;cc delete (name)`*

    Deletes the command permanently, along with its restrictions.

    ```bash theme={null} theme={null}
    ;cc remove greet
    ```
  </Tab>
</Tabs>

***

## Previewing

```bash theme={null} theme={null}
;cc preview (name) [sample arguments]
```

Preview renders the command exactly as it would appear — content, embeds, buttons, and dropdowns included — prefixed with a small `preview of (name)` note.

```bash theme={null} theme={null}
;cc preview greet @wanderer hey there
```

<Info>
  **Safe sandbox.** Preview also skips every [output directive](/server-config/custom-commands/output-controls) — nothing is deleted, redirected, DM'd, reacted to, or rate-limited, and the note tells you which directives it skipped. Preview runs the template engine only. It does **not** ban, kick, warn, timeout, change roles, or read/write [stored data](/server-config/custom-commands/stored-data). Action tags are left inert.
</Info>

<Warning>
  **Paginated scripts.** If the script uses `{page}`, preview shows **page 1 only** and tells you which page you're seeing out of how many. Navigation buttons need a real invocation, because the page set is registered against the sent message. Run the command normally to page through it.
</Warning>

Missing a required argument in your sample input fails the preview the same way a real invocation would, which makes it a quick way to confirm your argument schema is right.
