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: default avatar % 6 if migrated #2100

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion discord/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def default_avatar(self) -> Asset:
This is calculated by the user's ID if they're on the new username system, otherwise their discriminator.
"""
eq = (self.id >> 22) if self.is_migrated else int(self.discriminator)
return Asset._from_default_avatar(self._state, eq % 5)
perc = 6 if self.is_migrated else 5
return Asset._from_default_avatar(self._state, eq % perc)

@property
def display_avatar(self) -> Asset:
Expand Down