mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 03:55:26 +00:00
🐛 Fix cache error
This commit is contained in:
parent
b7396a7171
commit
39d66c6b6c
@ -18,7 +18,7 @@ class GameCacheService(BaseService):
|
||||
async def get_strategy_cache(self, character_name: str) -> str:
|
||||
cache = await self.strategy_cache.get_file(character_name)
|
||||
if cache is not None:
|
||||
return cache
|
||||
return cache.decode("utf-8")
|
||||
|
||||
async def set_strategy_cache(self, character_name: str, file: str) -> None:
|
||||
await self.strategy_cache.set_file(character_name, file)
|
||||
@ -26,7 +26,7 @@ class GameCacheService(BaseService):
|
||||
async def get_material_cache(self, character_name: str) -> str:
|
||||
cache = await self.material_cache.get_file(character_name)
|
||||
if cache is not None:
|
||||
return cache
|
||||
return cache.decode("utf-8")
|
||||
|
||||
async def set_material_cache(self, character_name: str, file: str) -> None:
|
||||
await self.material_cache.set_file(character_name, file)
|
||||
@ -34,7 +34,7 @@ class GameCacheService(BaseService):
|
||||
async def get_light_cone_cache(self, light_cone_name: str) -> str:
|
||||
cache = await self.light_cone_cache.get_file(light_cone_name)
|
||||
if cache is not None:
|
||||
return cache
|
||||
return cache.decode("utf-8")
|
||||
|
||||
async def set_light_cone_cache(self, light_cone_name: str, file: str) -> None:
|
||||
await self.light_cone_cache.set_file(light_cone_name, file)
|
||||
|
@ -64,7 +64,7 @@ class Inline(Plugin):
|
||||
self.characters_list.append({"name": character, "icon": datas[character]})
|
||||
else:
|
||||
for key, value in datas.items():
|
||||
if character.startswith(key):
|
||||
if character.startswith(key) or character.endswith(key):
|
||||
self.characters_list.append({"name": character, "icon": value})
|
||||
break
|
||||
# 角色培养素材
|
||||
@ -73,7 +73,7 @@ class Inline(Plugin):
|
||||
self.characters_material_list.append({"name": character, "icon": datas[character]})
|
||||
else:
|
||||
for key, value in datas.items():
|
||||
if character.startswith(key):
|
||||
if character.startswith(key) or character.endswith(key):
|
||||
self.characters_material_list.append({"name": character, "icon": value})
|
||||
break
|
||||
logger.success("Inline 模块获取角色列表成功")
|
||||
|
Loading…
Reference in New Issue
Block a user