# Auto Responder

### Introduction

If you are new to BotWiz, and have not yet added your bot: [click here](https://docs.botwiz.dev/docs/getting-started/adding-token-to-botwiz) to learn how!

If you have any questions throughout or get stuck, feel free to visit our [Support Server](https://discord.gg/5qRpsctzjB).

For this guide we will be creating an auto responder that responds to a message such as **'Hi, I need help!'.**

### Initialising the builder

Create a **Discord Event** (When a message is created) and nickname it as you wish. For this guide It will be called "Auto Responder". Once you have named it, to create the event click on `+ Create` button.

<figure><img src="/files/2vkiwle9B5rkSC9Uhr9U" alt=""><figcaption><p>Image shows how to create a message event.</p></figcaption></figure>

<figure><img src="/files/8gYb3Ptz3pQMfboNRqJ4" alt=""><figcaption></figcaption></figure>

### Creating the Auto Responder

To create the auto response we will be using a series of comparison conditions & message blocks.

{% hint style="info" %}
This guide will be using embeds, but you can use any message component you wish.
{% endhint %}

### Comparison Condition

As mentioned above we will be creating a response to a message such as **'Hi, I need help'**. To check if the message created is that message we need to setup the comparison condition as follows:

<table><thead><tr><th width="232">Comparison Value</th><th width="169">Condition Value</th><th width="193">Comparison Type</th></tr></thead><tbody><tr><td><code>{created_message}</code></td><td>I need help</td><td>() Contains</td></tr></tbody></table>

To add a comparison condition to your event builder, you will need to click on the **conditions** tab (next to the actions tab). Once navigated to the conditions tab, **click and drag** the comparison condition onto your event canvas.

![](/files/p4ITcwZUfs2YBeoUftI6)![](/files/623BFhyhIazRSOGf2Xaq)

<figure><img src="/files/HWJSNAshAx8zfXlXnvOc" alt=""><figcaption><p>Video shows how to add the comparison condition to the builder</p></figcaption></figure>

Check to see if the comparison condition is linked to the main event tree, if not link it up so the event can function.

<figure><img src="/files/rhxRQJnWfVn0HsK1wMdW" alt=""><figcaption><p>Video shows how to link the comparison condition to the main trigger</p></figcaption></figure>

\
As mentioned above, we are going to use the **embed** **reply** message component for the response.

To keep this simple we are just going to respond with "Hello @user, I see you're needing support? If you have any questions related to our service, you can head to our #support channel, where someone can assist you further!"

<figure><img src="/files/vYsYBdcq46HyKEbKTCBE" alt=""><figcaption><p>Image shows an example of the response</p></figcaption></figure>

To add the message component to our builder we will add the "Embed reply" to our event.

<figure><img src="/files/AFrPZdI2CHKmjMgTf8XB" alt=""><figcaption><p>Video shows how to add the embed reply to the event builder</p></figcaption></figure>

### Reply type

We want the bot to reply to the message the user sent, so we will set the reply type to **Reply to Message.**

<figure><img src="/files/RKx9jm2Y2GmSiKzxj43Q" alt=""><figcaption></figcaption></figure>

### Message Type

We want the bot to respond to the message that has been sent, so the message selector will not work in this case, so we have to set the message type to **Message ID**.

The Message ID value will be: `{created_message[id]}`

<figure><img src="/files/4a10pJmNgTyfEJ3q8acx" alt=""><figcaption></figcaption></figure>

### Description

In the description of your message component, paste in this text below:

**Hello {interaction\[member]}, I see you're needing support? If you have any questions related to our service, you can head to our <#CHANNEL-ID> channel, where someone can assist you further!**

{% hint style="info" %}
Replace **CHANNEL ID** with your support channel you would like users to go to, to ask questions / ask for support.
{% endhint %}

<figure><img src="/files/fX6nY8pIMYyWF6r9otkb" alt=""><figcaption></figcaption></figure>

You can set the embed color to any color you would like to use, for this guide we are just using the default hex color Botwiz provides!

Once you have finished setting up your response, you can save the event and try it out!

{% hint style="success" %}
That is the response setup, if you have any other questions related to botwiz or about this guide feel free to visit our [Support Server](https://discord.gg/5qRpsctzjB)!
{% endhint %}


---

# 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.botwiz.dev/botwiz-guides/botwiz-guides-1/auto-responder.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.
