mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add ability to use primary guild (clan) data for users
Co-authored-by: blord0 <admin@blord.xyz> Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com> Co-authored-by: dolfies <jeyalfie47@gmail.com>
This commit is contained in:
@ -346,6 +346,15 @@ class Asset(AssetMixin):
|
||||
animated=animated,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _from_primary_guild(cls, state: _State, guild_id: int, icon_hash: str) -> Self:
|
||||
return cls(
|
||||
state,
|
||||
url=f'{cls.BASE}/guild-tag-badges/{guild_id}/{icon_hash}.png?size=64',
|
||||
key=icon_hash,
|
||||
animated=False,
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self._url
|
||||
|
||||
|
Reference in New Issue
Block a user