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

# Autoresponder

> Auto-reply when a message matches a trigger.

## Overview

Auto-reply whenever a message matches a trigger word or phrase.

## Commands

<CodeGroup>
  ```javascript Syntax theme={null}
  !autoresponder add <trigger> <reply> [mode] [embed] [delete_trigger] [channels]
  !autoresponder edit <id> [mode] [embed] [delete_trigger] [reply]
  !autoresponder remove <trigger>
  !autoresponder list
  !autoresponder show <id>
  !autoresponder reset
  ```

  ```javascript Example theme={null}
  !autoresponder add "how do i get help" "Check #support for that!" contains
  !autoresponder show ar_a1b2c3
  ```
</CodeGroup>

`reset` deletes every autoresponder in the server, use carefully.

## Match modes

<AccordionGroup>
  <Accordion title="contains (default)">The trigger can appear anywhere in the message.</Accordion>
  <Accordion title="startsWith / endsWith">The message must start or end with the trigger.</Accordion>
  <Accordion title="exact">The message must match the trigger exactly.</Accordion>
  <Accordion title="regex">The trigger is treated as a regular expression.</Accordion>
</AccordionGroup>

## Scoping to specific channels

<CodeGroup>
  ```javascript Syntax theme={null}
  !autoresponder channel add <id> <channels>
  !autoresponder channel remove <id> <channels>
  !autoresponder channel clear <id>
  ```

  ```javascript Example theme={null}
  !autoresponder channel add ar_a1b2c3 "#general #chat"
  ```
</CodeGroup>

By default an autoresponder fires anywhere in the server. `channel clear` removes the restriction back to everywhere.

## Deleting the triggering message

The `delete_trigger` option removes the message that triggered the response, useful for keyword-triggered cleanup.

## Sending as an embed

The `embed` option sends a lightweight inline embed (color, title, footer) instead of plain text, without needing a full saved [embed](/resources/scripting/embeds) template.
