🐛 修复白术和卡维ID混乱

This commit is contained in:
CMHopeSunshine 2023-05-04 10:32:36 +08:00
parent 814bb291e1
commit 062771790e
3 changed files with 21 additions and 20 deletions

View File

@ -412,10 +412,11 @@
"米卡"
],
"10000081": [
"白术"
"卡维"
],
"10000082": [
"卡维"
"白术",
"白师傅"
]
},
"武器": {

View File

@ -2198,11 +2198,11 @@
10805
],
"Skills": {
"10801": "Skill_A_Catalyst_MD",
"10802": "Skill_S_Baizhuer_01",
"10805": "Skill_E_Baizhuer_01"
"10801": "Skill_A_04",
"10802": "Skill_S_Kaveh_01",
"10805": "Skill_E_Kaveh_01"
},
"SideIconName": "UI_AvatarIcon_Side_Baizhuer"
"SideIconName": "UI_AvatarIcon_Side_Kaveh"
},
"10000082": {
"SkillOrder": [
@ -2211,10 +2211,10 @@
10805
],
"Skills": {
"10801": "Skill_A_04",
"10802": "Skill_S_Kaveh_01",
"10805": "Skill_E_Kaveh_01"
"10801": "Skill_A_Catalyst_MD",
"10802": "Skill_S_Baizhuer_01",
"10805": "Skill_E_Baizhuer_01"
},
"SideIconName": "UI_AvatarIcon_Side_Kaveh"
"SideIconName": "UI_AvatarIcon_Side_Baizhuer"
}
}

View File

@ -5,7 +5,6 @@ from typing import Dict
from nonebot import on_regex
from nonebot.adapters.onebot.v11 import Message, MessageSegment, ActionFailed
from nonebot.adapters.onebot.v11.helpers import HandleCancellation
from nonebot.internal.matcher import Matcher
from nonebot.internal.params import Arg, ArgPlainText
from nonebot.params import RegexDict
@ -20,8 +19,7 @@ from LittlePaimon.utils.typing import COMMAND_START_RE
wiki_data: Dict[str, Dict[str, str]] = {}
last_update_time: datetime.datetime = datetime.datetime.now()
cancel = [HandleCancellation(f'好吧,有需要再找{NICKNAME}')]
GAME_ALIAS = ['星穹铁道', '星铁', '崩铁', '穹轨', '铁轨', escape('*'), '']
GAME_ALIAS = ['星穹铁道', '星铁', '崩铁', '穹轨', '铁轨', '铁道', escape('*'), '']
BASE_TYPE = ['图鉴', '材料', '角色图鉴', '角色材料', '遗器图鉴', '光锥图鉴']
GAME_ALIAS_RE = '(' + '|'.join(GAME_ALIAS) + ')'
BASE_TYPE_RE = '(' + '|'.join(BASE_TYPE) + ')'
@ -85,11 +83,13 @@ async def sr_wiki_handler(state: T_State, regex_dict: dict = RegexDict()):
state['times'] = 1
@wiki.got('name', prompt=Message.template('目前支持以下{type}\n{name_list}\n你要查询哪个呢?'), parameterless=cancel)
@wiki.got('name', prompt=Message.template('目前支持以下{type}\n{name_list}\n你要查询哪个呢?'))
async def sr_wiki_got(matcher: Matcher,
state: T_State,
type: str = Arg('type'),
name: str = ArgPlainText('name')):
if name in {'取消', '退出', '结束'}:
await wiki.finish(f'好吧,有需要再找{NICKNAME}')
if not name:
if state['times'] == 2:
await wiki.finish('旅行者似乎不太能理解,下次再问我吧' + MessageSegment.face(146))