Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clans] Adds documentation for user clan information #6836

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,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 |
| Clan Badge | clan-badges/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[badge_hash](#DOCS_RESOURCES_USER/user-object-user-clan).png \* | PNG, JPEG, WebP, GIF |

\* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. (example: `a_1269e74af4df7417b13759eae50c83dc`)

Expand Down
16 changes: 16 additions & 0 deletions docs/resources/User.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ There are other rules and restrictions not shared here for the sake of spam and
| 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 |
| clan? | ?UserClan | the user's [clan data](#DOCS_RESOURCES_USER/user-object-user-clan) | identify |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| clan? | ?UserClan | the user's [clan data](#DOCS_RESOURCES_USER/user-object-user-clan) | identify |
| clan? | ?[user clan](#DOCS_RESOURCES_USER/user-object-user-clan) object | the user's clan data | identify |

Leaving the table formatting aside (which currently this would probably break) the corresponding object should be mentioned in the type column entry and not the description to stay consistent across the docs...


###### Example User

Expand All @@ -59,6 +60,12 @@ There are other rules and restrictions not shared here for the sake of spam and
"accent_color": 16711680,
"premium_type": 1,
"public_flags": 64
"clan": {
"identity_guild_id": "1234647491267808778",
"identity_enabled": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if they've disabled identity shouldn't this whole clan object just not be serialized?

"tag": "DISC",
"badge": "7d1734ae5a615e82bc7a4033b98fade8"
},
}
```

Expand Down Expand Up @@ -93,6 +100,15 @@ Premium types denote the level of premium a user has. Visit the [Nitro](https://
| 2 | Nitro |
| 3 | Nitro Basic |

###### User Clan

| Field | Type | Description |
|-------------------|-----------|----------------------------------------------------------|
| identity_guild_id | snowflake | the id of the user's primary clan |
| identity_enabled | boolean | whether the user is displaying their clan tag |
| tag | string | the text of the user's clan tag. Limited to 4 characters |
| badge | string | the [clan badge hash](#DOCS_REFERENCE/image-formatting) |

### Connection Object

The connection object that the user has attached.
Expand Down