> For the complete documentation index, see [llms.txt](https://miulien.gitbook.io/bot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://miulien.gitbook.io/bot/en/utilities/role.md).

# Role Management (role)

Run `/role` to open an interactive role-management panel. No subcommand is needed.

## Assign or remove roles

1. Choose **Assign roles** or **Remove roles**.
2. Select **1–25 members** with Discord's native member selector.
3. Select **1–5 roles** with the role selector.
4. Miulien processes the batch and reports successes, unchanged accounts, and failures. An individual failure does not stop the rest of the batch.

Already-held roles are not assigned again; absent roles are not removed again. Bulk selections are stored only for the duration of the interaction.

## Automatic roles for new members

Open **Auto Roles** to manage rules. Each server can configure up to **five** automatic roles, each targeting:

* **Bots only**
* **Human users only**
* **Both bots and human users**

**Add/Edit Rule** updates only the selected role, **without overwriting other rules**. **Delete Selected Rule** deletes one configuration, while **Clear All** requires confirmation. Existing legacy auto-role settings remain, with **human users only** as their default audience.

When someone joins the server, Miulien assigns eligible roles according to account type. Deleted or unassignable roles are skipped.

> Automatic roles trigger **when a member joins**. They do not scan existing members or instantly restore manually removed roles; the member must rejoin for the rule to apply again.

## Permissions and limits

* Both the moderator and Miulien require **Manage Roles**.
* `@everyone` and integration-managed roles cannot be managed.
* Target roles must be **below Miulien's highest role**.
* Ordinary moderators can only manage roles below their own highest role.
* The **server owner** is exempt from their personal role hierarchy limit, but not from Miulien's hierarchy limit.
* Auto-role settings persist across bot restarts.

For self-assignable roles, see [Reaction Roles](/bot/en/utilities/reactionrole.md).
