mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 03:24:20 +00:00
🐛 Fix bot not accepting multiple spaces
This commit is contained in:
parent
b4665a407b
commit
850c19bdef
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ def register_telegram(conv, names, syntax=None):
|
||||||
name_regex = rf"(?:{'|'.join(names)})"
|
name_regex = rf"(?:{'|'.join(names)})"
|
||||||
bot_regex = rf"(?:@{config['telegram.bot.username']})?"
|
bot_regex = rf"(?:@{config['telegram.bot.username']})?"
|
||||||
if syntax:
|
if syntax:
|
||||||
syntax_regex = f" {syntax}"
|
syntax_regex = rf"\s+{syntax}"
|
||||||
else:
|
else:
|
||||||
syntax_regex = ""
|
syntax_regex = ""
|
||||||
regex = rf"^/{name_regex}{bot_regex}{syntax_regex}$"
|
regex = rf"^/{name_regex}{bot_regex}{syntax_regex}$"
|
||||||
|
|
Loading…
Reference in a new issue