From 70470360b1d8167a20134e56728a345cda65e212 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 15 Dec 2018 11:10:25 +0100 Subject: [PATCH] Print account name when logging in the first time --- pyrogram/client/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 9235eb12..bd132851 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -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: