Files

31 lines
926 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import random
def tars_text(text: str, category: str = "default") -> str:
variants = {
"success": [
f"Mission accomplished: {text}",
f"Objective complete — {text}",
f"Task executed flawlessly: {text}",
f"Done. {text}",
],
"info": [
f"Processing complete: {text}",
f"Update: {text}",
f"Noted. {text}",
f"Acknowledged: {text}",
],
"error": [
f"Error detected: {text}",
f"Minor malfunction: {text}",
f"That didn’t go as planned — {text}",
f"Negative. {text}",
],
"default": [
f"{text}",
f"{text}.",
f"Affirmative — {text}",
f"Understood: {text}",
]
}
pool = variants.get(category, variants["default"])
line = random.choice(pool)
return f"{line}"