diff --git a/discord/colour.py b/discord/colour.py index 52dca9cc0..e640f9df4 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -509,5 +509,15 @@ class Colour: """ return cls(0xEEEFF1) + @classmethod + def pink(cls) -> Self: + """A factory method that returns a :class:`Colour` with a value of ``0xEB459F``. + + .. colour:: #EB459F + + .. versionadded:: 2.3 + """ + return cls(0xEB459F) + Color = Colour diff --git a/discord/enums.py b/discord/enums.py index 94ca8c726..81d5cb444 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -295,6 +295,7 @@ class DefaultAvatar(Enum): green = 2 orange = 3 red = 4 + pink = 5 def __str__(self) -> str: return self.name diff --git a/discord/user.py b/discord/user.py index 04efd9653..cc836374a 100644 --- a/discord/user.py +++ b/discord/user.py @@ -173,7 +173,7 @@ class BaseUser(_UserTag): if self.discriminator == '0': avatar_id = (self.id >> 22) % len(DefaultAvatar) else: - avatar_id = int(self.discriminator) % len(DefaultAvatar) + avatar_id = int(self.discriminator) % 5 return Asset._from_default_avatar(self._state, avatar_id) diff --git a/docs/api.rst b/docs/api.rst index 4a8233065..8a899bbc7 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -2896,6 +2896,12 @@ of :class:`enum.Enum`. Represents the default avatar with the color red. See also :attr:`Colour.red` + .. attribute:: pink + + Represents the default avatar with the color pink. + See also :attr:`Colour.pink` + + .. versionadded:: 2.3 .. class:: StickerType