mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-09-20 02:42:40 +03:00
Updated docstring to google format
This commit is contained in:
parent
b883c2ff0d
commit
d0439d8dc9
|
@ -184,7 +184,8 @@ class TelegramClient(TelegramBareClient):
|
|||
|
||||
return result
|
||||
|
||||
def start(self, phone=None, bot_token=None, code_callback=None, password_callback=None):
|
||||
def start(self, phone=None, bot_token=None, force_sms=False, code_callback=None,
|
||||
password_callback=None):
|
||||
"""Convenience method to interactively connect and authorize.
|
||||
|
||||
Example usage:
|
||||
|
@ -197,13 +198,20 @@ class TelegramClient(TelegramBareClient):
|
|||
provided that will be used to obtain the Telegram login code and 2FA password,
|
||||
respectively. They will default to the `input()` function from the standard library.
|
||||
|
||||
:param phone: The Telegram user's phone number to log in as a user
|
||||
:param bot_token: Bot Token obtained by @BotFather to log in as a bot
|
||||
:param code_callback: optional. A callable that will be used to retrieve the Telegram login
|
||||
code
|
||||
:param password_callback: optional. A callable that will be used to retrieve the user's
|
||||
2FA password
|
||||
:return: This client
|
||||
Args:
|
||||
phone (:obj:`str` | :obj:`int`):
|
||||
The phone to which the code will be sent.
|
||||
bot_token (:obj:`str`):
|
||||
Bot Token obtained by @BotFather to log in as a bot.
|
||||
force_sms (:obj:`bool`, optional):
|
||||
Whether to force sending as SMS.
|
||||
code_callback (:obj:`callable`, optional):
|
||||
A callable that will be used to retrieve the Telegram login code.
|
||||
password_callback (:obj:`callable`, optional):
|
||||
A callable that will be used to retrieve the user's 2FA password.
|
||||
|
||||
Returns:
|
||||
:obj:`TelegramClient`: This client.
|
||||
"""
|
||||
|
||||
if code_callback is None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user