Fix bot_token could not be specified alone on .start()

This commit is contained in:
Lonami Exo 2018-02-17 12:32:30 +01:00
parent 7c647b57e3
commit 2bfe86cda1

View File

@ -267,7 +267,7 @@ class TelegramClient(TelegramBareClient):
if not phone and not bot_token:
raise ValueError('No phone number or bot token provided.')
if phone and bot_token:
if phone and bot_token and not callable(phone):
raise ValueError('Both a phone and a bot token provided, '
'must only provide one of either')