Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Clans #9899

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
18 changes: 18 additions & 0 deletions discord/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,24 @@ def _from_user_banner(cls, state: _State, user_id: int, banner_hash: str) -> Sel
animated=animated,
)

@classmethod
def _from_clan_badge(cls, state: _State, guild_id: int, badge_hash: str) -> Self:
return cls(
state,
url=f'{cls.BASE}/clan-badges/{guild_id}/{badge_hash}.png',
key=badge_hash,
animated=False,
)

@classmethod
def _from_clan_banner(cls, state: _State, guild_id: int, banner_hash: str) -> Self:
return cls(
state,
url=f'{cls.BASE}/clan-banners/{guild_id}/{banner_hash}.png',
key=banner_hash,
animated=False,
)

def __str__(self) -> str:
return self._url

Expand Down
Loading
Loading