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

Support for avatar decoration #9343

Merged
merged 11 commits into from
Jan 27, 2024
Merged

Conversation

codeofandrin
Copy link
Contributor

Summary

This PR adds support for avatar decoration.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@codeofandrin codeofandrin marked this pull request as ready for review April 7, 2023 17:58
discord/user.py Show resolved Hide resolved
discord/asset.py Show resolved Hide resolved
@codeofandrin codeofandrin requested a review from Rapptz April 18, 2023 11:50
@owocado
Copy link
Contributor

owocado commented Apr 18, 2023

I have observed on few users profiles, the avatar decoration asset URL is in the format of
https://cdn.discordapp.com/avatar-decorations/{user_id}/{avatar_decoration_hash}.png
probably for legacy or very early released avatar decos, havent dig too deep into it. Is it in the scope of this PR to address those cases?

@Rapptz
Copy link
Owner

Rapptz commented Apr 18, 2023

I have observed on few users profiles, the avatar decoration asset URL is in the format of https://cdn.discordapp.com/avatar-decorations/{user_id}/{avatar_decoration_hash}.png probably for legacy or very early released avatar decos, havent dig too deep into it. Is it in the scope of this PR to address those cases?

This is the actual documented URL in the in-progress PR so it should be the one used.

@Rapptz Rapptz added the pending PR implements an in-progress or explicitly unreleased Discord feature label Apr 18, 2023
@Rapptz
Copy link
Owner

Rapptz commented Jul 14, 2023

If you have time please rebase this PR to the 2.4 release now that the docs PR is merged.

@codeofandrin
Copy link
Contributor Author

Done

@Soheab
Copy link
Contributor

Soheab commented Sep 30, 2023

Looks like the field is going to be changed or has already and returns an object now with the sku_id and asset
discord/discord-api-docs#6464

discord/member.py Outdated Show resolved Hide resolved
discord/user.py Outdated Show resolved Hide resolved
Copy link
Contributor

@owocado owocado left a comment

Choose a reason for hiding this comment

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

This change would be needed to prevent TypeError here.

Screenshot_20231011-161108_Pixel Launcher

discord/user.py Outdated Show resolved Hide resolved
Co-authored-by: owocado <[email protected]>
@Rapptz Rapptz merged commit e25b7ff into Rapptz:master Jan 27, 2024
@Rapptz Rapptz removed the pending PR implements an in-progress or explicitly unreleased Discord feature label Jan 27, 2024
@codeofandrin codeofandrin deleted the avatar_decoration branch May 17, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants