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

Fix badges attribute for the User class #95

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

searinminecraft
Copy link
Contributor

Summary

The flag property in the API is no longer used to determine the user's badges, resulting in the library thinking the user has no badges. Instead, it uses the badges property. This PR will make it use the badges property instead of flags

Heres an example for a user with badges (i used pprint to pretty print it):

{'_id': '01F1WKM5TK2V6KCZWR6DGBJDTZ',
 'avatar': {'_id': '1XpKpyqGvJ5BBl6uNfg5DBd0Nliyf4KVbtRH4pmLnZ',
            'content_type': 'image/png',
            'filename': 'sJ0lsZxzlYTyxC3HVzogea9LKlCVwtpvYMNZIFVA_k.png',
            'metadata': {'height': 410, 'type': 'Image', 'width': 411},
            'size': 343493,
            'tag': 'avatars'},
 'badges': 1807,
 'discriminator': '6328',
 'display_name': 'Jennifer',
 'online': False,
 'relationship': 'None',
 'status': {'presence': 'Focus', 'text': 'dandori issue'},
 'username': 'Infi'}

This also adds the relevant joke 2 badge (amorbus) in the UserFlags class, which was previously missing.

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, …)

@EnokiUN EnokiUN merged commit 2f1d6f6 into EnokiUN:main Aug 22, 2023
3 of 4 checks passed
@EnokiUN
Copy link
Owner

EnokiUN commented Aug 22, 2023

Thanks!

github-actions bot pushed a commit that referenced this pull request Aug 22, 2023
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.

2 participants