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

feat: implement Avatar Decorations #2131

Merged
merged 10 commits into from Jan 31, 2024

Conversation

NeloBlivion
Copy link
Member

@NeloBlivion NeloBlivion commented Jun 18, 2023

Summary

Better late than never...?
There seems to be several different endpoints, so I've tried to include them.
Despite no longer being available, you can still get any user's decoration.
Unlike banners, User.avatar_decoration is always received without needing to fetch the user.

Information

  • 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, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@codecov
Copy link

codecov bot commented Jun 18, 2023

Codecov Report

Merging #2131 (fe0d2f7) into master (ca2f5da) will decrease coverage by 0.01%.
The diff coverage is 30.76%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2131      +/-   ##
==========================================
- Coverage   33.88%   33.88%   -0.01%     
==========================================
  Files         109      109              
  Lines       22343    22356      +13     
==========================================
+ Hits         7571     7575       +4     
- Misses      14772    14781       +9     
Flag Coverage Δ
macos-latest-3.10 33.86% <30.76%> (-0.01%) ⬇️
macos-latest-3.11 33.86% <30.76%> (-0.01%) ⬇️
macos-latest-3.8 33.86% <30.76%> (-0.01%) ⬇️
macos-latest-3.9 33.86% <30.76%> (-0.01%) ⬇️
ubuntu-latest-3.10 33.86% <30.76%> (-0.01%) ⬇️
ubuntu-latest-3.11 33.86% <30.76%> (-0.01%) ⬇️
ubuntu-latest-3.8 33.86% <30.76%> (-0.01%) ⬇️
ubuntu-latest-3.9 33.86% <30.76%> (-0.01%) ⬇️
windows-latest-3.10 33.86% <30.76%> (-0.01%) ⬇️
windows-latest-3.11 33.86% <30.76%> (-0.01%) ⬇️
windows-latest-3.8 33.86% <30.76%> (-0.01%) ⬇️
windows-latest-3.9 33.86% <30.76%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
discord/user.py 36.84% <25.00%> (-0.48%) ⬇️
discord/asset.py 38.77% <40.00%> (+0.04%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca2f5da...fe0d2f7. Read the comment docs.

@Lulalaby Lulalaby marked this pull request as draft June 18, 2023 14:14
@JustaSqu1d JustaSqu1d added feature Implements a feature API Reflection Discords API wasn't correctly reflected in the lib labels Jun 18, 2023
@OmLanke
Copy link
Contributor

OmLanke commented Jul 14, 2023

discord/discord-api-docs#5723 got merged. This can too?

@Lulalaby
Copy link
Member

On hold till adc rolls out

@Dorukyum
Copy link
Member

On hold till adc rolls out

@Lulalaby update?

@Lulalaby
Copy link
Member

There have been some recent changes. Imma look this week

@Lulalaby
Copy link
Member

lets finish that up

@Dorukyum Dorukyum removed the on hold label Jan 25, 2024
Signed-off-by: UK <41271523+NeloBlivion@users.noreply.github.com>
@NeloBlivion
Copy link
Member Author

Decorations haven't changed much, apart from one thing; we now recieve a dict avatar_decoration_data instead:

{'asset': 'a_c7e1751e8122f1b475cb3006966fb28c', 'sku_id': '1154896005045694555'}

The asset ID is all we really need, does sku_id serve any purpose from a bot perspective? At the moment we still save that entire dict under User._avatar_decoration.

@Dorukyum Dorukyum merged commit bdf604d into Pycord-Development:master Jan 31, 2024
29 checks passed
OmLanke pushed a commit to OmLanke/pycord that referenced this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Reflection Discords API wasn't correctly reflected in the lib feature Implements a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants