05/22/2026
When emotions fill the comments rose is instructed to use a comic I created for her.
here is a concept for a PC-based bot that detects name-calling / hostile emotional speech and then prepares an image reply.
```python
import re
from datetime import datetime
Words/phrases that suggest name-calling or emotional attack.
You can edit this list for your own page rules.
TRIGGER_WORDS = [
"idiot",
"moron",
"stupid",
"dumb",
"clown",
"liar",
"fake",
"loser",
"ignorant",
"re**rd", # offensive slur; included only for detection
"trash",
"pathetic",
"snowflake",
"crybaby"
]
IMAGE_REPLY_PATH = "trigger_happy_juab_wasp.png"
def detect_name_calling(comment_text: str) -> bool:
"""
Returns True if the comment contains name-calling trigger words.
Uses word boundaries so 'stupid' is caught, but random letter matches are avoided.
"""
text = comment_text.lower()
for word in TRIGGER_WORDS:
pattern = r"\b" + re.escape(word.lower()) + r"\b"
if re.search(pattern, text):
return True
return False
def detect_emotional_tone(comment_text: str) -> bool:
"""
Simple emotional-intensity detector.
Looks for all-caps, repeated punctuation, and heated wording.
"""
caps_words = re.findall(r"\b[A-Z]{3,}\b", comment_text)
repeated_punctuation = bool(re.search(r"[!?]{2,}", comment_text))
emotional_phrases = [
"you people",
"are you kidding",
"this is ridiculous",
"how stupid",
"what an idiot",
"you are clueless",
"you’re clueless",
"you're clueless"
]
text = comment_text.lower()
phrase_hit = any(phrase in text for phrase in emotional_phrases)
return len(caps_words) >= 2 or repeated_punctuation or phrase_hit
def should_trigger_image_reply(comment_text: str) -> bool:
"""
Main trigger rule:
The image reply is prepared when name-calling is detected
or when emotional tone appears strong.
"""
return detect_name_calling(comment_text) or detect_emotional_tone(comment_text)
def prepare_reply(comment_author: str, comment_text: str):
"""
Creates a review record instead of auto-posting.
This lets Mr J approve the reply before it goes live.
"""
if should_trigger_image_reply(comment_text):
reply = {
"time_detected": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
"author": comment_author,
"comment": comment_text,
"image_to_post": IMAGE_REPLY_PATH,
"suggested_caption": "The Juab Wasp detected an emotional response. 🐝",
"status": "Needs human approval"
}
return reply
return None
Example use
incoming_comments = [
{
"author": "User One",
"text": "This is the dumbest thing I have ever read!"
},
{
"author": "User Two",
"text": "I disagree, but I see your point."
},
{
"author": "User Three",
"text": "You people are clueless!!"
}
]
for comment in incoming_comments:
result = prepare_reply(comment["author"], comment["text"])
if result:
print("\nTRIGGER DETECTED")
print("Author:", result["author"])
print("Comment:", result["comment"])
print("Image:", result["image_to_post"])
print("Suggested Caption:", result["suggested_caption"])
print("Status:", result["status"])
else:
print("\nNo trigger:", comment["text"])
Output example:
`text
TRIGGER DETECTED
Author: User One
Comment: This is the dumbest thing I have ever read!
Image: trigger_happy_juab_wasp.png
Suggested Caption: The Juab Wasp detected an emotional response. 🐝
Status: Needs human approval
The bots are trained by a grumpy old army veteran and has been trained in sarcasm and humor. If your offended by a machine all i can say is "Call Tech Support" and turn in a work order with your complaint.
Thankyou
Mr J Editor? Chief
Juab Times News