mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add support for user collectibles
This commit is contained in:
@ -355,6 +355,16 @@ class Asset(AssetMixin):
|
||||
animated=False,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _from_user_collectible(cls, state: _State, asset: str, animated: bool = False) -> Self:
|
||||
name = 'static.png' if not animated else 'asset.webm'
|
||||
return cls(
|
||||
state,
|
||||
url=f'{cls.BASE}/assets/collectibles/{asset}{name}',
|
||||
key=asset,
|
||||
animated=animated,
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self._url
|
||||
|
||||
|
Reference in New Issue
Block a user