2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Print account name when logging in the first time

This commit is contained in:
Dan 2018-12-15 11:10:25 +01:00
parent afb3f55d33
commit 70470360b1

View File

@ -437,6 +437,8 @@ class Client(Methods, BaseClient):
else:
self.user_id = r.user.id
print("Logged in successfully as @{}".format(r.user.username))
def authorize_user(self):
phone_number_invalid_raises = self.phone_number is not None
phone_code_invalid_raises = self.phone_code is not None
@ -621,7 +623,7 @@ class Client(Methods, BaseClient):
self.password = None
self.user_id = r.user.id
print("Login successful")
print("Logged in successfully as {}".format(r.user.first_name))
def fetch_peers(self, entities: list):
for entity in entities: