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 #889

Merged
merged 38 commits into from
May 29, 2024

Conversation

Victorsitou
Copy link
Member

@Victorsitou Victorsitou commented Dec 8, 2022

Summary

Implements discord/discord-api-docs#5723, the x-super-properties header in http.py is only to receive animated avatar decorations, Discord should fix that (probably?)

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running task lint
    • I have type-checked the code by running task pyright
  • 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, ...)

@shiftinv shiftinv added t: enhancement New feature t: api support Support of Discord API features s: waiting for api/docs Issue/PR is waiting for API support/documentation labels Dec 8, 2022
@shiftinv shiftinv added this to the disnake v2.8 milestone Dec 8, 2022
@Victorsitou Victorsitou mentioned this pull request Dec 13, 2022
8 tasks
disnake/member.py Outdated Show resolved Hide resolved
disnake/user.py Outdated Show resolved Hide resolved
disnake/user.py Show resolved Hide resolved
changelog/889.feature.rst Outdated Show resolved Hide resolved
shiftinv
shiftinv previously approved these changes Dec 27, 2022
Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for taking the time to add this! Now it's mostly a matter of waiting for the api docs PR to be merged :p

@Victorsitou Victorsitou added the s: needs review Issue/PR is awaiting reviews label Jul 14, 2023
@Victorsitou Victorsitou added this to the disnake v2.10 milestone Jul 14, 2023
@shiftinv
Copy link
Member

Looks like this change was lost in one of the merges: https://github.com/DisnakeDev/disnake/pull/889/files/b187544b929a62d5ab8070e7c4d54124291ea5e5#diff-0ee295c29def16f570f86378eff8ba37315e464d415e731d5d8ea2e67ce16f68R5593

Other than that, testing this is unfortunately a bit difficult right now, since there's no general rollout yet :/

@Victorsitou
Copy link
Member Author

Fixed in 74f7ad0.

@shiftinv
Copy link
Member

shiftinv commented Oct 2, 2023

As expected, the API for this has changed slightly: https://github.com/discord/discord-api-docs/pull/6464/files#diff-9c0465597400a1bfff16968024a03ed3e42f9f35b43b9d4419bb0156d47ff9d2
While we have no immediate use for the sku_id field, storing the raw avatar_decoration_data dict (instead of just the asset field) would be the most future-proof solution.

@Victorsitou
Copy link
Member Author

Victorsitou commented Mar 20, 2024

As expected, the API for this has changed slightly: https://github.com/discord/discord-api-docs/pull/6464/files#diff-9c0465597400a1bfff16968024a03ed3e42f9f35b43b9d4419bb0156d47ff9d2

I've updated the PR to match the actual API.

disnake/asset.py Outdated Show resolved Hide resolved
disnake/member.py Outdated Show resolved Hide resolved
@Victorsitou Victorsitou requested a review from shiftinv May 20, 2024 16:21
disnake/member.py Outdated Show resolved Hide resolved
@Victorsitou Victorsitou requested a review from shiftinv May 28, 2024 14:58
Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

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

looks good to me. thanks! 🎉

@shiftinv shiftinv merged commit 6db7054 into DisnakeDev:master May 29, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: needs review Issue/PR is awaiting reviews t: api support Support of Discord API features t: enhancement New feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants