members_remove_role
members_remove_role
Section titled “members_remove_role”Category: members
Remove a single role from a guild member.
When to use
Section titled “When to use”- Targeted role revocation (e.g. revoke @verified).
When NOT to use
Section titled “When NOT to use”- Replacing the entire role set → use
members_modifywithroles.
| Field | Type | Required | Description |
|---|---|---|---|
guild_id | string | yes | Guild containing the member |
user_id | string | yes | Member to revoke the role from |
role_id | string | yes | Role to remove |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{removed, user_id, role_id\}. Idempotent — removing a role the user does not have is a no-op.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
removed | boolean | yes | |
user_id | string | yes | Discord user ID |
role_id | string | yes | Discord role ID |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |