mirror of
https://github.com/baiqwerdvd/ArknightsUID.git
synced 2025-05-05 03:23:45 +08:00
fix: remove unnecessary imports in wiki
This commit is contained in:
parent
43ee2e2d75
commit
16cb44591c
@ -1,11 +1,7 @@
|
|||||||
import asyncio
|
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.data_store import get_res_path
|
|
||||||
from gsuid_core.models import Event
|
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 (
|
from gsuid_core.plugins.ArknightsUID.ArknightsUID.arknightsuid_wiki.draw_wiki_img import (
|
||||||
get_equip_info,
|
get_equip_info,
|
||||||
get_wiki_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):
|
async def send_equip_wiki_pic(bot: Bot, ev: Event):
|
||||||
char_name = ' '.join(re.findall('[\u4e00-\u9fa5]+', ev.text))
|
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
|
CHARACTER_TABLE = Excel.CHARATER_TABLE
|
||||||
|
|
||||||
char_id = None
|
char_id = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user