diff --git a/pyrogram/client.py b/pyrogram/client.py index c1d04046..d30a5e9a 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -270,8 +270,7 @@ class Client(Methods): self.disconnect_handler = None - # Username used for mentioned bot commands, e.g.: /start@usernamebot - self.username = None + self.me: Optional[User] = None self.message_cache = Cache(10000) diff --git a/pyrogram/filters.py b/pyrogram/filters.py index 76bff856..f31b385e 100644 --- a/pyrogram/filters.py +++ b/pyrogram/filters.py @@ -757,7 +757,7 @@ def command(commands: Union[str, List[str]], prefixes: Union[str, List[str]] = " command_re = re.compile(r"([\"'])(.*?)(?