Pertty field

- I think it should be fixed sooner :P
This commit is contained in:
M307 (Mac) 2022-11-19 15:48:08 +07:00
parent 69d9fdacf1
commit 7a1a1489e5
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ class ProfilePicture(BaseModel):
"""
Custom add data
"""
url: IconAsset = None
icon: IconAsset = None
def __init__(self, **data: Any) -> None:
super().__init__(**data)
@ -43,7 +43,7 @@ class ProfilePicture(BaseModel):
if not icon:
return
self.url = icon.icon
self.icon = icon.icon
class showAvatar(BaseModel):
@ -129,7 +129,7 @@ class PlayerInfo(BaseModel):
nickname: str = ""
signature: str = ""
world_level: int = Field(1, alias="worldLevel")
icon: ProfilePicture = Field(None, alias="profilePicture")
avatar: ProfilePicture = Field(None, alias="profilePicture")
# Avatars
characters_preview: List[showAvatar] = Field([], alias="showAvatarInfoList")
# Abyss floor

View File

@ -10,7 +10,7 @@ async def main():
print("=== Player Info ===")
print(f"Nickname: {data.player.nickname}")
print(f"Level: {data.player.level}")
print(f"Icon: {data.player.icon.url}")
print(f"Icon: {data.player.avatar.icon.url}")
print(f"Signature: {data.player.signature}")
print(f"Achievement: {data.player.achievement}")
print(f"Abyss floor: {data.player.abyss_floor} - {data.player.abyss_room}")