From 96a6b93bf90c92d6d0e16f60cc8d6162eb055c37 Mon Sep 17 00:00:00 2001 From: Derek Hammer Date: Thu, 2 May 2024 20:38:20 +0000 Subject: [PATCH 1/7] [primary guild] Add documentation for user primary guild. --- docs/reference.mdx | 1 + docs/resources/user.mdx | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/reference.mdx b/docs/reference.mdx index 0d7503e6b9..7323993492 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -353,6 +353,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP | | Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild-scheduled-event#guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild-scheduled-event#guild-scheduled-event-object).png | PNG, JPEG, WebP | | Guild Member Banner | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/banners/[member_banner](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | +| Server Tag Badge | clan-badges/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[badge_hash](#DOCS_RESOURCES_USER/user-object-user-primary-guild).png \* | PNG, JPEG, WebP | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. These images can also be retrieved as animated WebP using the `?animated=true` querystring parameter. (example: `a_1269e74af4df7417b13759eae50c83dc`) diff --git a/docs/resources/user.mdx b/docs/resources/user.mdx index 41b1b0a751..15be505034 100644 --- a/docs/resources/user.mdx +++ b/docs/resources/user.mdx @@ -48,6 +48,7 @@ There are other rules and restrictions not shared here for the sake of spam and | 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 | | collectibles? | ?[collectibles](/docs/resources/user#collectibles) object | data for the user's collectibles | identify | +| primary_guild? | ?[user primary guild](/docs/resources/user#user-object-user-primary-guild) | the user's primary guild | identify | ###### Example User @@ -75,6 +76,12 @@ There are other rules and restrictions not shared here for the sake of spam and "label": "", "palette": "cobalt" } + }, + "primary_guild": { + "identity_guild_id": "1234647491267808778", + "identity_enabled": true, + "tag": "DISC", + "badge": "7d1734ae5a615e82bc7a4033b98fade8" } } ``` @@ -110,6 +117,15 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https:// | 2 | Nitro | | 3 | Nitro Basic | +###### User Primary Guild + +| Field | Type | Description | +|-------------------|------------|---------------------------------------------------------------| +| identity_guild_id | ?snowflake | the id of the user's primary guild | +| identity_enabled | ?boolean | whether the user is displaying the primary guild's server tag | +| tag | ?string | the text of the user's server tag. Limited to 4 characters | +| badge | ?string | the [server tag badge hash](#DOCS_REFERENCE/image-formatting) | + ### Avatar Decoration Data Object The data for the user's [avatar decoration](https://support.discord.com/hc/en-us/articles/13410113109911-Avatar-Decorations). From b359b29cca8a1b3a5df48f1a28ad7fc63587c609 Mon Sep 17 00:00:00 2001 From: Kirby Cool Date: Tue, 24 Jun 2025 13:28:41 -0700 Subject: [PATCH 2/7] Fix links --- docs/reference.mdx | 2 +- docs/resources/user.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference.mdx b/docs/reference.mdx index 7323993492..8f7d3f002b 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -353,7 +353,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP | | Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild-scheduled-event#guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild-scheduled-event#guild-scheduled-event-object).png | PNG, JPEG, WebP | | Guild Member Banner | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/banners/[member_banner](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | -| Server Tag Badge | clan-badges/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[badge_hash](#DOCS_RESOURCES_USER/user-object-user-primary-guild).png \* | PNG, JPEG, WebP | +| Server Tag Badge | clan-badges/[guild_id](/docs/resources/guild#guild-object)/[badge_hash](/docs/resources/user#user-object-user-primary-guild).png \* | PNG, JPEG, WebP | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. These images can also be retrieved as animated WebP using the `?animated=true` querystring parameter. (example: `a_1269e74af4df7417b13759eae50c83dc`) diff --git a/docs/resources/user.mdx b/docs/resources/user.mdx index 15be505034..032cf9060f 100644 --- a/docs/resources/user.mdx +++ b/docs/resources/user.mdx @@ -124,7 +124,7 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https:// | identity_guild_id | ?snowflake | the id of the user's primary guild | | identity_enabled | ?boolean | whether the user is displaying the primary guild's server tag | | tag | ?string | the text of the user's server tag. Limited to 4 characters | -| badge | ?string | the [server tag badge hash](#DOCS_REFERENCE/image-formatting) | +| badge | ?string | the [server tag badge hash](/docs/reference#image-formatting) | ### Avatar Decoration Data Object From 16d23a6c5ec0878a38ff43a32679c72e4c79eace Mon Sep 17 00:00:00 2001 From: advaith Date: Tue, 24 Jun 2025 13:43:54 -0700 Subject: [PATCH 3/7] "object" --- docs/resources/user.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/user.mdx b/docs/resources/user.mdx index 032cf9060f..ee1b400b68 100644 --- a/docs/resources/user.mdx +++ b/docs/resources/user.mdx @@ -48,7 +48,7 @@ There are other rules and restrictions not shared here for the sake of spam and | 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 | | collectibles? | ?[collectibles](/docs/resources/user#collectibles) object | data for the user's collectibles | identify | -| primary_guild? | ?[user primary guild](/docs/resources/user#user-object-user-primary-guild) | the user's primary guild | identify | +| primary_guild? | ?[user primary guild](/docs/resources/user#user-object-user-primary-guild) object | the user's primary guild | identify | ###### Example User From 6faeb15973be687a5c6271852dfdfdcec096a042 Mon Sep 17 00:00:00 2001 From: Kirby Cool Date: Tue, 1 Jul 2025 12:16:23 -0700 Subject: [PATCH 4/7] Update badge path and add null identity_enabled explainer. --- docs/reference.mdx | 2 +- docs/resources/user.mdx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/reference.mdx b/docs/reference.mdx index 8f7d3f002b..153dfa26be 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -353,7 +353,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP | | Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild-scheduled-event#guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild-scheduled-event#guild-scheduled-event-object).png | PNG, JPEG, WebP | | Guild Member Banner | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/banners/[member_banner](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | -| Server Tag Badge | clan-badges/[guild_id](/docs/resources/guild#guild-object)/[badge_hash](/docs/resources/user#user-object-user-primary-guild).png \* | PNG, JPEG, WebP | +| Server Tag Badge | guild-tag-badges/[guild_id](/docs/resources/guild#guild-object)/[badge_hash](/docs/resources/user#user-object-user-primary-guild).png | PNG, JPEG, WebP | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. These images can also be retrieved as animated WebP using the `?animated=true` querystring parameter. (example: `a_1269e74af4df7417b13759eae50c83dc`) diff --git a/docs/resources/user.mdx b/docs/resources/user.mdx index ee1b400b68..9330b3c955 100644 --- a/docs/resources/user.mdx +++ b/docs/resources/user.mdx @@ -119,12 +119,12 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https:// ###### User Primary Guild -| Field | Type | Description | -|-------------------|------------|---------------------------------------------------------------| -| identity_guild_id | ?snowflake | the id of the user's primary guild | -| identity_enabled | ?boolean | whether the user is displaying the primary guild's server tag | -| tag | ?string | the text of the user's server tag. Limited to 4 characters | -| badge | ?string | the [server tag badge hash](/docs/reference#image-formatting) | +| Field | Type | Description | +|-------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| identity_guild_id | ?snowflake | the id of the user's primary guild | +| identity_enabled | ?boolean | whether the user is displaying the primary guild's server tag. This can be `null` if the user has never adopted an identity or if the system clears the identity, e.g. because the server no longer supports tags. | +| tag | ?string | the text of the user's server tag. Limited to 4 characters | +| badge | ?string | the [server tag badge hash](/docs/reference#image-formatting) | ### Avatar Decoration Data Object From 96e17b67f3f8ee6cd81c8d4152a5480b443993b0 Mon Sep 17 00:00:00 2001 From: Kirby Cool Date: Tue, 1 Jul 2025 12:28:01 -0700 Subject: [PATCH 5/7] Clarify null case --- docs/resources/user.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/user.mdx b/docs/resources/user.mdx index 9330b3c955..76a187558c 100644 --- a/docs/resources/user.mdx +++ b/docs/resources/user.mdx @@ -122,7 +122,7 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https:// | Field | Type | Description | |-------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | identity_guild_id | ?snowflake | the id of the user's primary guild | -| identity_enabled | ?boolean | whether the user is displaying the primary guild's server tag. This can be `null` if the user has never adopted an identity or if the system clears the identity, e.g. because the server no longer supports tags. | +| identity_enabled | ?boolean | whether the user is displaying the primary guild's server tag. This can be `null` if the system clears the identity, e.g. because the server no longer supports tags. | | tag | ?string | the text of the user's server tag. Limited to 4 characters | | badge | ?string | the [server tag badge hash](/docs/reference#image-formatting) | From 5b010b730d0d44898f05d154d7ca26fb0b352017 Mon Sep 17 00:00:00 2001 From: Kirby Cool Date: Tue, 1 Jul 2025 12:28:42 -0700 Subject: [PATCH 6/7] Update guild tag badge name --- docs/reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference.mdx b/docs/reference.mdx index 153dfa26be..10ff48b64d 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -353,7 +353,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP | | Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild-scheduled-event#guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild-scheduled-event#guild-scheduled-event-object).png | PNG, JPEG, WebP | | Guild Member Banner | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/banners/[member_banner](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | -| Server Tag Badge | guild-tag-badges/[guild_id](/docs/resources/guild#guild-object)/[badge_hash](/docs/resources/user#user-object-user-primary-guild).png | PNG, JPEG, WebP | +| Guild Tag Badge | guild-tag-badges/[guild_id](/docs/resources/guild#guild-object)/[badge_hash](/docs/resources/user#user-object-user-primary-guild).png | PNG, JPEG, WebP | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. These images can also be retrieved as animated WebP using the `?animated=true` querystring parameter. (example: `a_1269e74af4df7417b13759eae50c83dc`) From ff3ef277bee41b6d15a86c8d35e5cc3467fd410a Mon Sep 17 00:00:00 2001 From: Kirby Cool Date: Tue, 1 Jul 2025 13:03:16 -0700 Subject: [PATCH 7/7] Fix tables --- docs/reference.mdx | 2 +- docs/resources/user.mdx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/reference.mdx b/docs/reference.mdx index 10ff48b64d..33606ed8aa 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -353,7 +353,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP | | Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild-scheduled-event#guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild-scheduled-event#guild-scheduled-event-object).png | PNG, JPEG, WebP | | Guild Member Banner | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/banners/[member_banner](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | -| Guild Tag Badge | guild-tag-badges/[guild_id](/docs/resources/guild#guild-object)/[badge_hash](/docs/resources/user#user-object-user-primary-guild).png | PNG, JPEG, WebP | +| Guild Tag Badge | guild-tag-badges/[guild_id](/docs/resources/guild#guild-object)/[badge_hash](/docs/resources/user#user-object-user-primary-guild).png | PNG, JPEG, WebP | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. These images can also be retrieved as animated WebP using the `?animated=true` querystring parameter. (example: `a_1269e74af4df7417b13759eae50c83dc`) diff --git a/docs/resources/user.mdx b/docs/resources/user.mdx index 76a187558c..f31d414156 100644 --- a/docs/resources/user.mdx +++ b/docs/resources/user.mdx @@ -119,12 +119,12 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https:// ###### User Primary Guild -| Field | Type | Description | -|-------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| identity_guild_id | ?snowflake | the id of the user's primary guild | +| Field | Type | Description | +|-------------------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| identity_guild_id | ?snowflake | the id of the user's primary guild | | identity_enabled | ?boolean | whether the user is displaying the primary guild's server tag. This can be `null` if the system clears the identity, e.g. because the server no longer supports tags. | -| tag | ?string | the text of the user's server tag. Limited to 4 characters | -| badge | ?string | the [server tag badge hash](/docs/reference#image-formatting) | +| tag | ?string | the text of the user's server tag. Limited to 4 characters | +| badge | ?string | the [server tag badge hash](/docs/reference#image-formatting) | ### Avatar Decoration Data Object