Support team members data in application info

This commit is contained in:
fourjr
2019-06-21 17:09:15 +08:00
committed by Rapptz
parent 5698cf6df9
commit 3961e7ef6d
6 changed files with 208 additions and 5 deletions

View File

@ -94,6 +94,14 @@ class Asset:
url = 'https://cdn.discordapp.com/{0}-icons/{1.id}/{1.icon}.jpg'.format(path, object)
return cls(state, url)
@classmethod
def _from_cover_image(cls, state, obj):
if obj.cover_image is None:
return cls(state)
url = 'https://cdn.discordapp.com/app-assets/{0.id}/store/{0.cover_image}.jpg'.format(obj)
return cls(state, url)
@classmethod
def _from_guild_image(cls, state, id, hash, key, *, format='webp', size=1024):
if not utils.valid_icon_size(size):