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
{
"id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
"type": "modify_roles",
"operation": "add",
"roleId": "123456789012345678",
"duration": null
}Updated about 14 hours ago
Did this page help you?
