# Button Roles

> Post buttons that give members roles

Button roles let members give themselves a role by clicking a button.

<discord-messages>
	<discord-message profile="aethor">
		<discord-embed slot="embeds" embed-title="Pick your roles" color="#5865f2">
			<discord-embed-description slot="description">Click a button to add or remove a role.</discord-embed-description>
		</discord-embed>
		<discord-action-row slot="components">
			<discord-button type="primary">Red</discord-button>
			<discord-button type="primary">Green</discord-button>
			<discord-button type="primary">Blue</discord-button>
		</discord-action-row>
	</discord-message>
</discord-messages>

## Creating them

Build a blueprint on the [roles page](/roles), pick the roles and labels, then copy the exported data.

Go to the channel you want the buttons in and run `/button-roles` with that data pasted into the `content` option.

<Cmd cmd="/button-roles content:<paste your exported data>" />

Clicking a button toggles the role: it adds the role if the member does not have it, and removes it if they do.

## Catches and limits

- Button roles are a premium feature.
- The bot needs Manage Roles, and its own role must sit above every role it hands out. This is not checked when you post the buttons, so a role that sits too high only fails when a member clicks.
- Buttons only. Dropdown blueprints are rejected for now, even though the builder may let you make one.
- A message can contain up to 25 buttons, split across five rows of five.
- Button labels are capped at 80 characters.
- Buttons are all the same blurple color, with no custom emoji support yet.
- There is no exclusive group. Every button is independent, so a member can hold several of the roles at once.
- The role mapping lives only in the posted message. If the message is deleted, the setup is gone and there is no server-side copy to restore it.
