From b55440ab86464f6c4d45bffdc53343ec3434025d Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 8 Aug 2019 16:04:10 +0200 Subject: [PATCH] Update Filters.command - Remove negative lookahead to fix "\"" reporting commas - Escape cmd when interpolating the pattern - Remove the escape character from the arguments - Return True when a valid command is found, return False at the end --- pyrogram/client/filters/filters.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index a095ed89..5d892bbe 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -232,7 +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"([\"'])(?!\\)(.*?)(?