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

# Output controls

> Delete the trigger, stay silent, redirect the reply, DM it, react, thread it, or rate-limit it.

# Output controls

> Delete the trigger, stay silent, redirect the reply, DM it, react, thread it, or rate-limit it.

Output directives change how a custom command delivers its response. Write them anywhere in the script — they are stripped from the message before it is sent.

<Info>
  Directives are read from the **saved script**, before any variable is substituted. That means they cannot be injected by whoever runs the command, and it also means their values must be written literally — `{respond: {channel}}` will not resolve.
</Info>

***

## Directives

<Tabs>
  <Tab title="delete">
    ```text theme={null} theme={null}
    {delete}
    ```

    Deletes the invoking message once the command has run. raze needs **Manage Messages**; if it can't delete, the rest of the command still works.

    ```bash theme={null} theme={null}
    ;cc set rules -- {delete}{title: Server rules}{description: Be nice.}
    ```
  </Tab>

  <Tab title="silent">
    ```text theme={null} theme={null}
    {silent}
    ```

    Suppresses the reply entirely. Actions, database writes, reactions, and role changes still run — this is how you build a command that only *does* something.

    ```bash theme={null} theme={null}
    ;cc set logjoin (member) -- {silent}{customdb:set joins && {member} && seen}
    ```
  </Tab>

  <Tab title="respond">
    ```text theme={null} theme={null}
    {respond: (#channel)}
    ```

    Sends the reply to another channel instead of the one the command was typed in. Accepts a channel mention, a channel ID, or an exact channel name. An unresolvable channel falls back to the invocation channel; if raze lacks permission to post in the destination, nothing is sent.

    ```bash theme={null} theme={null}
    ;cc set report (reason...) -- {respond: #mod-log}{user.mention} reported: {reason}
    ```
  </Tab>

  <Tab title="dm">
    ```text theme={null} theme={null}
    {dm}
    {dm: (user)}
    ```

    Delivers the reply as a direct message. Bare `{dm}`, `{dm: user}`, and `{dm: self}` all target the invoker; a mention or ID targets that member instead. A closed DM silently drops the message.

    ```bash theme={null} theme={null}
    ;cc set invitecode -- {dm}Your invite code is ABCD-1234.
    ```
  </Tab>

  <Tab title="cooldown">
    ```text theme={null} theme={null}
    {cooldown: (duration)}
    ```

    Rate-limits the command **per member**. Durations combine units — `30s`, `10m`, `1h30m`, `2d`. Someone on cooldown gets told how many seconds remain and nothing else runs.

    ```bash theme={null} theme={null}
    ;cc set daily -- {cooldown: 24h}Here's your daily tip: read #rules.
    ```

    <Note>
      Cooldowns are tracked in Redis. If Redis is unavailable the command runs rather than failing shut.
    </Note>
  </Tab>
</Tabs>

Directives combine freely:

```bash theme={null} theme={null}
;cc set confess (text...) -- {delete}{silent}{respond: #confessions}Anonymous: {text}
```

***

## Message extras

These are ordinary script tags rather than directives, but they shape the delivered message.

| Tag                                        | Effect                                                                                                                                                           |
| :----------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{react: (emoji)}`                         | Adds a reaction to the message raze sent. With `{silent}`, it reacts to the invoking message instead. Up to 20.                                                  |
| `{attachment: (url)}`                      | Downloads the file and attaches it to the reply. Up to 10 files, 8 MB each; anything unreachable or oversized is skipped. `{attach:}` and `{file:}` are aliases. |
| `{thread: (name)}`                         | Creates a thread on the reply, named as given (trimmed to 100 characters). Not available on a DM.                                                                |
| `{role: (id)}`                             | Toggles that role on whoever ran the command.                                                                                                                    |
| `{add_role: (id)}` / `{remove_role: (id)}` | Grants or removes the role. Comma-separate several IDs.                                                                                                          |

```bash theme={null} theme={null}
;cc set poll (question...) -- {question}{react: 👍}{react: 👎}
```

```bash theme={null} theme={null}
;cc set colourme -- {add_role: 123456789012345678}You now have the colour role.
```

<Warning>
  Role tags apply to the **invoker**, so any member who can run the command can self-assign that role. Roles above raze and roles carrying Administrator are refused. Gate the command with [restrictions](/server-config/custom-commands/restrictions) if that isn't what you want.
</Warning>

***

## Interaction with pages

A script that uses both `{page}` and a redirect still paginates, as long as the destination is a normal server channel. With `{dm}` or `{silent}`, only page 1 is delivered and no navigation is attached, because the page set has to be registered against a message in a guild.
