Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions bot/exts/smart_eval/_smart_eval_rules.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from bot.exts.miscellaneous import ZEN_OF_PYTHON

# If you want to capture something that will be used in the response, capture it with a named group called "content"

RULES = {
Expand Down Expand Up @@ -41,9 +43,12 @@
"Semicolons do not belong in Python code",
"You say this is Python, but the presence of a semicolon makes me think otherwise.",
],
r"\b(:?foo|bar|baz)\b": [ # Detect boring metasyntactic variables
r"\b(?:foo|bar|baz)\b": [ # Detect boring metasyntactic variables
"foo, bar, and baz are boring - use spam, ham, and eggs instead.",
]
],
r"(?m:^\s*import\s+this\s*$)": [ # Detect use of "import this"
f"```\n{ZEN_OF_PYTHON}```",
],
}

DEFAULT_RESPONSES = [
Expand Down