roles_delete
roles_delete
Section titled “roles_delete”Category: roles
Delete a role from a guild. DESTRUCTIVE — IRREVERSIBLE. All members holding this role lose it.
When to use
Section titled “When to use”- Tear down deprecated/integration roles.
When NOT to use
Section titled “When NOT to use”- Just removing the role from a single user → use
members_remove_role.
| Field | Type | Required | Description |
|---|---|---|---|
guild_id | string | yes | Guild containing the role |
role_id | string | yes | Role to delete (IRREVERSIBLE) |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{deleted, role_id, guild_id\}.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
deleted | boolean | yes | |
role_id | string | yes | Discord role ID |
guild_id | string | yes | Discord guild (server) ID |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | yes |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | yes (__confirm:true required) |