mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
@@ -231,7 +231,15 @@ class TelegramClient(TelegramBareClient):
|
||||
'function that returns the code you received by Telegram.'
|
||||
)
|
||||
|
||||
if (phone and bot_token) or (not phone and not bot_token):
|
||||
if not phone and not bot_token:
|
||||
value = input('Please enter your phone/bot token: ')
|
||||
phone = utils.parse_phone(phone)
|
||||
if not phone:
|
||||
bot_token = value
|
||||
print("Note: input doesn't look like a phone, "
|
||||
"using as bot token")
|
||||
|
||||
if phone and bot_token:
|
||||
raise ValueError(
|
||||
'You must provide either a phone number or a bot token, '
|
||||
'not both (or neither).'
|
||||
|
Reference in New Issue
Block a user