# button roles

*this example provides information on creating assigned roles through buttons; similar to reaction roles.*

{% hint style="info" %}
if you'd like to display your roles in a custom embed, we recommend checking out our [embed documentation](/embeds/your-first-embed.md) for more details
{% endhint %}

## ♪ example one - add

<figure><img src="/files/AbB3NPL3PARcUOvbS6oV" alt="" width="369"><figcaption><p>an example with color roles</p></figcaption></figure>

### ✎ information

this example allows users to add the role to themselves based on the buttons provided.

this method does not have a remove role function - once they click the button, the role is added to them

### ✎ buttonresponder commands

`/buttonresponder add name:addpink reply:{addrole:@pink}{embed} you now have the pink role! label::pink_heart: pink color:grey`\
\
`/buttonresponder add name:addblue reply:{addrole:@blue}{embed} you now have the blue role! label::blue_heart: blue color:grey`\
\
`/buttonresponder add name:addyellow reply:{addrole:@yellow}{embed} you now have the yellow role! label::yellow_heart: yellow color:grey`

### ✎ autoresponder commands

`/autoresponder add trigger:.showroles reply:{addbutton:addpink}{addbutton:addblue}{addbutton:addyellow}{embed} pick your color . . .` \
`@pink` \
`@blue` \
`@yellow`

## ♪ example two - add/remove

<div><figure><img src="/files/dLxlXqPpaXs47CP8WXjC" alt="" width="375"><figcaption><p>expanded add roles</p></figcaption></figure> <figure><img src="/files/qSnLH66pFRiuFWEQrV8n" alt="" width="375"><figcaption><p>expanded remove roles</p></figcaption></figure></div>

### ✎ information

this example allows users to both add AND remove their desired roles.

as autoresponders can only have 5 buttons attached, this method allows you to bypass that by using a button within a button (buttonception!)

### ✎ buttonresponder commands

to keep this example readable/shortened, we'll be replicating the pings okay/no pings button menus rather than all of the buttons shown in the images.

`/buttonresponder add name: addpingsok reply: {embed:#c0eeff}{addrole: @pings okay } ✎┇okay, i have given you the @pings okay role.{newline} <:spacer:791592722527551518> - to remove it, please use the red remove button. label: pings okay emoji: <:mimuyes:756561205925118033> color: green`

`/buttonresponder add name: addpingsno reply: {embed:#c0eeff}{addrole: @no pings } ✎┇okay, i have given you the @no pings role.{newline} <:spacer:791592722527551518> - to remove it, please use the red remove button. label: no pings emoji: <:mimuno:821403020767789087> color: green`

`/buttonresponder add name: removepingsok reply: {embed:#c0eeff} {removerole: @pings okay } ✎┇okay, i have removed the @pings okay role.{newline} <:spacer:791592722527551518> - to add it, please use the green add button. label: pings okay emoji: <:mimuyes:756561205925118033> color: red`

`/buttonresponder add name: removepingsno reply: {embed:#c0eeff} {removerole: <@&819030959739240479> } ✎┇okay, i have removed the <@&819030959739240479> role.{newline} <:spacer:791592722527551518> - to add it, please use the green add button. label: no pings emoji: <:mimuno:821403020767789087> color: red`

`/buttonresponder add name: addroles reply: {embed:#c0eeff} <:iarapeek:932095187914735617> please choose which role(s) you'd like added! {addbutton:addpingsok}{addbutton:addpingsno} label: add roles emoji: <:activated:820456097755693126> color: green`

`/buttonresponder add name: removeroles reply: {embed:#c0eeff} <:iarapeek:932095187914735617> please choose which role(s) you'd like removed! {addbutton:removepingsok}{addbutton:removepingsno} label: remove roles emoji: <:unactivated:820456096384811038> color: red`

### ✎ autoresponder command

`/autoresponder add trigger: .rolesmenu reply: {delete}{embed} roles list: {newline}@pings okay{newline}@no pings {addbutton:addroles3}{addbutton:removeroles}`


---

# 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.mimu.bot/autoresponder/resources/autoresponder-examples/manager-moderation-commands/self-assignable-roles/button-roles.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.
