From 6525c035c704e3c6698d498acb587cffe94857c1 Mon Sep 17 00:00:00 2001 From: nyrrren <118135776+Furnyr@users.noreply.github.com> Date: Mon, 13 Jan 2025 18:22:01 +0100 Subject: [PATCH] Document CURRENT_GUILD_MEMBER_UPDATE (#7130) * Document CURRENT_GUILD_MEMBER_UPDATE * Fix CURRENT_GUILD_MEMBER_UPDATE scopes Co-authored-by: advaith * Fix color string * Document GuildMemberRPC --------- Co-authored-by: advaith --- docs/developer_tools/Embedded_App_SDK.mdx | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/docs/developer_tools/Embedded_App_SDK.mdx b/docs/developer_tools/Embedded_App_SDK.mdx index bacde5041d..698d6b6527 100644 --- a/docs/developer_tools/Embedded_App_SDK.mdx +++ b/docs/developer_tools/Embedded_App_SDK.mdx @@ -793,6 +793,7 @@ Developers may use the following events alongside the `subscribe()` SDK method t | [ACTIVITY_LAYOUT_MODE_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/activitylayoutmodeupdate) | Received when a user changes the layout mode in the Discord client | | [ORIENTATION_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/orientationupdate) | Received when screen orientation changes | | [CURRENT_USER_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/currentuserupdate) | Received when the current user object changes | +| [CURRENT_GUILD_MEMBER_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/currentguildmemberupdate) | Received when the current guild member object changes | | [THERMAL_STATE_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/thermalstateupdate) | Received when Android or iOS thermal states are surfaced to the Discord app | | [ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/activityinstanceparticipantsupdate) | Received when the number of instance participants changes | | [ENTITLEMENT_CREATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/entitlementcreate) | Received when an entitlement is created for a SKU | @@ -977,6 +978,33 @@ Received when the current user object changes. --- +### CURRENT_GUILD_MEMBER_UPDATE + +Received when the current guild member object changes. + +#### Required Scopes + +- identify +- guilds.members.read + +#### Sample Event Payload + +```javascript +{ + "user_id": "7173771622812225536", + "nick": "beef_supreme", + "guild_id": "613425648685547541" + "avatar": "abcdefg", + "avatar_decoration_data": { + "asset": "abcdefg", + "sku_id": "123456789" + }, + "color_string": "#ffff00" +} +``` + +--- + ### THERMAL_STATE_UPDATE Received when Android or iOS thermal states are surfaced to the Discord mobile app. @@ -1292,6 +1320,17 @@ No scopes required | deaf | boolean | | mute | boolean | +#### GuildMemberRPC + +| Property | Type | +|-------------------------|---------------------------------------------------------------------------------------------| +| user_id | string | +| nick? | string \| null | +| guild_id | string | +| avatar? | string \| null | +| avatar_decoration_data? | [AvatarDecorationData](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/avatardecorationdata) \| null | +| color_string? | string \| null | + #### Image | Property | Type |