From 7d3970f9ebbe256d649ee3e1c18f45a47fa68dea Mon Sep 17 00:00:00 2001 From: student_2333 Date: Fri, 14 Apr 2023 00:27:18 +0800 Subject: [PATCH] fix --- nonebot_plugin_fuckyou/__main__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nonebot_plugin_fuckyou/__main__.py b/nonebot_plugin_fuckyou/__main__.py index 3bd3a7c..ec92684 100644 --- a/nonebot_plugin_fuckyou/__main__.py +++ b/nonebot_plugin_fuckyou/__main__.py @@ -21,14 +21,13 @@ TGMsgEv = None -PHASES: List[str] = list( - *(GENTLE if config.fuckyou_gentle else []), - *(VIOLENT if config.fuckyou_violent else []), +PHASES: List[str] = (GENTLE if config.fuckyou_gentle else []) + ( + VIOLENT if config.fuckyou_violent else [] ) TRIGGER_WORDS: Set[str] = DEFAULT_TRIGGER_WORDS | config.fuckyou_extend_words if not PHASES: - raise ValueError("请至少选择一个词库") + raise ValueError("请至少选择一个骂人词库") def get_phase() -> str: @@ -45,7 +44,7 @@ def trigger_rule(event: Event): except: return False - return any(w in msg for w in DEFAULT_TRIGGER_WORDS) + return any(w in msg for w in TRIGGER_WORDS) trigger_matcher = on_message(rule=trigger_rule)