Implement Guild Scheduled Events

This commit is contained in:
Nadir Chowdhury
2022-03-01 06:00:04 +00:00
committed by GitHub
parent 90cabd1673
commit 3c6279b947
22 changed files with 1313 additions and 110 deletions

View File

@ -208,6 +208,15 @@ class Asset(AssetMixin):
animated=False,
)
@classmethod
def _from_scheduled_event_cover_image(cls, state, scheduled_event_id: int, cover_image_hash: str) -> Asset:
return cls(
state,
url=f'{cls.BASE}/guild-events/{scheduled_event_id}/{cover_image_hash}.png?size=1024',
key=cover_image_hash,
animated=False,
)
@classmethod
def _from_guild_image(cls, state, guild_id: int, image: str, path: str) -> Asset:
animated = image.startswith('a_')