From 57dc2e85f4954a6c1d53a68c6e69320077834135 Mon Sep 17 00:00:00 2001 From: penn5 Date: Wed, 14 Oct 2020 11:28:17 +0100 Subject: [PATCH] give more detail when warning about incorrect phone/id --- telethon/client/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/client/auth.py b/telethon/client/auth.py index 8c91a694..73612af8 100644 --- a/telethon/client/auth.py +++ b/telethon/client/auth.py @@ -153,13 +153,13 @@ class AuthMethods: warnings.warn( 'the session already had an authorized user so it did ' 'not login to the bot account using the provided ' - 'bot_token (it may not be using the user you expect)' + f'bot_token (it is using ID {me.id})' ) elif phone and not callable(phone) and utils.parse_phone(phone) != me.phone: warnings.warn( 'the session already had an authorized user so it did ' 'not login to the user account using the provided ' - 'phone (it may not be using the user you expect)' + f'phone (the account is using phone number {me.phone})' ) return self