update code

This commit is contained in:
hibiki
2021-08-17 23:17:08 +08:00
parent 3c6a365718
commit 1996f0d96a
73 changed files with 1501 additions and 1163 deletions
@@ -5,6 +5,7 @@ from utils.utils import get_message_text, scheduler
from nonebot.adapters.cqhttp import Bot, MessageEvent, GroupMessageEvent, Message
from nonebot.typing import T_State
from services.log import logger
from nonebot.permission import SUPERUSER
import re
try:
@@ -21,7 +22,7 @@ __plugin_usage__ = (
qr = on_command("原神资源查询", priority=5, block=True)
qr_lst = on_command("原神资源列表", priority=5, block=True)
rex_qr = on_regex(".*?(在哪|在哪里|哪有|哪里有).*?", rule=to_me(), priority=5, block=True)
update_info = on_command('更新原神资源信息', priority=1, block=True)
update_info = on_command('更新原神资源信息', permission=SUPERUSER, priority=1, block=True)
@qr.handle()
@@ -46,7 +46,7 @@ MAP_RATIO = 0.5
async def query_resource(resource_name: str) -> str:
global CENTER_POINT
planning_route: bool = False
if resource_name and resource_name[-2:] == "路径":
if resource_name and resource_name[-2:] in ["路径", "路线"]:
resource_name = resource_name[:-2].strip()
planning_route = True
if not resource_name or resource_name not in resource_name_list: