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: avatar decorations #941

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

Conversation

Soheab
Copy link
Contributor

@Soheab Soheab commented Dec 8, 2022

Summary

#937 discord/discord-api-docs#6464

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have run task pyright and fixed the relevant issues.
  • 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, ...)

@EmreTech EmreTech changed the title feat: Add support for avatar decorations feat: avatar decorations Dec 9, 2022
@EmreTech EmreTech added p: low Priority: low - not important to be worked on s: awaiting review Status: the issue or PR is awaiting reviews t: api coverage Type: api coverage - this adds code to cover the discord API labels Dec 9, 2022
nextcord/asset.py Outdated Show resolved Hide resolved
@EmreTech EmreTech added p: medium Priority: medium - should be worked on in the near future and removed p: low Priority: low - not important to be worked on labels Dec 9, 2022
@EmreTech EmreTech linked an issue Dec 9, 2022 that may be closed by this pull request
@ooliver1 ooliver1 added the s: waiting for discord status: the issue requires changes to the documentation or behaviour before it can be completed. label Dec 11, 2022
Soheab and others added 2 commits December 20, 2022 19:10
Co-Authored-By: Emre Terzioglu <50607143+EmreTech@users.noreply.github.com>
nextcord/asset.py Show resolved Hide resolved
@spifory spifory removed the s: waiting for discord status: the issue requires changes to the documentation or behaviour before it can be completed. label Jul 13, 2023
Copy link
Collaborator

@EmreTech EmreTech left a comment

Choose a reason for hiding this comment

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

This will need updating according to discord/discord-api-docs#6464.

Copy link
Collaborator

@Skelmis Skelmis left a comment

Choose a reason for hiding this comment

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

Untested, lgtm

The asset of the avatar decoration.
"""

__slots__ = ("user", "sku_id", "_asset", "_state")
Copy link
Member

Choose a reason for hiding this comment

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

_state seems to be self.user._state, not self._state.

@ooliver1 ooliver1 requested a review from EmreTech March 23, 2024 19:50
@ooliver1 ooliver1 added p: high Priority: high - should be worked on as soon as reasonable 3.0 The issue/PR should go for the 3.0 release and removed p: medium Priority: medium - should be worked on in the near future labels Mar 23, 2024
@ooliver1 ooliver1 added this to the 3.0 milestone Mar 23, 2024
Copy link
Collaborator

@EmreTech EmreTech 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 otherwise!

@@ -31,6 +35,51 @@
)


class AvatarDecoration:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make sure to add this to api.rst.


You can get this object via :meth:`User.avatar_decoration`.

.. versionadded:: 2.7
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.. versionadded:: 2.7
.. versionadded:: 3.0


You can get the asset of the avatar decoration via :attr:`AvatarDecoration.asset`.

.. versionadded:: 2.7
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.. versionadded:: 2.7
.. versionadded:: 3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 The issue/PR should go for the 3.0 release p: high Priority: high - should be worked on as soon as reasonable s: awaiting review Status: the issue or PR is awaiting reviews t: api coverage Type: api coverage - this adds code to cover the discord API
Projects
No open projects
Status: In Cycle
Development

Successfully merging this pull request may close these issues.

Add avatar decorations support
5 participants