From 5b5fb6cbec6ea083418b7485fc766f18181b698c Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 18 Mar 2018 13:00:28 +0100 Subject: [PATCH] Update docstrings to accommodate joinchat links --- pyrogram/client/client.py | 141 +++++++++++++++++++++----------------- 1 file changed, 80 insertions(+), 61 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 820c7dd1..9c49058a 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -986,9 +986,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. text (:obj:`str`): Text of the message to be sent. @@ -1036,15 +1037,16 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. from_chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the chat where the original message was sent - (or channel/supergroup username in the format @username). For your personal cloud - storage (Saved Messages) you can simply use "me" or "self". - Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the source chat where the original message was sent. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. message_ids (:obj:`list`): A list of Message identifiers in the chat specified in *from_chat_id*. @@ -1082,9 +1084,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. photo (:obj:`str`): Photo to send. @@ -1167,9 +1170,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. audio (:obj:`str`): Audio file to send. @@ -1259,9 +1263,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. document (:obj:`str`): File to send. @@ -1335,9 +1340,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. sticker (:obj:`str`): Sticker to send. @@ -1409,9 +1415,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. video (:obj:`str`): Video to send. @@ -1513,9 +1520,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. voice (:obj:`str`): Audio file to send. @@ -1597,9 +1605,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. video_note (:obj:`str`): Video note to send. @@ -1676,9 +1685,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. media (:obj:`list`): A list containing either :obj:`pyrogram.InputMedia.Photo` or :obj:`pyrogram.InputMedia.Video` objects @@ -1774,9 +1784,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. latitude (:obj:`float`): Latitude of the location. @@ -1826,9 +1837,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. latitude (:obj:`float`): Latitude of the venue. @@ -1890,9 +1902,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. phone_number (:obj:`str`): Contact's phone number. @@ -1939,9 +1952,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. action (:obj:`callable`): Type of action to broadcast. @@ -2001,9 +2015,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. message_id (:obj:`int`): Message identifier in the chat specified in chat_id. @@ -2042,9 +2057,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. message_id (:obj:`int`): Message identifier in the chat specified in chat_id. @@ -2084,9 +2100,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. message_ids (:obj:`list`): List of identifiers of the messages to delete. @@ -2823,9 +2840,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. query_id (:obj:`int`): Unique identifier for the answered query. @@ -2865,9 +2883,10 @@ class Client: Args: chat_id (:obj:`int` | :obj:`str`): - Unique identifier for the target chat or username of the target channel/supergroup - (in the format @username). For your personal cloud storage (Saved Messages) you can - simply use "me" or "self". Phone numbers that exist in your Telegram address book are also supported. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. message_ids (:obj:`list`): A list of Message identifiers in the chat specified in *chat_id*.