# expert i: static button responders

## what are button responders?

* button responders are a "type" of autoresponder. so far, in this guide, we've only touched on **message** autoresponders, where the bot will **always respond to a message**.
* instead: button responders **respond to a click of a button.**
* it has a near-mirror functionality to autoresponders, accessing to almost all variables, but can be **used in tandem with autoresponders**, allowing different branches of user input.

{% hint style="info" %}
**static** button responders are buttons that stay in a channel over a long period of time and will be clicked by more than one person, such as **verification buttons on rules**, **button roles**, etc.
{% endhint %}

## your first button responder

let's start by making your first button responder! you can do so with **/buttonresponder add**. as you run the command, you'll find a couple settings:

* `name` : this is similar to an embed name - it's just a reference ID that'll be used when you create, edit, delete or send it
* `reply` : this is mimu's response when someone clicks the button - similar to the **autoresponder raw reply**.&#x20;
* *displayed on the button:*

  * `label` : this refers to the **text that's on the button**. not to be confused with name!
  * `emoji`: this refers to the **emoji that's on the left of the button**.&#x20;
  * you must have a `label`, `emoji` or both on the button

  <figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FS5SHENpS5QqS5VrjCj4f%2FScreen%20Shot%202023-12-22%20at%205.14.02%20PM.png?alt=media&#x26;token=db82a3f0-0c92-4e19-ab99-ea0990b37e72" alt=""><figcaption><p>you must have an emoji or a label</p></figcaption></figure>

  * `color`: this refers to the color of the label; which is available in four colors: **blue**, **green**, **grey** and **red**. it defaults to blue.

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FDiSXmoTrgZOuyTbO2cKi%2FIMG_3380.png?alt=media&#x26;token=d10ae6d5-2641-447e-8cc3-07a62958ca97" alt=""><figcaption><p>button colors that are available - these colors are preset by discord and cannot be a custom hex code.</p></figcaption></figure>

{% hint style="info" %}
other settings like `limitations` and `invoker_only` will be discussed in [expert ii: instantiated buttons](https://docs.mimu.bot/autoresponder/guide/expert-ii-instanced-button-responders). for now - ignore them.
{% endhint %}

### making a button that adds a role

for your first button responder, we're going to make a button that adds a role, with the `{addrole:}` function.&#x20;

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2F9eZjhMt6EbJSp4cjNb6w%2FScreen%20Shot%202023-12-22%20at%207.05.46%20PM.png?alt=media&#x26;token=d78e25f4-eeb1-4818-9d9b-6ac81ae7480f" alt=""><figcaption><p>creating a button responder</p></figcaption></figure>

`/buttonresponder add name:role_panel1 reply:{addrole:@pink}{embed} you now have the pink role! label:pink color:grey emoji::pink_heart:`

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FoBEQXlGeLPt9pAVNJmdY%2FScreen%20Shot%202023-12-22%20at%207.07.42%20PM.png?alt=media&#x26;token=76bc3e7c-52d5-49f3-82b2-6d66b7885b87" alt="" width="375"><figcaption><p>here's the result!</p></figcaption></figure>

* you'll notice that once you create a button responder, it shows options similar to a normal message auto responder.
* it also creates the button below it to allow you to test it then and there!

### creating multiple buttons

now that you've created your first button, let's create a couple more! in this example, we're going to make a simple panel of buttons for color roles.

1. first, we're going to update the pink button we made earlier:

   `/buttonresponder edit reply name:role_panel1 reply:{addrole:@pink}{removerole:@blue}{removerole:@yellow}{embed} you now have the @pink role !`
2. and then we're going to add two more buttons for each color:

   `/buttonresponder add name:role_panel2 reply:{addrole:@blue}{removerole:@pink}{removerole:@yellow}{embed} you now have the @blue role ! label:blue emoji::blue_heart: color:grey`

   `/buttonresponder add name:role_panel3 reply:{addrole:@yellow}{removerole:@pink}{removerole:@blue}{embed} you now have the @yellow role ! label:yellow emoji::yellow_heart: color:grey`

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FTgamdySqwqePp1TxfNvg%2FScreen%20Shot%202023-12-22%20at%207.58.11%20PM.png?alt=media&#x26;token=39a79eb3-5d0e-445d-ac68-931b06ca7737" alt="" width="375"><figcaption><p>blue role button!</p></figcaption></figure>

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FenQ8MtIkm6ulFZtfJ56s%2FScreen%20Shot%202023-12-22%20at%207.59.49%20PM.png?alt=media&#x26;token=83f17974-aaf9-4119-91ab-25dbf1126f45" alt="" width="375"><figcaption><p>yellow role button!</p></figcaption></figure>

3. then, we're going to use a premade embed to make it look cute!&#x20;

   `/embed create choose_color`

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FSu1saO8TlByjQ2jkjUZi%2FScreen%20Shot%202023-12-22%20at%207.46.53%20PM.png?alt=media&#x26;token=74bf0424-5f63-4537-bb94-b2268f72c0a1" alt=""><figcaption><p>creating the embed</p></figcaption></figure>

### using /send command to post static button responders

* to post a role panel (which consists of an embed and buttons), we're going to use the **/send** command, combining all of the buttons and embed we made into one message.
  * to attach the button, we'll use `{addbutton:button_name}`

`/send content:{embed:choose_color}{addbutton:role_panel1}{addbutton:role_panel2}{addbutton:role_panel3} channel:#choose-roles`

* when sent successfully, **#choose-roles** channel looks like this:

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2F4xMH6qh4yvZQyJdLLXnV%2FScreen%20Shot%202023-12-22%20at%208.04.48%20PM.png?alt=media&#x26;token=e01c4bb1-ae46-4ed9-b7fd-c4e9ae957097" alt="" width="280"><figcaption></figcaption></figure>

* and here's what it looks like in action!

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FvKBJGm6s30DI5fQQfG3w%2Fezgif-1-e25180a875.gif?alt=media&#x26;token=46a249ad-da74-4bba-942e-304c17875446" alt=""><figcaption><p>our role panel working in action!</p></figcaption></figure>
