# 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](https://docs.mimu.bot/embeds) for more details
{% endhint %}

## ♪ example one - add

<figure><img src="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FcRjGCuPXZ6IneW0CNrfr%2Fimage.png?alt=media&#x26;token=497f0d28-03d2-4882-afe6-0e49d1a48a86" 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="https://1355643618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjUSz3NQrpyR-tHhUV-%2Fuploads%2FR2eGXBe8cYcSAApQwPcY%2FScreenshot%202024-01-17%20at%2011.42.22%E2%80%AFAM.png?alt=media&#x26;token=b5c41321-8110-41b8-8ce4-2edc970adaec" alt="" width="375"><figcaption><p>expanded add roles</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%2F7F7RPNb5PqKSilxdcc2J%2FScreenshot%202024-01-17%20at%2011.42.52%E2%80%AFAM.png?alt=media&#x26;token=a6fcadbf-90cb-4683-a7bb-c31d9fb5dd62" 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}`
