mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Fix Filters.command ignoring commands with empty prefixes
This commit is contained in:
parent
74d07c6a28
commit
c9462911cf
@ -183,6 +183,7 @@ class Filters:
|
|||||||
prefix (``str`` | ``list``, *optional*):
|
prefix (``str`` | ``list``, *optional*):
|
||||||
A prefix or a list of prefixes as string the filter should look for.
|
A prefix or a list of prefixes as string the filter should look for.
|
||||||
Defaults to "/" (slash). Examples: ".", "!", ["/", "!", "."].
|
Defaults to "/" (slash). Examples: ".", "!", ["/", "!", "."].
|
||||||
|
Can be None or "" (empty string) to allow commands with no prefix at all.
|
||||||
|
|
||||||
separator (``str``, *optional*):
|
separator (``str``, *optional*):
|
||||||
The command arguments separator. Defaults to " " (white space).
|
The command arguments separator. Defaults to " " (white space).
|
||||||
@ -214,7 +215,7 @@ class Filters:
|
|||||||
else {c if case_sensitive
|
else {c if case_sensitive
|
||||||
else c.lower()
|
else c.lower()
|
||||||
for c in command},
|
for c in command},
|
||||||
p=set(prefix),
|
p=set(prefix) if prefix else {""},
|
||||||
s=separator,
|
s=separator,
|
||||||
cs=case_sensitive
|
cs=case_sensitive
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user