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

User#avatarDecoration property is always null. #10203

Closed
BannerBomb opened this issue Apr 2, 2024 · 4 comments · Fixed by #9888
Closed

User#avatarDecoration property is always null. #10203

BannerBomb opened this issue Apr 2, 2024 · 4 comments · Fixed by #9888

Comments

@BannerBomb
Copy link
Contributor

BannerBomb commented Apr 2, 2024

Which package is this bug report for?

discord.js

Issue description

image
As you can see my profile has that clown decoration. But User#avatarDecoration is showing null.

this.avatarDecoration = data.avatar_decoration;

Looking at the raw data from the gateway. There is no "avatar_decoration" property. Only a "avatar_decoration_data" property. Which is an object of "sku_id" and "asset" properties.

Code sample

No response

Versions

v14.14.1

Issue priority

Low (slightly annoying)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

Guilds, GuildMembers, GuildModeration, GuildEmojisAndStickers, GuildPresences, GuildMessages, GuildMessageReactions, GuildMessageTyping, DirectMessages, DirectMessageReactions, DirectMessageTyping, MessageContent

I have tested this issue on a development release

No response

@BannerBomb BannerBomb changed the title User#avatarDecoration and User#banner property is always null. User#avatarDecoration property is always null. Apr 2, 2024
@BannerBomb
Copy link
Contributor Author

BannerBomb commented Apr 2, 2024

Edited the title, as I found another issue about the "banner" being null, but found it isn't null when using client.users.fetch('ID', { force: true })

@monbrey
Copy link
Member

monbrey commented Apr 2, 2024

The avatar_decoration_data issue may be a valid bug - thank you for reporting.

The banner being null is expected - Discord does not include this data in the user object send with events, and it must be explicitly fetched to retrieve it. This is documented.

image

@BannerBomb
Copy link
Contributor Author

BannerBomb commented Apr 2, 2024

The avatar_decoration_data issue may be a valid bug - thank you for reporting.

The banner being null is expected - Discord does not include this data in the user object send with events, and it must be explicitly fetched to retrieve it. This is documented.

image

yeah, I realized the banner one needed to be force fetched after making the report. Which is why I removed it from the post.
I could make a pr for fixing the avatarDecoration. But I don't know how y'all would want to handle the object that is provided by the API.

@Jiralite
Copy link
Member

Jiralite commented Apr 2, 2024

The avatar_decoration_data issue may be a valid bug - thank you for reporting.

Unfortunately not: Discord renamed the property from avatar_decoration to avatar_decoration_data (discord/discord-api-docs#6464). Therefore, it being always null is correct behaviour.

Since Discord has not merged the change of documentation, there is nothing (yet) to do.

I could make a pr for fixing the avatarDecoration. But I don't know how y'all would want to handle the object that is provided by the API.

#9888 exists as a draft for when Discord is ready to document the change, but as said above, there's nothing that can be done otherwise.

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@Jiralite Jiralite reopened this Apr 2, 2024
@Jiralite Jiralite linked a pull request Apr 2, 2024 that will close this issue
@kodiakhq kodiakhq bot closed this as completed in #9888 Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants