diff --git a/readthedocs/misc/v2-migration-guide.rst b/readthedocs/misc/v2-migration-guide.rst index 3380ac92..a43f3ffa 100644 --- a/readthedocs/misc/v2-migration-guide.rst +++ b/readthedocs/misc/v2-migration-guide.rst @@ -983,3 +983,4 @@ send_code_request now returns a custom type (reducing raw api). sign_in no longer has phone or phone_hash (these are impl details, and now it's less error prone). also mandatory code=. also no longer is a no-op if already logged in. different error for sign up required. send code / sign in now only expect a single phone. resend code with new phone is send code, not resend. sign_up code is also now a kwarg. and no longer noop if already loggedin. +start also mandates phone= or password= as kwarg. diff --git a/telethon/_client/telegramclient.py b/telethon/_client/telegramclient.py index df58a287..68393583 100644 --- a/telethon/_client/telegramclient.py +++ b/telethon/_client/telegramclient.py @@ -313,9 +313,9 @@ class TelegramClient: @forward_call(auth.start) def start( self: 'TelegramClient', + *, phone: typing.Callable[[], str] = lambda: input('Please enter your phone (or bot token): '), password: typing.Callable[[], str] = lambda: getpass.getpass('Please enter your password: '), - *, bot_token: str = None, code_callback: typing.Callable[[], typing.Union[str, int]] = None, first_name: str = 'New User',