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

# Autoresponder

> Automatically reply to messages matching a trigger word or phrase.

# Autoresponder

> Automatically reply to messages matching a trigger word or phrase.

## How it works

raze watches every message sent in the server. When a message contains a configured trigger, raze sends the pre-set response in the same channel. Triggers match the full message by default — add `--not_strict` to fire when the trigger appears anywhere in a message.

<Info>
  Free servers can configure up to **5** autoresponders. Donator servers have no limit.
</Info>

## Managing autoresponders

<Tabs>
  <Tab title="Add">
    Trigger and response are separated by a **comma**. Flags are optional and go after the response.

    ```bash theme={null} theme={null}
    ;autoresponder add (trigger), (response) [flags]
    ```

    ```bash theme={null} theme={null}
    ;ar add hello, Hi there!
    ```

    ```bash theme={null} theme={null}
    ;ar add hello, Hi there! --reply
    ```

    ```bash theme={null} theme={null}
    ;ar add hello, Hi there! --not_strict --self_destruct 10
    ```

    | Flag                        | Description                                              |
    | --------------------------- | -------------------------------------------------------- |
    | `--reply`                   | Reply to the triggering message instead of a new message |
    | `--not_strict`              | Match anywhere in the message, not just the full content |
    | `--self_destruct <seconds>` | Delete the response after N seconds                      |
  </Tab>

  <Tab title="Update">
    Replace the response and flags for an existing trigger. Same comma syntax as `add`.

    ```bash theme={null} theme={null}
    ;ar update (trigger), (new response) [flags]
    ```

    ```bash theme={null} theme={null}
    ;ar update hello, Hey! --reply
    ```
  </Tab>

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

    ```bash theme={null} theme={null}
    ;ar remove hello
    ```
  </Tab>

  <Tab title="List">
    View all configured triggers with their response preview and active flags.

    ```bash theme={null} theme={null}
    ;ar list
    ```
  </Tab>

  <Tab title="Clear">
    Delete every autoresponder in the server at once.

    ```bash theme={null} theme={null}
    ;ar clear
    ```

    <Warning>
      raze will ask for confirmation before clearing. This cannot be undone.
    </Warning>
  </Tab>
</Tabs>

## Permissions

Control which users, roles, or channels can fire a specific trigger.

<Tabs>
  <Tab title="Allow">
    Only the listed users, roles, or channels can trigger this autoresponder.

    ```bash theme={null} theme={null}
    ;ar allow (trigger), (@user or @role or #channel)
    ```

    ```bash theme={null} theme={null}
    ;ar allow hello, @Members
    ```

    ```bash theme={null} theme={null}
    ;ar allow hello, #general
    ```
  </Tab>

  <Tab title="Deny">
    Prevent specific users, roles, or channels from triggering this autoresponder.

    ```bash theme={null} theme={null}
    ;ar deny (trigger), (@user or @role or #channel)
    ```

    ```bash theme={null} theme={null}
    ;ar deny hello, @Muted
    ```

    ```bash theme={null} theme={null}
    ;ar deny hello, #staff-chat
    ```
  </Tab>

  <Tab title="View">
    ```bash theme={null} theme={null}
    ;ar permissions (trigger)
    ```

    ```bash theme={null} theme={null}
    ;ar permissions hello
    ```
  </Tab>
</Tabs>
