members_add_role
members_add_role
Section titled “members_add_role”Category: members
Add a single role to a guild member.
When to use
Section titled “When to use”- Targeted role grant (e.g. give @verified to a single user).
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 grant the role to |
role_id | string | yes | Role to add |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{added, user_id, role_id\}. Idempotent — re-adding is a no-op.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
added | 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 |