mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-24 20:04:55 +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.
|
The user's username.
|
||||||
discriminator: :class:`str`
|
discriminator: :class:`str`
|
||||||
The user's discriminator.
|
The user's discriminator.
|
||||||
avatar: :class:`~discord.Asset`
|
|
||||||
The avatar asset the user has.
|
|
||||||
bot: :class:`bool`
|
bot: :class:`bool`
|
||||||
If the user is a bot account.
|
If the user is a bot account.
|
||||||
"""
|
"""
|
||||||
@ -155,7 +153,6 @@ class User(Snowflake, Protocol):
|
|||||||
|
|
||||||
name: str
|
name: str
|
||||||
discriminator: str
|
discriminator: str
|
||||||
avatar: Asset
|
|
||||||
bot: bool
|
bot: bool
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -168,6 +165,11 @@ class User(Snowflake, Protocol):
|
|||||||
""":class:`str`: Returns a string that allows you to mention the given user."""
|
""":class:`str`: Returns a string that allows you to mention the given user."""
|
||||||
raise NotImplementedError
|
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
|
@runtime_checkable
|
||||||
class PrivateChannel(Snowflake, Protocol):
|
class PrivateChannel(Snowflake, Protocol):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user