Skip to content

Commit eb40fbc

Browse files
hammerdrkirbycool
authored andcommitted
[primary guild] Add documentation for user primary guild.
1 parent 087c544 commit eb40fbc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/reference.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be
330330

331331
###### CDN Endpoints
332332

333+
<<<<<<< HEAD:docs/reference.mdx
333334
| Type | Path | Supports |
334335
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
335336
| Custom Emoji | emojis/[emoji_id](/docs/resources/emoji#emoji-object).png \*\*\*\*\* | PNG, JPEG, WebP, GIF, AVIF |
@@ -353,6 +354,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be
353354
| Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP |
354355
| 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 |
355356
| 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 |
357+
| 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 |
356358

357359
\* 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`)
358360

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) | 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 |
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)