diff --git a/pyrogram/filters.py b/pyrogram/filters.py index 9a1b2bdd..d969026b 100644 --- a/pyrogram/filters.py +++ b/pyrogram/filters.py @@ -740,10 +740,15 @@ async def linked_channel_filter(_, __, m: Message): linked_channel = create(linked_channel_filter) """Filter messages that are automatically forwarded from the linked channel to the group chat.""" - # endregion +# region command_filter + +# Used by the command filter below +username = None + + def command(commands: Union[str, List[str]], prefixes: Union[str, List[str]] = "/", case_sensitive: bool = False): """Filter commands, i.e.: text messages starting with "/" or any other custom prefix. @@ -764,10 +769,10 @@ def command(commands: Union[str, List[str]], prefixes: Union[str, List[str]] = " Examples: when True, command="Start" would trigger /Start but not /start. """ command_re = re.compile(r"([\"'])(.*?)(?