From 850c19bdef1871a5e3f92e4636baca152bf4ed89 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 26 Apr 2021 00:42:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20bot=20not=20accepting=20mu?= =?UTF-8?q?ltiple=20spaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- royalpack/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/royalpack/__main__.py b/royalpack/__main__.py index 50530f98..9fad1ea2 100644 --- a/royalpack/__main__.py +++ b/royalpack/__main__.py @@ -32,7 +32,7 @@ def register_telegram(conv, names, syntax=None): name_regex = rf"(?:{'|'.join(names)})" bot_regex = rf"(?:@{config['telegram.bot.username']})?" if syntax: - syntax_regex = f" {syntax}" + syntax_regex = rf"\s+{syntax}" else: syntax_regex = "" regex = rf"^/{name_regex}{bot_regex}{syntax_regex}$"