update
This commit is contained in:
parent
bf0d6ccdf0
commit
a2c1797d6d
@ -37,9 +37,9 @@ class Player:
|
||||
self.name = data.get("playerInfo", {}).get("nickname", "")
|
||||
|
||||
async def update_char(self):
|
||||
all_char = await getRawData(self.uid)
|
||||
all_char = all_char.get("list", [])
|
||||
for i in all_char:
|
||||
all_char_ = await getRawData(self.uid)
|
||||
all_char_ = all_char_.get("list", [])
|
||||
for i in all_char_:
|
||||
for f in self.all_char:
|
||||
if f["name"] == i:
|
||||
self.all_char.remove(f)
|
||||
@ -58,7 +58,7 @@ class Player:
|
||||
except Exception as e:
|
||||
print(e)
|
||||
continue
|
||||
return f"成功缓存了 UID{self.uid} 的{'、'.join(all_char)}等 {len(all_char)} 位角色数据!"
|
||||
return f"成功缓存了 UID{self.uid} 的{'、'.join(all_char_)}等 {len(all_char_)} 位角色数据!"
|
||||
|
||||
def export(self):
|
||||
return {"name": self.name, "uid": self.uid, "time": int(time.time()), "all_char": self.all_char}
|
||||
|
Loading…
Reference in New Issue
Block a user