Skip to content

Commit a1bac5f

Browse files
hammerdrkirbycooladvaith1
authored
Document user guild tags (#6836)
* [primary guild] Add documentation for user primary guild. * Fix links * "object" * Update badge path and add null identity_enabled explainer. * Clarify null case * Update guild tag badge name * Fix tables --------- Co-authored-by: Kirby Cool <[email protected]> Co-authored-by: advaith <[email protected]>
1 parent 64a2eb6 commit a1bac5f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

docs/reference.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be
353353
| Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP |
354354
| 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 |
355355
| 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 |
356+
| 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 |
356357

357358
\* 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`)
358359

docs/resources/user.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ There are other rules and restrictions not shared here for the sake of spam and
4848
| public_flags? | integer | the public [flags](/docs/resources/user#user-object-user-flags) on a user's account | identify |
4949
| avatar_decoration_data? | ?[avatar decoration data](/docs/resources/user#avatar-decoration-data-object) object | data for the user's avatar decoration | identify |
5050
| collectibles? | ?[collectibles](/docs/resources/user#collectibles) object | data for the user's collectibles | identify |
51+
| primary_guild? | ?[user primary guild](/docs/resources/user#user-object-user-primary-guild) object | the user's primary guild | identify |
5152

5253
###### Example User
5354

@@ -75,6 +76,12 @@ There are other rules and restrictions not shared here for the sake of spam and
7576
"label": "",
7677
"palette": "cobalt"
7778
}
79+
},
80+
"primary_guild": {
81+
"identity_guild_id": "1234647491267808778",
82+
"identity_enabled": true,
83+
"tag": "DISC",
84+
"badge": "7d1734ae5a615e82bc7a4033b98fade8"
7885
}
7986
}
8087
```
@@ -110,6 +117,15 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https://
110117
| 2 | Nitro |
111118
| 3 | Nitro Basic |
112119

120+
###### User Primary Guild
121+
122+
| Field | Type | Description |
123+
|-------------------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
124+
| identity_guild_id | ?snowflake | the id of the user's primary guild |
125+
| 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. |
126+
| tag | ?string | the text of the user's server tag. Limited to 4 characters |
127+
| badge | ?string | the [server tag badge hash](/docs/reference#image-formatting) |
128+
113129
### Avatar Decoration Data Object
114130

115131
The data for the user's [avatar decoration](https://support.discord.com/hc/en-us/articles/13410113109911-Avatar-Decorations).

0 commit comments

Comments
 (0)