fix: remove unnecessary imports in wiki

This commit is contained in:
qwerdvd 2023-12-04 12:36:08 +08:00
parent 43ee2e2d75
commit 16cb44591c
No known key found for this signature in database
GPG Key ID: A3AF89C783404769

View File

@ -1,11 +1,7 @@
import asyncio
import re
from pathlib import Path
from gsuid_core.bot import Bot
from gsuid_core.data_store import get_res_path
from gsuid_core.models import Event
from gsuid_core.plugins.ArknightsUID.ArknightsUID.arknightsuid_resource.memoryStore import store
from gsuid_core.plugins.ArknightsUID.ArknightsUID.arknightsuid_wiki.draw_wiki_img import (
get_equip_info,
get_wiki_info,
@ -58,17 +54,6 @@ async def send_role_wiki_pic(bot: Bot, ev: Event):
async def send_equip_wiki_pic(bot: Bot, ev: Event):
char_name = ' '.join(re.findall('[\u4e00-\u9fa5]+', ev.text))
try:
CHARACTER_TABLE = Excel.CHARATER_TABLE
except AttributeError:
TASK = []
for file_path in Path(
get_res_path(["ArknightsUID", "resource", "gamedata"])
).glob("*.json"):
TASK.append(store.get_file(file_path))
asyncio.gather(*TASK)
await Excel.preload_table()
CHARACTER_TABLE = Excel.CHARATER_TABLE
char_id = None