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"