feat: fix evil mode race conditions, expand moods and PFP detection
bipolar_mode.py: - Replace unsafe globals.EVIL_MODE temporary overrides with force_evil_context parameter to fix async race conditions (3 sites) moods.py: - Add 6 new evil mood emojis: bored, manic, jealous, melancholic, playful_cruel, contemptuous - Refactor rotate_dm_mood() to skip when evil mode active (evil mode has its own independent 2-hour rotation timer) persona_dialogue.py: - Same force_evil_context race condition fix (2 sites) - Fix over-aggressive response cleanup that stripped common words (YES/NO/HIGH) — now uses targeted regex for structural markers only - Update evil mood multipliers to match new mood set profile_picture_context: - Expand PFP detection regex for broader coverage (appearance questions, opinion queries, selection/change questions) - Add plugin.json metadata file
This commit is contained in:
10
cat-plugins/profile_picture_context/plugin.json
Normal file
10
cat-plugins/profile_picture_context/plugin.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Profile Picture Context",
|
||||
"description": "Injects profile picture description only when user asks about it using regex pattern matching",
|
||||
"author_name": "Miku Bot Team",
|
||||
"author_url": "",
|
||||
"plugin_url": "",
|
||||
"tags": "profile, picture, context, regex",
|
||||
"thumb": "",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
@@ -14,12 +14,31 @@ import re
|
||||
|
||||
# Regex patterns that match profile picture questions
|
||||
PFP_PATTERNS = [
|
||||
r'\b(what|describe|tell me about|explain)\b.*\b(pfp|profile pic|avatar|picture)\b',
|
||||
r'\b(your|miku\'?s?)\b.*\b(pfp|profile pic|avatar|picture)\b',
|
||||
r'\bwhat.*looking like\b',
|
||||
# Direct PFP references
|
||||
r'\b(what|describe|tell me about|explain|show|how)\b.*\b(pfp|profile pic|avatar|picture|pic)\b',
|
||||
r'\b(your|miku\'?s?)\b.*\b(pfp|profile pic|avatar|picture|pic)\b',
|
||||
r'\b(pfp|profile pic|avatar|picture|pic)\b.*\b(is|look|show|about|like)',
|
||||
|
||||
# Questions about appearance
|
||||
r'\b(what|how).*\b(you|miku)\b.*(look|looking|appear)',
|
||||
r'\byour (new )?look\b',
|
||||
r'\bhow.*look(ing)?\b.*today',
|
||||
r'\b(pfp|profile pic|avatar)\b.*\b(is|look|show)',
|
||||
r'\b(what|how).*looking like\b',
|
||||
|
||||
# Questions about the image itself
|
||||
r'\b(think|feel|opinion|thoughts)\b.*\b(about|of)\b.*\b(your|that|the|this)?\b.*\b(pfp|profile|avatar|pic|picture|image)\b',
|
||||
r'\b(why|how|when).*\b(pick|choose|chose|picked|select|change|changed)\b.*\b(pfp|profile|avatar|pic|picture|that)\b',
|
||||
r'\b(new|current|latest)\b.*\b(pfp|profile pic|avatar|pic|picture)\b',
|
||||
|
||||
# "What do you think about your pfp"
|
||||
r'\bthink.*\b(your|that|the|this)\b.*\b(pfp|profile|avatar|pic|picture)\b',
|
||||
r'\b(your|that|the|this)\b.*\b(pfp|profile|avatar|pic|picture)\b.*\bthink\b',
|
||||
|
||||
# "How did you decide/pick"
|
||||
r'\b(decide|decided|pick|picked|choose|chose|select)\b.*\b(pfp|profile|avatar|pic|picture|that|this)\b',
|
||||
|
||||
# "Tell me about that pfp" / "What's with the pfp"
|
||||
r'\bwhat\'?s?\b.*\bwith\b.*\b(pfp|profile|avatar|pic|picture)\b',
|
||||
r'\btell me\b.*\b(pfp|profile|avatar|pic|picture|that|this)\b',
|
||||
]
|
||||
|
||||
def matches_pfp_query(text: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user