# Add and Remove Filters

The `/filter` command allows you to add filters to the chat, enhancing the bot's ability to respond to specific triggers with predefined messages.

### Adding a Filter

To add a filter to the chat, follow these steps:

#### Method 1: Reply to a Message

1. Reply to the message you want to set as the response.
2. Use the following command:

   ```plaintext
   /filter <trigger>
   ```

   Example:

   ```plaintext
   /filter /social
   ```

#### Method 2: Specify Response Message

1. Use the following command:

   ```plaintext
   /filter <trigger> <response>
   ```

   Example:

   ```plaintext
   /filter /social This is a social message.
   ```

### Removing a Filter

To remove a filter from the chat, use the following command:

```plaintext
/rmfilter <trigger>
```

Example:

```plaintext
/rmfilter /social
```

### Additional Information

* If you want to attach media to the filter, you can use the command by mentioning the word and replying to an already sent message you want to set as the response.

  Example:

  ```plaintext
  /filter /social
  ```
* The word specified as the trigger will be case-insensitive.

### Usage Examples

#### Method 1 Example:

* Reply to a message with:

  ```plaintext
  /filter /social
  ```

#### Method 2 Example:

* Specify the response message:

  ```plaintext
  /filter /social This is a social message.
  ```

Now, when someone mentions "/social" in the chat, the bot will respond with the predefined message. To remove the filter, use `/rmfilter /social`.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cherrybot.co/cherry-bot/bot-features/add-and-remove-filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
