From c504b76329b925fe0f068d29c5133bc66e2686a1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 11 Jul 2022 16:09:13 +0200 Subject: [PATCH] fix this https://chapotraphouse.club/h/schizocel/post/84780/-/2289248?context=8#context --- files/helpers/regex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 67a1991e0..10a5fc242 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -137,7 +137,7 @@ commands = { "8ball": EIGHTBALL_REPLIES } -command_regex = re.compile("(\s|\n)#(fortune|factcheck|8ball)", flags=re.A|re.I) +command_regex = re.compile("(\s|\n|^)#(fortune|factcheck|8ball)", flags=re.A|re.I) def command_regex_matcher(match, upper=False): return match.group(1) + choice(commands[match.group(2).lower()]) \ No newline at end of file