mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 12:51:35 +00:00
🐛 练度统计对旅行者特殊判断
This commit is contained in:
parent
4a0168d311
commit
3b1a46837d
@ -108,6 +108,9 @@ class AvatarListPlugin(Plugin, BasePlugin):
|
||||
namecard = (await self.assets_service.namecard(response.player.namecard.id).navbar()).as_uri()
|
||||
avatar = (await self.assets_service.avatar(response.player.icon.id).icon()).as_uri()
|
||||
nickname = response.player.nickname
|
||||
if response.player.icon.id in [10000005, 10000007]:
|
||||
rarity = 5
|
||||
else:
|
||||
rarity = {k: v["rank"] for k, v in AVATAR_DATA.items()}[str(response.player.icon.id)]
|
||||
except Exception as e: # pylint: disable=W0703
|
||||
logger.debug(f"enka 请求失败: {e}")
|
||||
@ -123,6 +126,9 @@ class AvatarListPlugin(Plugin, BasePlugin):
|
||||
namecard = (await self.assets_service.namecard(namecard_choices[0]).navbar()).as_uri()
|
||||
avatar = (await self.assets_service.avatar(cid := choices[0].id).icon()).as_uri()
|
||||
nickname = update.effective_user.full_name
|
||||
if cid in [10000005, 10000007]:
|
||||
rarity = 5
|
||||
else:
|
||||
rarity = {k: v["rank"] for k, v in AVATAR_DATA.items()}[str(cid)]
|
||||
return namecard, avatar, nickname, rarity
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user