Implement Guild Scheduled Events

This commit is contained in:
Nadir Chowdhury authored and GitHub committed 2022-03-01 01:00:04 -05:00
1 parent 90cabd1673
commit 3c6279b947
22 files changed
+1313 -110

No files matched your search

+9
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_')