Browse Source

Fix abc.User protocol requirements

pull/7548/head
Alex Nørgaard 3 years ago
committed by GitHub
parent
commit
7ff6850f17
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      discord/abc.py

8
discord/abc.py

@ -145,8 +145,6 @@ class User(Snowflake, Protocol):
The user's username.
discriminator: :class:`str`
The user's discriminator.
avatar: :class:`~discord.Asset`
The avatar asset the user has.
bot: :class:`bool`
If the user is a bot account.
"""
@ -155,7 +153,6 @@ class User(Snowflake, Protocol):
name: str
discriminator: str
avatar: Asset
bot: bool
@property
@ -168,6 +165,11 @@ class User(Snowflake, Protocol):
""":class:`str`: Returns a string that allows you to mention the given user."""
raise NotImplementedError
@property
def avatar(self) -> Optional[Asset]:
"""Optional[:class:`~discord.Asset`]: Returns an Asset that represents the user's avatar, if present."""
raise NotImplementedError
@runtime_checkable
class PrivateChannel(Snowflake, Protocol):

Loading…
Cancel
Save