From c85f991443d1cd83c16d73a4ae6abb497a321de3 Mon Sep 17 00:00:00 2001 From: Mendel E Date: Wed, 7 Aug 2019 11:38:34 -0400 Subject: [PATCH] Use regex for message.command --- pyrogram/client/filters/filters.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index 372782cb..f74b1b8e 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -18,7 +18,6 @@ import re from typing import Callable -from shlex import split from .filter import Filter from ..types.bots_and_keyboards import InlineKeyboardMarkup, ReplyKeyboardMarkup @@ -233,6 +232,7 @@ class Filters: Pass True if you want your command(s) to be case sensitive. Defaults to False. Examples: when True, command="Start" would trigger /Start but not /start. """ + command_re = re.compile(r"([\"'])(?!\\)(.*?)(?