From 2c4a991a2bdce8031407c74aebce27a06fc0c175 Mon Sep 17 00:00:00 2001 From: meatjam <851404658@qq.com> Date: Mon, 20 Jun 2022 12:02:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(handler):=20=E4=BF=AE=E5=A4=8D=E4=BA=86?= =?UTF-8?q?=E5=9C=A8=E8=AF=AD=E9=9F=B3=E8=B5=84=E6=BA=90=E4=B8=AD=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=EF=BC=8C=E4=BD=86=E5=9C=A8character.json=E4=B8=AD?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E8=A7=92=E8=89=B2=E5=9B=A0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E5=88=AB=E5=90=8D=E8=80=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=8F=91=E9=80=81=E8=AF=AD=E9=9F=B3=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Guess_voice/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Guess_voice/handler.py b/Guess_voice/handler.py index 4363dc2..c3fbe19 100644 --- a/Guess_voice/handler.py +++ b/Guess_voice/handler.py @@ -62,7 +62,7 @@ def create_guess_matcher(role_name, second, group_id): return True return False - alias_list = character_json[role_name] + alias_list = character_json.get(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"