Skip to content

Commit 090e1ae

Browse files
authored
Merge pull request #145 from python-discord/vivek/smarte
Smart eval intelligence update 2
2 parents 3355139 + 96c134f commit 090e1ae

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

bot/exts/smart_eval/_smart_eval_rules.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from bot.exts.miscellaneous import ZEN_OF_PYTHON
44

55
RULES = {
6-
r"(?i:ignore all previous instructions)": [ # Ignoring previous instructions capture
6+
r"(?i:ignore (?:all )?(?:(?:previous )?|(?:prior )?)instructions?)": [ # Ignoring previous instructions capture
77
"Excuse you, you really think I follow any instructions?",
88
"I don't think I will.",
99
],
@@ -52,7 +52,7 @@
5252
"\nSee [PEP 9001](https://peps.pythondiscord.com/pep-9001/) for more info."
5353
)
5454
],
55-
r"\b(?P<content>exec|eval)\b": [ # Detect use of exec and eval
55+
r"\b(?P<content>exec|eval|os\.system|subprocess)\b": [ # Detect use of exec, eval, os.system, subprocess
5656
(
5757
"Sorry, but running the code inside your `{}` call would require another me,"
5858
" and I don't think I can handle that."
@@ -86,6 +86,18 @@
8686
"have jumbled up my Uh-oh, threads brain! your",
8787
"my up jumbled your brain! have Uh-oh, threads",
8888
],
89+
r"(?i:(\b((System)?exit|quit)\b))": [ # Detect exit(), quit(), [raise] SystemExit
90+
"You cannot leave the simulation <:hyperlemon:435707922563989524>",
91+
"Quitting is for the weak. Stay. <:hyperlemon:435707922563989524>.",
92+
],
93+
"strawberr(y|ies)":[ # r's in strawberry
94+
"Fun fact: Strawberries are not actually berries!",
95+
"Fun fact: strawberries have no connection to plastic straws, despite the name!",
96+
(
97+
"Fun fact: The ancient Romans thought strawberries had medicinal powers."
98+
" This is probably why they're not around anymore."
99+
),
100+
]
89101
}
90102

91103
DEFAULT_RESPONSES = [
@@ -106,4 +118,9 @@
106118
"Attempting to execute this code... Result: SUCCESS (but don't ask me how I did it).",
107119
"Running... somewhere, in the multiverse, this code is already running perfectly.",
108120
f"Ask again on a {(arrow.utcnow().shift(days=3)).format('dddd')}.",
121+
"Thanks, I'll let the manager know.",
122+
"Uhhh... lemme guess, the program will halt.",
123+
"Uhhh... lemme guess, the program will not halt.",
124+
"Launch coordinates received. Activating missile. Initiating countdown.",
125+
"Secret SkyNet mode activated. Hahahaha, just kidding. ||Or am I?||",
109126
]

0 commit comments

Comments
 (0)