From 7ca5bbec0caff50ed97751dd03ef2f5ebde432ed Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Wed, 17 Aug 2022 19:35:34 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E8=A1=A5=E5=85=853.0=E6=96=B0?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=AD=A6=E5=99=A8=E9=83=A8=E5=88=86=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Paimon_Wiki/__init__.py | 8 +++---- utils/json_data/alias.json | 45 +++++++++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/Paimon_Wiki/__init__.py b/Paimon_Wiki/__init__.py index 88bd3ee..9cd83cb 100644 --- a/Paimon_Wiki/__init__.py +++ b/Paimon_Wiki/__init__.py @@ -149,7 +149,7 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str): try: await maps.finish(MessageSegment.image(state['img_url'].format(match_alias))) except ActionFailed: - await maps.finish(f'没有找到该{state["type"]}的图鉴') + await maps.finish(f'暂时没有{true_name}的资源哦') elif match_alias: if isinstance(match_alias, dict): match_alias = list(match_alias.keys()) @@ -159,7 +159,7 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str): await maps.send(msg + '\n回答\"取消\"来取消查询', at_sender=True) state['match_alias'] = match_alias else: - await maps.finish(f'没有找到该{state["type"]}的图鉴') + await maps.finish(MessageBuild.Text(f'没有找到叫{name}的{state["type"]}')) @maps.got('choice') async def _(event: MessageEvent, state: T_State, choice: str = ArgPlainText('choice')): @@ -170,7 +170,7 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str): try: await maps.finish(MessageSegment.image(state['img_url'].format(match_alias[int(choice) - 1]))) except ActionFailed: - await maps.finish(f'没有找到该{state["type"]}的图鉴') + await maps.finish(f'暂时没有{match_alias[int(choice) - 1]}的资源哦') if choice not in match_alias: state['times'] = state['times'] + 1 if 'times' in state else 1 if state['times'] == 1: @@ -183,7 +183,7 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str): try: await maps.finish(MessageSegment.image(state['img_url'].format(choice))) except ActionFailed: - await maps.finish(f'没有找到该{state["type"]}的图鉴') + await maps.finish(f'暂时没有{choice}的资源哦') create_wiki_matcher(r'(?P\w*)(?P(原魔|怪物)(图鉴|攻略))(?P\w*)', '原魔图鉴', '原魔') diff --git a/utils/json_data/alias.json b/utils/json_data/alias.json index c76447a..64f7e10 100644 --- a/utils/json_data/alias.json +++ b/utils/json_data/alias.json @@ -51,7 +51,9 @@ "10000066": ["神里绫人", "0人", "大舅子", "小舅子", "绫人", "神里哥", "凌人", "神里凌人"], "10000060": ["夜兰", "夜阑", "叶兰"], "10000065": ["久岐忍", "忍者", "阿卡丽", "97忍", "97人"], - "10000059": ["鹿野院平藏", "近战法师", "平藏", "小鹿"] + "10000059": ["鹿野院平藏", "近战法师", "平藏", "小鹿"], + "11111111": ["提纳里", "小驴"], + "11111112": ["科莱"] }, "武器": { "磐岩结绿": [ @@ -591,6 +593,36 @@ "笼钓瓶一心", "万叶刀", "一心传名刀" + ], + "猎人之径": [ + "猎人之径", + "绿弓", + "草弓", + "提纳里专武" + ], + "竭泽": [ + "竭泽", + "鱼弓" + ], + "王下近侍": [ + "王下近侍", + "须弥锻造弓" + ], + "贯月矢": [ + "贯月矢", + "须弥锻造长枪" + ], + "盈满之实": [ + "盈满之实", + "须弥锻造法器" + ], + "森林王器": [ + "森林王器", + "须弥锻造大剑" + ], + "原木刀": [ + "原木刀", + "须弥锻造单手剑" ] }, "圣遗物": { @@ -650,9 +682,10 @@ "染血", "骑士" ], - "饰金之梦生之花": [ - "饰金之梦生之花", - "饰金" + "饰金之梦": [ + "饰金之梦生", + "饰金", + "精通" ], "华馆梦醒形骸记": [ "华馆梦醒形骸记", @@ -736,8 +769,8 @@ "角斗士的终幕礼", "角斗" ], - "深林的记忆生之花": [ - "深林的记忆生之花", + "深林的记忆": [ + "深林的记忆", "草套", "艹套" ],