Fix default_avatar for team user and webhook

This commit is contained in:
owocado
2024-08-29 01:04:33 +05:30
committed by GitHub
parent a6d1dc0455
commit 0a2faa6f5d
2 changed files with 5 additions and 6 deletions

View File

@ -171,7 +171,7 @@ class BaseUser(_UserTag):
@property
def default_avatar(self) -> Asset:
""":class:`Asset`: Returns the default avatar for a given user."""
if self.discriminator == '0':
if self.discriminator in ('0', '0000'):
avatar_id = (self.id >> 22) % len(DefaultAvatar)
else:
avatar_id = int(self.discriminator) % 5