mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 15:36:44 +00:00
🐛 Fix abyss floor IndexError
This commit is contained in:
parent
89d9d2f49c
commit
af2e9bdb9b
@ -311,7 +311,7 @@ class AbyssPlugin(Plugin):
|
|||||||
else:
|
else:
|
||||||
render_data["floor-num"] = f"十{num_dic.get(str(floor % 10))}"
|
render_data["floor-num"] = f"十{num_dic.get(str(floor % 10))}"
|
||||||
floors = jsonlib.loads(result)["floors"]
|
floors = jsonlib.loads(result)["floors"]
|
||||||
if (floor_data := list(filter(lambda x: x["floor"] == floor, floors))) is None:
|
if not (floor_data := list(filter(lambda x: x["floor"] == floor, floors))):
|
||||||
return None
|
return None
|
||||||
avatars = await client.get_genshin_characters(uid, lang="zh-cn")
|
avatars = await client.get_genshin_characters(uid, lang="zh-cn")
|
||||||
render_data["avatar_data"] = {i.id: i.constellation for i in avatars}
|
render_data["avatar_data"] = {i.id: i.constellation for i in avatars}
|
||||||
|
Loading…
Reference in New Issue
Block a user