mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-23 19:34:23 +00:00
Fix abc.User protocol requirements
This commit is contained in:
parent
0330282c5f
commit
7ff6850f17
@ -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…
x
Reference in New Issue
Block a user