Change Message.application type to MessageApplication

Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
This commit is contained in:
Alex Nørgaard
2022-06-13 21:34:41 +01:00
committed by GitHub
parent 96e6261d61
commit 2b9e43dbf9
4 changed files with 81 additions and 9 deletions

View File

@ -254,6 +254,17 @@ class Asset(AssetMixin):
animated=False,
)
@classmethod
def _from_app_icon(
cls, state: _State, object_id: int, icon_hash: str, asset_type: Literal['icon', 'cover_image']
) -> Self:
return cls(
state,
url=f'{cls.BASE}/app-icons/{object_id}/{asset_type}.png?size=1024',
key=icon_hash,
animated=False,
)
@classmethod
def _from_cover_image(cls, state: _State, object_id: int, cover_image_hash: str) -> Self:
return cls(