修复原神猜语音bug

This commit is contained in:
CMHopeSunshine 2022-05-19 19:51:39 +08:00
parent e5f7282472
commit b25415e341
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

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