From b25415e3417c2256e7e044b7f25597b3d18cb84d Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Thu, 19 May 2022 19:51:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8E=9F=E7=A5=9E=E7=8C=9C?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Guess_voice/__init__.py | 3 +-- Guess_voice/handler.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Guess_voice/__init__.py b/Guess_voice/__init__.py index 3e94bb2..ea139bb 100644 --- a/Guess_voice/__init__.py +++ b/Guess_voice/__init__.py @@ -62,13 +62,12 @@ async def guess_genshin_voice(bot: Bot, event: GroupMessageEvent, msg=CommandArg await guess_game.finish(await guess.start2()) else: res = await guess.start(keyword.split()) - print(res) await guess_game.finish(res) except FinishedException: pass except Exception as e: guess.set_end() - await guess_game.finish(str(e)) + await guess_game.finish('出错了,可能是该角色缺少语音资源:' + str(e)) @ys_voice.handle() diff --git a/Guess_voice/handler.py b/Guess_voice/handler.py index 999f0ff..9adce8c 100644 --- a/Guess_voice/handler.py +++ b/Guess_voice/handler.py @@ -64,6 +64,7 @@ def create_guess_matcher(role_name, second, group_id): alias_list = character_json[role_name] re_str = role_name + '|' + '|'.join(alias_list) guess_matcher = on_regex(re_str, temp=True, rule=Rule(check_group)) + guess_matcher.plugin_name = "Guess_voice" @guess_matcher.handle() async def _(event: GroupMessageEvent):