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

# Auto Responders

> Auto Responder stores rules per server and responds to the first enabled trigger matching a message. Choose exact or partial matching, restrict a rule by channel and role, and send plain text or an embed script.

## Access and configuration

Rule management requires **Manage Server** (`manage_guild=True`). Prefix commands accept Discord's native permission or an equivalent permission granted through Headless **Fake Permissions**; slash commands require **native Manage Server** because their internal check does not accept the virtual permission. Slash commands respond ephemerally. Configuration is isolated per server and saved in the Auto Responder store.

`.ar reset confirm` and `/autoresponder reset confirm:true` remove every rule for that server. The slash command asks for a boolean confirmation; a false value makes no changes.

### `.autoresponder list`

```headless-command Syntax theme={null}
.autoresponder list
```

```headless-command Example theme={null}
.ar list
```

### `.autoresponder toggle`

```headless-command Syntax theme={null}
.autoresponder toggle [state]
```

```headless-command Example theme={null}
.ar toggle off
```

### `.autoresponder reset`

```headless-command Syntax theme={null}
.autoresponder reset [confirmacion]
```

```headless-command Example theme={null}
.ar reset confirm
```

> [!WARNING]
>
> reset removes every rule for the server. --delete attempts to remove the triggering message and needs the bot to have Manage Messages; if Discord rejects deletion, the response can still be sent without a reply.

**Note:**

Configuration and cooldown state are server-scoped; one community's rules do not apply to another. Settings use the existing Auto Responder store.

## Matching and limits

Matching is exact by default, case-insensitive, and collapses repeated whitespace. `--not_strict` switches to contains matching; `--strict` restores exact matching. User-mention triggers can match even when additional text is present. A server can store up to 100 rules; each trigger is limited to 160 characters and each response to 1,900.

## Channel and role filters

A non-empty channel list restricts a rule to those channels; a non-empty role list allows it when the author has at least one listed role. If both filters are set, both must pass. Each rule stores up to 25 channels and 25 roles. Run channel or role again to remove that channel or role from the filter.

### `.autoresponder channel`

```headless-command Syntax theme={null}
.autoresponder channel <rule_ref> <channel>
```

```headless-command Example theme={null}
.ar channel 1 #help
```

### `.autoresponder role`

```headless-command Syntax theme={null}
.autoresponder role <rule_ref> <role>
```

```headless-command Example theme={null}
.ar role 1 @Members
```

## Delivery and safety

The bot ignores bot authors and empty messages. Valid commands do not trigger rules by default; the slash option `ignorar_comandos` or prefix flag `--ignore_command_check` allows them. Only one rule responds to each message. Each member/rule pair has a three-second cooldown. Discord-allowed mentions are set to none: Headless disables user, role, `@everyone`, and `@here` pings. Ensure the bot can view the channel, read history, and send messages (including in threads where applicable).

## Flags and partial updates

For prefix commands, `--reply` keeps a direct reply, `--no_reply` posts in the channel, `--delete` attempts to remove the triggering message and sends without replying, and `--self_destruct N` accepts 0–60: 0 disables deletion and positive values must be 6–60 seconds. `--not_strict` and `--strict` select matching mode. Unknown flags return an error. The `update` command changes only the flags you include; omit the rest to preserve their current settings. Slash `update` also uses optional fields so omitted options stay unchanged.

### `.autoresponder add — 1`

```headless-command Syntax theme={null}
.autoresponder add [payload]
```

```headless-command Example theme={null}
.ar add hello, Hello {author.name}
```

Also works: `.ar add support, {embed}$v{title:Support}$v{description:Open a ticket} --not_strict --reply` · `.ar add rules, Read #rules --no_reply`

### `/autoresponder add`

```headless-command Syntax theme={null}
/autoresponder add trigger:<trigger> response:<response> [match_mode:<match_mode>] [reply:<reply>] [delete_trigger:<delete_trigger>] [self_destruct:<self_destruct>] [ignore_commands:<ignore_commands>]
```

```headless-command Example theme={null}
/autoresponder add trigger:hello response:Hi
```

### `.autoresponder add — 2`

```headless-command Syntax theme={null}
.autoresponder add [payload]
```

```headless-command Example theme={null}
.ar add spam, Message removed --delete --self_destruct 10
```

### `.autoresponder update`

```headless-command Syntax theme={null}
.autoresponder update [rule_ref] [payload]
```

```headless-command Example theme={null}
.ar update 1 hello, Hello again
```

## Text and scripts

Separate trigger and response with the first comma; the rest of the line stays in the response. Message-context variables and the embed parser are supported. A duplicate trigger does not create a second rule; edit the existing one with update. `--delete` needs the bot's **Manage Messages** permission; if Discord rejects deletion, the response may still be sent, but without replying to the original message.

## Steps

**1. Create a test rule**

Use a short trigger in a private test channel and a response that does not mention anyone.

**2. Set matching and filters**

Choose exact or partial matching and add channel/role filters only when the rule needs a narrower scope.

**3. Verify the result**

Use list, test exact and partial text, and confirm messages from other channels or roles do not activate the rule.

> **Prefix commands**
>
> Group aliases: `.autoresponder`, `.autorespond`, `.respuestaauto`, and `.ar`. Subcommands: `.ar` (status); `.ar add <trigger>, <response> [--not_strict] [--strict] [--reply] [--no_reply] [--delete] [--keep_trigger] [--ignore_command_check] [--check_commands] [--self_destruct <0|6-60>]`; `.ar update <id> <trigger>, <response> [same options]`; `.ar remove <id|trigger>`; `.ar list`; `.ar toggle <on|off>`; `.ar reset <confirm>`; `.ar channel <id> <#channel>`; `.ar role <id> <@role>`. `channel` and `role` toggle between restricting to that target and removing it from the filter. `reset` requires explicit confirmation; `--self_destruct 0` disables auto-deletion, while `1–5` are invalid.

> **Slash commands**
>
> The /autoresponder group exposes add, remove, update, list, toggle, reset, channel, and role. Configuration actions require Manage Server and respond ephemerally. add and update expose exact/contains matching, reply, borrar\_trigger, autodestruir, and ignorar\_comandos; update keeps optional fields you leave unchanged.

> **Avoid ambiguous rules**
>
> The original guide recommends choosing a specific phrase, deciding whether it must match the whole message or may appear inside it, and testing that unrelated text does not trigger a reply.

## Syntax and examples

#### `.autoresponder add`

## Related pages

* [Embed scripting](/docs/en/resources/scripting/embeds.md)
* [Variables](/docs/en/resources/scripting/variables.md)
* [Messages](/docs/en/server/messages.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.