# Button

<figure><img src="/files/9kFQ6SsakfU2NaKKTHai" alt=""><figcaption></figcaption></figure>

Inside of the Send or Edit a Message block, you can add buttons onto your message.

## Button Text

Assign some text that will show in the button.

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

## Emoji ID

The emoji that will appear on the button on your message, you must provide a valid emoji id or a unicode formatted emoji for default discord emojis. This is an optional setting.

<figure><img src="/files/1cFzq701AYcfrdjWlEhG" alt=""><figcaption></figcaption></figure>

## Button Style

The style of your button, you can choose between 5 types of styles. The Link button allows you to redirect users to a custom link when the button is clicked.&#x20;

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

## Custom Button Style

You can also use variables to determine the color of your button. Set the value to the color "Name" in the table below. Leave empty to follow the button style selected in the [#button-style](#button-style "mention") setting.

<figure><img src="/files/6gX8jhIXlCNqFLQWjw9G" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Action Button" %}
Below you may find some information on clickable buttons and their settings. The table below shows a list of all available button styles and their name, which can be used in the [#custom-button-style](#custom-button-style "mention") setting.

| Color | Name        | Example                                                             |
| ----- | ----------- | ------------------------------------------------------------------- |
| Blue  | `PRIMARY`   | ![](/files/hWb5N9n4ovXQPcjzgjf3)                                    |
| Grey  | `SECONDARY` | <img src="/files/wigWIH2z771aSKxv3kKV" alt="" data-size="original"> |
| Red   | `DANGER`    | <img src="/files/ttPquIPAz7KW7kNizgyl" alt="" data-size="original"> |
| Green | `SUCCESS`   | <img src="/files/xvoLF8jQMNCPwotpXxwi" alt="" data-size="original"> |

## Show Button Replies

The option to decide if interaction replies to the button are public as in visible to all users, or hidden and only can be seen by the user who caused the reply.&#x20;

<figure><img src="/files/lo7YiSC6uhN5GDnhHGxi" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Link Button" %}
Link buttons redirect to a custom link when clicked. They can only be grey.

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

## Button URL

The URL that users will be redirected to if they click on the button, this only appears if you have enabled your button to be link type. Variables work here, they must provide a valid URL.

<figure><img src="/files/4EwdKDlTvX1mRD5tYZ7p" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## **Disable Button by Default**

This option allows you to decide if your button is disabled by default on the message being sent, set the text to `true` if you would like it to be disabled. This is an optional setting and defaults to `false`.

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

## Enable Component Ordering

Enable this option to order components by assigning each button a row and a weight.

### Row

The row that the button will be placed on, insert 1 to have the button placed on the first row of buttons. A message can have up to 5 rows of either a select menu or 1 to 5 buttons, which is also known as lines of components.

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

### Position Weight

The position that the button will be ordered in on the row it was placed inside of. Buttons that have a higher weight, meaning a higher number, will be placed first, before other buttons with lower weights. If you insert `-1`, this button will not be added to your message.

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

## Remove Button

{% hint style="info" %}
This setting is only available in the [Edit a Button or Select Menu](/custom-commands-and-events/actions/message-actions/edit-a-button-or-select-menu.md) action block.
{% endhint %}

The Remove Button setting allows you to remove the button from the message when the setting is set to `true`. Once removed, it can't be brought back.

<figure><img src="/files/JEsT28q6Q5YQzWrGLvvW" 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/send-or-edit-a-message/interactive/button.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.
