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):