members_modify
members_modify
Section titled “members_modify”Category: members
Modify a guild member’s nick, roles, voice state, or timeout. One tool covers the full PATCH /guilds/{guild.id}/members/{user.id} surface.
When to use
Section titled “When to use”- Set/clear nickname (
nick). - Replace role set wholesale (
roles). To add/remove a single role, prefermembers_add_role/members_remove_role. - Server mute/deaf in voice (
mute,deaf). - Move user between voice channels (
channel_id). - Apply a timeout (
communication_disabled_until, ISO-8601 timestamp). - Adjust member flags bitfield (
flags).
Pass only the fields you want to change. Discord ignores undefined fields.
When NOT to use
Section titled “When NOT to use”| Field | Type | Required | Description |
|---|---|---|---|
guild_id | string | yes | Guild containing the member |
user_id | string | yes | Member to modify |
nick | unknown | no | Nickname (null to clear) |
roles | array | no | Replace role set wholesale |
mute | boolean | no | Server-mute in voice |
deaf | boolean | no | Server-deafen in voice |
channel_id | unknown | no | Voice channel to move to (null to disconnect) |
communication_disabled_until | unknown | no | ISO-8601 timestamp ending the timeout (null to clear, max 28 days from now) |
flags | integer | no | Member flags bitfield |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{user_id, nick, roles\}.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Discord user ID |
nick | unknown | yes | |
roles | array | yes |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |