From c9462911cfced5c5640ac005a64e498604ec0626 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 25 Oct 2018 14:47:18 +0200 Subject: [PATCH] Fix Filters.command ignoring commands with empty prefixes --- pyrogram/client/filters/filters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index e80e230e..173b211c 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -183,6 +183,7 @@ class Filters: prefix (``str`` | ``list``, *optional*): A prefix or a list of prefixes as string the filter should look for. Defaults to "/" (slash). Examples: ".", "!", ["/", "!", "."]. + Can be None or "" (empty string) to allow commands with no prefix at all. separator (``str``, *optional*): The command arguments separator. Defaults to " " (white space). @@ -214,7 +215,7 @@ class Filters: else {c if case_sensitive else c.lower() for c in command}, - p=set(prefix), + p=set(prefix) if prefix else {""}, s=separator, cs=case_sensitive )