# Edit a Button or Select Menu

<figure><img src="https://1937909199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm_hW5MApY3J0lRhi0M%2Fuploads%2FUpKGjM0QPp5SN6wah2wK%2Fimage.png?alt=media&#x26;token=d5618244-b0bf-4a52-8e93-58e9610e7216" alt=""><figcaption></figcaption></figure>

The Edit a Button or Select Menu block allows you to modify a button or select menu sent in your command or event after it has originally been sent.&#x20;

## Target Message

Inside of this option, you may select the message block that you would like to edit the components of from the dropdown. To easily find the action that you would like to edit, it's recommended to label the original block with the **Block Label** option.

<figure><img src="https://1937909199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm_hW5MApY3J0lRhi0M%2Fuploads%2F79E2FtMOwuDbgcE8nIdh%2Fimage.png?alt=media&#x26;token=4943266d-f1c1-4479-bb80-0cbd9e3bbe0d" alt=""><figcaption></figcaption></figure>

## Available Components

In this section, all components that you are allowed to edit will appear here. To select the component to edit, simply click on the component's option as seen in the image below. Once you select a component, the option will be highlighted in red. To unselect a component, simply click it again. Options colored in gray will not get edited.

<figure><img src="https://1937909199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm_hW5MApY3J0lRhi0M%2Fuploads%2FPv9pcMTosfNumGF5JtVH%2Fimage.png?alt=media&#x26;token=011af8a1-bbd5-4bbf-b6a3-3b097a376016" alt=""><figcaption></figcaption></figure>

## Selected Components

In this section, you may adjust the settings for each component that you would like to edit. To select a certain component to edit, simply click on the dropdown arrow to view all the settings of that edited version of the component. In order to remove an edited component, simply click the "Remove" text highlighted in red. Refer to the Send or Edit a Message's [Button](https://documentation.botghost.com/custom-commands-and-events/actions/message-actions/send-or-edit-a-message/interactive/button) and [Select Menu](https://documentation.botghost.com/custom-commands-and-events/actions/message-actions/send-or-edit-a-message/interactive/select-menu) documentation pages to learn about all the settings that you can modify.

{% hint style="success" %}
Fields you leave empty will remain unchanged when editing the component.
{% endhint %}

<figure><img src="https://1937909199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm_hW5MApY3J0lRhi0M%2Fuploads%2FPU3Tw8ZCL8OhvYLNW2ZD%2Fimage.png?alt=media&#x26;token=ad650e90-121c-41d5-85e1-e38183c8d4b8" alt=""><figcaption></figcaption></figure>


---

# 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://documentation.botghost.com/custom-commands-and-events/actions/message-actions/edit-a-button-or-select-menu.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.
