---
updatedAt: 2026-09-01T16:18:41.000Z
---

Fetch the complete documentation index at: https://developers.wabbit.gg/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Modify Roles

# Modify Roles

Add, remove, or toggle a role (optionally temporary)

## Fields

| Field          | Type                                       | Required | Description                                                                                                                            |
| -------------- | ------------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `operation`    | enum: add \| remove \| toggle              | yes      | toggle inverts current membership.                                                                                                     |
| `roleId`       | string                                     | yes      | Must be below the bot's highest role, unmanaged, and not @everyone.                                                                    |
| `duration`     | number (ms, as string) or { path } or null | no       | Only meaningful for operation 'add'. null is permanent. Re-adding an already-held role with a duration extends its expiration instead. |
| `targetUserId` | string or { path }                         | no       | Cross-user write target.                                                                                                               |

## Example

```json
{
  "id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
  "type": "modify_roles",
  "operation": "add",
  "roleId": "123456789012345678",
  "duration": null
}
```