From 1cac66d95ea14a9d67daec39b0f6b119d81c52e8 Mon Sep 17 00:00:00 2001 From: advaith Date: Thu, 28 Sep 2023 15:56:50 -0700 Subject: [PATCH 1/5] Update avatar decoration docs --- docs/Reference.md | 2 +- docs/resources/User.md | 49 ++++++++++++++++++++++++++---------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 120a08900f..404b1c7c77 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -332,7 +332,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Default User Avatar | embed/avatars/[index](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | | User Avatar | avatars/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_avatar](#DOCS_RESOURCES_USER/user-object).png \* | PNG, JPEG, WebP, GIF | | Guild Member Avatar | guilds/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/users/[user_id](#DOCS_RESOURCES_USER/user-object)/avatars/[member_avatar](#DOCS_RESOURCES_GUILD/guild-member-object).png \* | PNG, JPEG, WebP, GIF | -| User Avatar Decoration | avatar-decorations/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_avatar_decoration](#DOCS_RESOURCES_USER/user-object).png | PNG | +| Avatar Decoration | avatar-decoration-presets/[avatar_decoration_data_asset](#DOCS_RESOURCES_USER/avatar-decoration-data-object).png | PNG | | Application Icon | app-icons/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[icon](#DOCS_RESOURCES_APPLICATION/application-object).png | PNG, JPEG, WebP | | Application Cover | app-icons/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[cover_image](#DOCS_RESOURCES_APPLICATION/application-object).png | PNG, JPEG, WebP | | Application Asset | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[asset_id](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-assets).png | PNG, JPEG, WebP | diff --git a/docs/resources/User.md b/docs/resources/User.md index b3d61312d6..43e83ea258 100644 --- a/docs/resources/User.md +++ b/docs/resources/User.md @@ -24,25 +24,25 @@ There are other rules and restrictions not shared here for the sake of spam and ###### User Structure -| Field | Type | Description | Required OAuth2 Scope | -|--------------------|-----------|------------------------------------------------------------------------------------------------------|-----------------------| -| id | snowflake | the user's id | identify | -| username | string | the user's username, not unique across the platform | identify | -| discriminator | string | the user's Discord-tag | identify | -| global_name | ?string | the user's display name, if it is set. For bots, this is the application name | identify | -| avatar | ?string | the user's [avatar hash](#DOCS_REFERENCE/image-formatting) | identify | -| bot? | boolean | whether the user belongs to an OAuth2 application | identify | -| system? | boolean | whether the user is an Official Discord System user (part of the urgent message system) | identify | -| mfa_enabled? | boolean | whether the user has two factor enabled on their account | identify | -| banner? | ?string | the user's [banner hash](#DOCS_REFERENCE/image-formatting) | identify | -| accent_color? | ?integer | the user's banner color encoded as an integer representation of hexadecimal color code | identify | -| locale? | string | the user's chosen [language option](#DOCS_REFERENCE/locales) | identify | -| verified? | boolean | whether the email on this account has been verified | email | -| email? | ?string | the user's email | email | -| flags? | integer | the [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify | -| premium_type? | integer | the [type of Nitro subscription](#DOCS_RESOURCES_USER/user-object-premium-types) on a user's account | identify | -| public_flags? | integer | the public [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify | -| avatar_decoration? | ?string | the user's [avatar decoration hash](#DOCS_REFERENCE/image-formatting) | identify | +| Field | Type | Description | Required OAuth2 Scope | +|-------------------------|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|-----------------------| +| id | snowflake | the user's id | identify | +| username | string | the user's username, not unique across the platform | identify | +| discriminator | string | the user's Discord-tag | identify | +| global_name | ?string | the user's display name, if it is set. For bots, this is the application name | identify | +| avatar | ?string | the user's [avatar hash](#DOCS_REFERENCE/image-formatting) | identify | +| bot? | boolean | whether the user belongs to an OAuth2 application | identify | +| system? | boolean | whether the user is an Official Discord System user (part of the urgent message system) | identify | +| mfa_enabled? | boolean | whether the user has two factor enabled on their account | identify | +| banner? | ?string | the user's [banner hash](#DOCS_REFERENCE/image-formatting) | identify | +| accent_color? | ?integer | the user's banner color encoded as an integer representation of hexadecimal color code | identify | +| locale? | string | the user's chosen [language option](#DOCS_REFERENCE/locales) | identify | +| verified? | boolean | whether the email on this account has been verified | email | +| email? | ?string | the user's email | email | +| flags? | integer | the [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify | +| premium_type? | integer | the [type of Nitro subscription](#DOCS_RESOURCES_USER/user-object-premium-types) on a user's account | identify | +| public_flags? | integer | the public [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify | +| avatar_decoration_data? | ?[avatar decoration data](#DOCS_RESOURCES_USER/avatar-decoration-data-object) object | data for the user's avatar decoration | identify | ###### Example User @@ -93,6 +93,17 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https:// | 2 | Nitro | | 3 | Nitro Basic | +### Avatar Decoration Data Object + +The data for the user's [avatar decoration](https://support.discord.com/hc/en-us/articles/13410113109911-Avatar-Decorations). + +###### Avatar Decoration Data Structure + +| Field | Type | Description | +| ------ | --------- | -------------------------------------------------------------- | +| asset | string | the [avatar decoration hash](#DOCS_REFERENCE/image-formatting) | +| sku_id | snowflake | the id of the avatar decoration's SKU | + ### Connection Object The connection object that the user has attached. From e321ecd0cb286001e30aacc96bdf0b5f87332bf9 Mon Sep 17 00:00:00 2001 From: advaith Date: Thu, 28 Sep 2023 16:00:06 -0700 Subject: [PATCH 2/5] add to example user --- docs/resources/User.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/resources/User.md b/docs/resources/User.md index 43e83ea258..8ae40511c4 100644 --- a/docs/resources/User.md +++ b/docs/resources/User.md @@ -58,7 +58,11 @@ There are other rules and restrictions not shared here for the sake of spam and "banner": "06c16474723fe537c283b8efa61a30c8", "accent_color": 16711680, "premium_type": 1, - "public_flags": 64 + "public_flags": 64, + "avatar_decoration_data": { + "sku_id": "1144058844004233369", + "asset": "a_fed43ab12698df65902ba06727e20c0e" + } } ``` From caf5eb5fa108159735fae3aa1af6b2497d24695a Mon Sep 17 00:00:00 2001 From: advaith Date: Thu, 28 Sep 2023 16:20:02 -0700 Subject: [PATCH 3/5] oh is this the standard formatting now --- docs/resources/User.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/User.md b/docs/resources/User.md index 8ae40511c4..b7de52d617 100644 --- a/docs/resources/User.md +++ b/docs/resources/User.md @@ -104,7 +104,7 @@ The data for the user's [avatar decoration](https://support.discord.com/hc/en-us ###### Avatar Decoration Data Structure | Field | Type | Description | -| ------ | --------- | -------------------------------------------------------------- | +|--------|-----------|----------------------------------------------------------------| | asset | string | the [avatar decoration hash](#DOCS_REFERENCE/image-formatting) | | sku_id | snowflake | the id of the avatar decoration's SKU | From 16cbede18fd8b5805d74dfd935208501074d738a Mon Sep 17 00:00:00 2001 From: advaith Date: Mon, 11 Mar 2024 13:12:51 -0700 Subject: [PATCH 4/5] add guild member avatar decoration field --- docs/resources/Guild.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/resources/Guild.md b/docs/resources/Guild.md index 225ed0384e..b887966dbf 100644 --- a/docs/resources/Guild.md +++ b/docs/resources/Guild.md @@ -342,20 +342,21 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl ###### Guild Member Structure -| Field | Type | Description | -|-------------------------------|-------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user this guild member represents | -| nick? | ?string | this user's guild nickname | -| avatar? | ?string | the member's [guild avatar hash](#DOCS_REFERENCE/image-formatting) | -| roles | array of snowflakes | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids | -| joined_at | ISO8601 timestamp | when the user joined the guild | -| premium_since? | ?ISO8601 timestamp | when the user started [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild | -| deaf | boolean | whether the user is deafened in voice channels | -| mute | boolean | whether the user is muted in voice channels | -| flags | integer | [guild member flags](#DOCS_RESOURCES_GUILD/guild-member-object-guild-member-flags) represented as a bit set, defaults to `0` | -| pending? | boolean | whether the user has not yet passed the guild's [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) requirements | -| permissions? | string | total permissions of the member in the channel, including overwrites, returned when in the interaction object | -| communication_disabled_until? | ?ISO8601 timestamp | when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out | +| Field | Type | Description | +|-------------------------------|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user this guild member represents | +| nick? | ?string | this user's guild nickname | +| avatar? | ?string | the member's [guild avatar hash](#DOCS_REFERENCE/image-formatting) | +| roles | array of snowflakes | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids | +| joined_at | ISO8601 timestamp | when the user joined the guild | +| premium_since? | ?ISO8601 timestamp | when the user started [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild | +| deaf | boolean | whether the user is deafened in voice channels | +| mute | boolean | whether the user is muted in voice channels | +| flags | integer | [guild member flags](#DOCS_RESOURCES_GUILD/guild-member-object-guild-member-flags) represented as a bit set, defaults to `0` | +| pending? | boolean | whether the user has not yet passed the guild's [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) requirements | +| permissions? | string | total permissions of the member in the channel, including overwrites, returned when in the interaction object | +| communication_disabled_until? | ?ISO8601 timestamp | when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out | +| avatar_decoration_data? | ?[avatar decoration data](#DOCS_RESOURCES_USER/avatar-decoration-data-object) object | data for the member's guild avatar decoration | > info > The field `user` won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events. From 6cd435f8b67b71bcc423ac968ac32777c23be2bf Mon Sep 17 00:00:00 2001 From: shay Date: Tue, 14 May 2024 15:40:52 -0400 Subject: [PATCH 5/5] Update docs/resources/User.md --- docs/resources/User.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/User.md b/docs/resources/User.md index b7de52d617..df083d998c 100644 --- a/docs/resources/User.md +++ b/docs/resources/User.md @@ -106,7 +106,7 @@ The data for the user's [avatar decoration](https://support.discord.com/hc/en-us | Field | Type | Description | |--------|-----------|----------------------------------------------------------------| | asset | string | the [avatar decoration hash](#DOCS_REFERENCE/image-formatting) | -| sku_id | snowflake | the id of the avatar decoration's SKU | +| sku_id | snowflake | id of the avatar decoration's SKU | ### Connection Object