-
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
Conversation
Animated avatar decorations are not supported yet, right? |
some decorations are animated but they are returned as an animated png, you can't get them as a gif (like stickers) their hashes start with a_ |
@@ -321,9 +321,10 @@ Discord uses ids and hashes to render images in the client. These hashes can be | |||
| Default User Avatar | embed/avatars/[user_discriminator](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | | |||
| User Avatar | avatars/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_avatar](#DOCS_RESOURCES_USER/user-object).png \* | PNG, JPEG, WebP, GIF | | |||
| Guild Member Avatar | guilds/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/users/[user_id](#DOCS_RESOURCES_USER/user-object)/avatars/[member_avatar](#DOCS_RESOURCES_GUILD/guild-member-object).png \* | PNG, JPEG, WebP, GIF | | |||
| User Avatar Decoration | avatar-decorations/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_avatar_decoration](#DOCS_RESOURCES_USER/user-object).png | PNG | |
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.
| 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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
In what circumstances is this optional?
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 comment
The reason will be displayed to describe this comment to others. Learn more.
In what circumstances is this optional?
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
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 comment
The 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 comment
The 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 comment
The 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 comment
The 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
Co-authored-by: shay <[email protected]>
currently it checks the client version when deciding whether to return the avatar decoration hash, can that be fixed for bots and oauth2? (setting x-super-properties works as a workaround)
resolves #5690