-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Document avatar decorations #5723
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,24 +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 | | ||
| 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 | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In what circumstances is this optional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Partial data I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'd assume this is the same situation with banners where it's only returned via GW and /users. I'll check in a second There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
From what I've seen, avatar_decoration seems to be always available, even on partial users. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense, I guess? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's present on normal user objects but not on bare user objects like webhook message authors |
||
|
||
###### Example User | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebP and JPEG are also supported from the looks of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it responds with a png image (for animated ones at least)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. Interesting.