# Buttons

{% hint style="danger" %}
While the Send a Message with attached buttons action block is still available for use in all commands and events, it is considered old and has been replaced by the [Send or Edit a Message](/custom-commands-and-events/actions/message-actions/send-or-edit-a-message.md) action block. We advise you to use the [Send or Edit a Message](/custom-commands-and-events/actions/message-actions/send-or-edit-a-message.md) block instead, which offers more functionalities and possibilities for your message.
{% endhint %}

Buttons are interactive components that render in messages. They can be clicked by users, and send an interaction to your bot when clicked. All corresponding blocks under the button will execute.&#x20;

## Button Text

The following field can be used to set the text that the button should display:

<figure><img src="/files/frdExFurKGFmPK07G4Bl" alt="" width="368"><figcaption></figcaption></figure>

Example of what they would see:

<figure><img src="/files/tV55dTOlVFotrEDJe6s0" alt="" width="563"><figcaption></figcaption></figure>

## Emoji ID

You can specify a custom emoji id or default emoji to add to the emoji along with the normal button text. To do this you need to use the backwards slash then input your emoji. It will return the emoji id if it's a custom or if it's default just copy the emoji and paste it into the field.

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

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

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

## Button Style

The button style allows you to select the color of the button, or mark it as a link button.

### Action Button

<table><thead><tr><th width="225">Color</th><th>Example</th></tr></thead><tbody><tr><td>Green</td><td><p></p><p><img src="/files/m2u1LD24wTvy732pIGfR" alt="" data-size="original"></p></td></tr><tr><td>Blue</td><td><p></p><p><img src="/files/UcIpikGrKQmweDl4KK7C" alt="" data-size="original"></p></td></tr><tr><td>Gray</td><td><p></p><p><img src="/files/bITUCRHnrBeFrV0KTz38" alt="" data-size="original"></p></td></tr><tr><td>Red</td><td><p></p><p><img src="/files/o10Vf0Aoqf6NYb7b6sOY" alt="" data-size="original"></p></td></tr></tbody></table>

### Link button

You can choose the color of the button along with a separate option of it being a link. Simply input a URL in the field that is shown. Link buttons are only gray and aren't able to be disabled or have a cooldown. Also if the link style is chosen then you can't connect any blocks to the link button.

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

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

## Disable button after use

Disabling a button means it cannot be used anymore when a certain action disables it.\
If the link style is not chosen, you will have an option of disabling the button. By default, buttons won't be disabled until you configure it to "Yes".

When you select "Yes", 3 new fields will appear.&#x20;

### Clicks Required

This is the amount of clicks required to disable the button.

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

### Disabled Text

This is the text of the button that can be optionally changed after the button is disabled.

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

### Disabled Style

This is the color of the button after it has been disabled.

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

## Cooldown

Buttons have a cooldown field as well. A button cooldown is when a user clicks a button, they won't be able to click it again until a set amount of time passes. \
By default this field is disabled. To have a cooldown you select "Enabled".

Once Enabled, two new fields will appear:&#x20;

### Cooldown Type

You can select whether the cooldown is global, meaning it affects everyone. So everyone would have to wait until the cooldown is over.\
You can also select User, so the cooldown is per user.

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

### Cooldown Duration

This is the duration in seconds that the cooldown will be active for.

<figure><img src="/files/gmXH4LDUM8BimHrB0pSJ" 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/legacy-reply-actions/send-a-message-with-attached-buttons/buttons.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.
