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

Adds support for user's avatar decorations #2668

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

ItsTheSky
Copy link

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

Adds support for the user's decoration avatar. Discord docs are outdated about the user's object, check this PR for the "updated" endpoints.

It's my first PR there, hope I did not break anything 😓

* @return The never-null SKU id of the {@link User User} decoration avatar.
*/
@Nonnull
public String getSkuId()
Copy link
Member

Choose a reason for hiding this comment

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

How is this useful to a bot?

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure how for now, but maybe JDA will add support for SKU later on? Should I just remove that entirely?

src/main/java/net/dv8tion/jda/api/entities/User.java Outdated Show resolved Hide resolved
@freya022
Copy link
Contributor

freya022 commented May 4, 2024

avatar_decoration_data is also available on Members, please add Member#getAvatarDecoration as well as Member#getEffectiveAvatarDecoration

@ItsTheSky
Copy link
Author

Do I use the same object present in User for adding support in Member?

@freya022
Copy link
Contributor

freya022 commented May 5, 2024

Yes, same object, but stored on the member, just like any member profile element that's also present on an user

@freya022
Copy link
Contributor

freya022 commented May 5, 2024

As Member and User have a decoration, might as well make AvatarDecoration be its own class, outside of User

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants