mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
修复原神猜语音bug
This commit is contained in:
parent
e5f7282472
commit
b25415e341
@ -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()
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user