Properly change abc.User.avatar type to Asset

This commit is contained in:
Rapptz 2021-04-25 23:30:30 -04:00
parent 20c2664a50
commit d60689a983

View File

@ -27,7 +27,7 @@ from __future__ import annotations
import sys
import copy
import asyncio
from typing import TYPE_CHECKING, Optional, Protocol, runtime_checkable
from typing import TYPE_CHECKING, Protocol, runtime_checkable
from .iterators import HistoryIterator
from .context_managers import Typing
@ -54,6 +54,7 @@ if TYPE_CHECKING:
from datetime import datetime
from .user import ClientUser
from .asset import Asset
class _Undefined:
@ -106,8 +107,8 @@ class User(Snowflake, Protocol):
The user's username.
discriminator: :class:`str`
The user's discriminator.
avatar: Optional[:class:`str`]
The avatar hash the user has.
avatar: :class:`Asset`
The avatar asset the user has.
bot: :class:`bool`
If the user is a bot account.
"""
@ -115,7 +116,7 @@ class User(Snowflake, Protocol):
name: str
discriminator: str
avatar: Optional[str]
avatar: Asset
bot: bool
@property