# Wait For Button Interaction

**Introduction**

The "Wait for Button Interaction" step pauses the automation until a user interacts with a button on a specified message or until a set timeout is reached. You need to send a message with button(s) before this step.

**Configuration**

* **Message**: The message that contains the buttons to wait for interaction. This parameter is required.
* **Timeout**: The duration to wait for a button interaction before continuing or stopping the automation. This parameter is required.

**Subpaths**

Each button label in the message creates a unique subpath:

* **\[Button Label]**:
  * **ID**: The ID of the button.
  * **Interaction**: Captures the interaction event when the button is clicked.
* **Timeout**: Represents the point at which the timeout occurs if no button is clicked.

{% hint style="info" %}
This step waits for a single interaction - it stops running when it receives the first interaction.
{% 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.flexy.bot/modules/discord/steps/wait-for-button-interaction.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.
