From d71db29a8c6f579719f6a0895be43782a5619803 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:28:49 +0200 Subject: [PATCH] Store the "me" user object --- pyrogram/client.py | 3 +-- pyrogram/filters.py | 2 +- pyrogram/methods/auth/initialize.py | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) 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"([\"'])(.*?)(?