Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Apr 13, 2023
1 parent 851321d commit 7d3970f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions nonebot_plugin_fuckyou/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit 7d3970f

Please sign in to comment.