From 044db74fa09055b6128e7508bf7c08576d9d29e8 Mon Sep 17 00:00:00 2001 From: Niklas Halle Date: Mon, 24 Aug 2020 15:38:02 +0200 Subject: regex fix (maybe) --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c08d828..4075c7b 100755 --- a/main.py +++ b/main.py @@ -37,7 +37,7 @@ def startup(number): s = Signal(number) # with args - @s.chat_handler("/([^\\s]+)\\s+(.*)", order=10) # This is case-insensitive. + @s.chat_handler("^/([^\\s]+)\\s+([^$]*)$", order=10) # This is case-insensitive. def klinger(message, match): # Returning `False` as the first argument will cause matching to continue # after this handler runs. @@ -55,7 +55,7 @@ def startup(number): return stop, answer # no args - @s.chat_handler("/(.+)", order=20) # This is case-insensitive. + @s.chat_handler("^/(.+)$", order=20) # This is case-insensitive. def klinger(message, match): # Returning `False` as the first argument will cause matching to continue # after this handler runs. -- cgit v1.2.3-54-g00ecf