Browse Source

Fix pomelo checking

pull/10109/head
dolfies 8 months ago
parent
commit
3c878ca038
  1. 6
      discord/user.py

6
discord/user.py

@ -282,7 +282,7 @@ class BaseUser(_UserTag):
)
def __str__(self) -> str:
if self.discriminator == '0':
if self.is_pomelo():
return self.name
return f'{self.name}#{self.discriminator}'
@ -381,7 +381,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.is_pomelo():
avatar_id = (self.id >> 22) % 6
else:
avatar_id = int(self.discriminator) % 5
@ -562,7 +562,7 @@ class BaseUser(_UserTag):
.. versionadded:: 2.1
"""
return self.discriminator == '0'
return int(self.discriminator) == 0
@property
def relationship(self) -> Optional[Relationship]:

Loading…
Cancel
Save