diff --git a/pyrogram/methods/advanced/resolve_peer.py b/pyrogram/methods/advanced/resolve_peer.py index ebb8ff44..c92ec90d 100644 --- a/pyrogram/methods/advanced/resolve_peer.py +++ b/pyrogram/methods/advanced/resolve_peer.py @@ -47,7 +47,7 @@ class ResolvePeer: Parameters: peer_id (``int`` | ``str``): The peer id you want to extract the InputPeer from. - Can be a direct id (int), a username (str) or a phone number (str). + Can be a direct id (int), a username (str) or a phone number (str) or *t.me/* link. Returns: ``InputPeer``: On success, the resolved peer id is returned in form of an InputPeer object. @@ -66,6 +66,7 @@ class ResolvePeer: return raw.types.InputPeerSelf() peer_id = re.sub(r"[@+\s]", "", peer_id.lower()) + peer_id = re.sub(r"https://t.me/", "", peer_id.lower()) try: int(peer_id) diff --git a/pyrogram/methods/bots/get_chat_menu_button.py b/pyrogram/methods/bots/get_chat_menu_button.py index 9d143d58..4f55abe0 100644 --- a/pyrogram/methods/bots/get_chat_menu_button.py +++ b/pyrogram/methods/bots/get_chat_menu_button.py @@ -35,6 +35,7 @@ class GetChatMenuButton: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use user profile/chat public link in form of *t.me/* (str). If not specified, default bot's menu button will be returned. """ diff --git a/pyrogram/methods/bots/get_game_high_scores.py b/pyrogram/methods/bots/get_game_high_scores.py index 068ecab8..d8e21af4 100644 --- a/pyrogram/methods/bots/get_game_high_scores.py +++ b/pyrogram/methods/bots/get_game_high_scores.py @@ -39,6 +39,7 @@ class GetGameHighScores: 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). + You can also use user profile link in form of *t.me/* (str). chat_id (``int`` | ``str``, *optional*): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/bots/get_inline_bot_results.py b/pyrogram/methods/bots/get_inline_bot_results.py index 7cb0aa12..b6605bf9 100644 --- a/pyrogram/methods/bots/get_inline_bot_results.py +++ b/pyrogram/methods/bots/get_inline_bot_results.py @@ -41,6 +41,7 @@ class GetInlineBotResults: bot (``int`` | ``str``): Unique identifier of the inline bot you want to get results from. You can specify a @username (str) or a bot ID (int). + You can also use bot profile link in form of *t.me/* (str). query (``str``, *optional*): Text of the query (up to 512 characters). diff --git a/pyrogram/methods/bots/request_callback_answer.py b/pyrogram/methods/bots/request_callback_answer.py index 22debcbe..f18f25af 100644 --- a/pyrogram/methods/bots/request_callback_answer.py +++ b/pyrogram/methods/bots/request_callback_answer.py @@ -40,6 +40,7 @@ class RequestCallbackAnswer: 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). + You can also use user profile/chat public link in form of *t.me/* (str). message_id (``int``): The message id the inline keyboard is attached on. diff --git a/pyrogram/methods/bots/send_game.py b/pyrogram/methods/bots/send_game.py index 122f6624..98e28ed1 100644 --- a/pyrogram/methods/bots/send_game.py +++ b/pyrogram/methods/bots/send_game.py @@ -49,6 +49,7 @@ class SendGame: 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). + You can also use user profile/chat public link in form of *t.me/* (str). game_short_name (``str``): Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather. diff --git a/pyrogram/methods/bots/send_inline_bot_result.py b/pyrogram/methods/bots/send_inline_bot_result.py index 52afcc81..3a11a789 100644 --- a/pyrogram/methods/bots/send_inline_bot_result.py +++ b/pyrogram/methods/bots/send_inline_bot_result.py @@ -46,6 +46,7 @@ class SendInlineBotResult: 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). + You can also use user profile/chat public link in form of *t.me/* (str). query_id (``int``): Unique identifier for the answered query. diff --git a/pyrogram/methods/bots/set_game_score.py b/pyrogram/methods/bots/set_game_score.py index b3b58b23..9703b3d1 100644 --- a/pyrogram/methods/bots/set_game_score.py +++ b/pyrogram/methods/bots/set_game_score.py @@ -43,6 +43,7 @@ class SetGameScore: 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). + You can also use user profile link in form of *t.me/* (str). score (``int``): New score, must be non-negative. diff --git a/pyrogram/methods/chats/add_chat_members.py b/pyrogram/methods/chats/add_chat_members.py index b560a6af..af9af1df 100644 --- a/pyrogram/methods/chats/add_chat_members.py +++ b/pyrogram/methods/chats/add_chat_members.py @@ -35,12 +35,13 @@ class AddChatMembers: Parameters: chat_id (``int`` | ``str``): - The group, supergroup or channel id + The group, supergroup or channel id or chat/channel public link user_ids (``int`` | ``str`` | List of ``int`` or ``str``): Users to add in the chat You can pass an ID (int), username (str) or phone number (str). Multiple users can be added by passing a list of IDs, usernames or phone numbers. + You can also use user profile link in form of *t.me/* (str). forward_limit (``int``, *optional*): How many of the latest messages you want to forward to the new members. Pass 0 to forward none of them. diff --git a/pyrogram/methods/chats/archive_chats.py b/pyrogram/methods/chats/archive_chats.py index 661b450c..010a65ac 100644 --- a/pyrogram/methods/chats/archive_chats.py +++ b/pyrogram/methods/chats/archive_chats.py @@ -35,6 +35,7 @@ class ArchiveChats: chat_ids (``int`` | ``str`` | List[``int``, ``str``]): Unique identifier (int) or username (str) of the target chat. You can also pass a list of ids (int) or usernames (str). + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: On success, True is returned. diff --git a/pyrogram/methods/chats/ban_chat_member.py b/pyrogram/methods/chats/ban_chat_member.py index 6609388a..afb0d1a2 100644 --- a/pyrogram/methods/chats/ban_chat_member.py +++ b/pyrogram/methods/chats/ban_chat_member.py @@ -46,10 +46,12 @@ class BanChatMember: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). until_date (:py:obj:`~datetime.datetime`, *optional*): Date when the user will be unbanned. diff --git a/pyrogram/methods/chats/close_forum_topic.py b/pyrogram/methods/chats/close_forum_topic.py index 06bd42bb..fb4c537f 100644 --- a/pyrogram/methods/chats/close_forum_topic.py +++ b/pyrogram/methods/chats/close_forum_topic.py @@ -34,6 +34,7 @@ class CloseForumTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). topic_id (``int``): Unique identifier (int) of the target forum topic. diff --git a/pyrogram/methods/chats/close_general_topic.py b/pyrogram/methods/chats/close_general_topic.py index 0e8286dd..2f915669 100644 --- a/pyrogram/methods/chats/close_general_topic.py +++ b/pyrogram/methods/chats/close_general_topic.py @@ -33,6 +33,7 @@ class CloseGeneralTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: `bool`: On success, a True is returned. diff --git a/pyrogram/methods/chats/create_forum_topic.py b/pyrogram/methods/chats/create_forum_topic.py index f0ed4a57..d6d23f30 100644 --- a/pyrogram/methods/chats/create_forum_topic.py +++ b/pyrogram/methods/chats/create_forum_topic.py @@ -36,6 +36,7 @@ class CreateForumTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). title (``str``): The forum topic title. diff --git a/pyrogram/methods/chats/delete_channel.py b/pyrogram/methods/chats/delete_channel.py index 374d89a6..c1e4b953 100644 --- a/pyrogram/methods/chats/delete_channel.py +++ b/pyrogram/methods/chats/delete_channel.py @@ -34,6 +34,7 @@ class DeleteChannel: Parameters: chat_id (``int`` | ``str``): The id of the channel to be deleted. + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: On success, True is returned. diff --git a/pyrogram/methods/chats/delete_chat_photo.py b/pyrogram/methods/chats/delete_chat_photo.py index 1984bc0c..a8ce7e63 100644 --- a/pyrogram/methods/chats/delete_chat_photo.py +++ b/pyrogram/methods/chats/delete_chat_photo.py @@ -36,6 +36,7 @@ class DeleteChatPhoto: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: True on success. diff --git a/pyrogram/methods/chats/delete_forum_topic.py b/pyrogram/methods/chats/delete_forum_topic.py index 5f1c36a5..0fcc8da5 100644 --- a/pyrogram/methods/chats/delete_forum_topic.py +++ b/pyrogram/methods/chats/delete_forum_topic.py @@ -34,6 +34,7 @@ class DeleteForumTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). topic_id (``int``): Unique identifier (int) of the target forum topic. diff --git a/pyrogram/methods/chats/delete_supergroup.py b/pyrogram/methods/chats/delete_supergroup.py index ebd60bef..1c246613 100644 --- a/pyrogram/methods/chats/delete_supergroup.py +++ b/pyrogram/methods/chats/delete_supergroup.py @@ -34,6 +34,7 @@ class DeleteSupergroup: Parameters: chat_id (``int`` | ``str``): The id of the supergroup to be deleted. + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: On success, True is returned. diff --git a/pyrogram/methods/chats/delete_user_history.py b/pyrogram/methods/chats/delete_user_history.py index 7769c7c3..0f5c0bc8 100644 --- a/pyrogram/methods/chats/delete_user_history.py +++ b/pyrogram/methods/chats/delete_user_history.py @@ -35,9 +35,11 @@ class DeleteUserHistory: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the user whose messages will be deleted. + You can also use user profile link in form of *t.me/* (str). Returns: ``bool``: True on success, False otherwise. diff --git a/pyrogram/methods/chats/edit_forum_topic.py b/pyrogram/methods/chats/edit_forum_topic.py index 41f1bd05..ceb0aa6d 100644 --- a/pyrogram/methods/chats/edit_forum_topic.py +++ b/pyrogram/methods/chats/edit_forum_topic.py @@ -36,6 +36,7 @@ class EditForumTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). topic_id (``int``): Unique identifier (int) of the target forum topic. diff --git a/pyrogram/methods/chats/edit_general_topic.py b/pyrogram/methods/chats/edit_general_topic.py index a828ac23..13459843 100644 --- a/pyrogram/methods/chats/edit_general_topic.py +++ b/pyrogram/methods/chats/edit_general_topic.py @@ -34,6 +34,7 @@ class EditGeneralTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). title (``str``): The general forum topic title. diff --git a/pyrogram/methods/chats/get_chat.py b/pyrogram/methods/chats/get_chat.py index e2289935..0dd0e531 100644 --- a/pyrogram/methods/chats/get_chat.py +++ b/pyrogram/methods/chats/get_chat.py @@ -39,8 +39,9 @@ class GetChat: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. - Unique identifier for the target chat in form of a *t.me/joinchat/* link, identifier (int) or username - of the target channel/supergroup (in the format @username). + Unique identifier for the target chat in form of a *t.me/joinchat/* or *t.me/* link link, + identifier (int) or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). Returns: :obj:`~pyrogram.types.Chat` | :obj:`~pyrogram.types.ChatPreview`: On success, if you've already joined the chat, a chat object is returned, diff --git a/pyrogram/methods/chats/get_chat_event_log.py b/pyrogram/methods/chats/get_chat_event_log.py index 06fa01c8..6ac0893a 100644 --- a/pyrogram/methods/chats/get_chat_event_log.py +++ b/pyrogram/methods/chats/get_chat_event_log.py @@ -43,6 +43,7 @@ class GetChatEventLog: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). query (``str``, *optional*): Search query to filter events based on text. diff --git a/pyrogram/methods/chats/get_chat_member.py b/pyrogram/methods/chats/get_chat_member.py index 53d2faad..015c1785 100644 --- a/pyrogram/methods/chats/get_chat_member.py +++ b/pyrogram/methods/chats/get_chat_member.py @@ -37,11 +37,13 @@ class GetChatMember: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). user_id (``int`` | ``str``):: Unique identifier (int) or username (str) of the target user. For you yourself you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). Returns: :obj:`~pyrogram.types.ChatMember`: On success, a chat member is returned. diff --git a/pyrogram/methods/chats/get_chat_members.py b/pyrogram/methods/chats/get_chat_members.py index 49fb0a09..3700a1a0 100644 --- a/pyrogram/methods/chats/get_chat_members.py +++ b/pyrogram/methods/chats/get_chat_members.py @@ -75,6 +75,7 @@ class GetChatMembers: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). query (``str``, *optional*): Query string to filter members based on their display names and usernames. diff --git a/pyrogram/methods/chats/get_chat_members_count.py b/pyrogram/methods/chats/get_chat_members_count.py index 26807028..71a8c0ef 100644 --- a/pyrogram/methods/chats/get_chat_members_count.py +++ b/pyrogram/methods/chats/get_chat_members_count.py @@ -34,6 +34,7 @@ class GetChatMembersCount: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: ``int``: On success, the chat members count is returned. diff --git a/pyrogram/methods/chats/get_chat_online_count.py b/pyrogram/methods/chats/get_chat_online_count.py index 6ecd5727..fe6ab59a 100644 --- a/pyrogram/methods/chats/get_chat_online_count.py +++ b/pyrogram/methods/chats/get_chat_online_count.py @@ -34,6 +34,7 @@ class GetChatOnlineCount: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: ``int``: On success, the chat members online count is returned. diff --git a/pyrogram/methods/chats/get_forum_topics.py b/pyrogram/methods/chats/get_forum_topics.py index 5b516b16..1620bc4b 100644 --- a/pyrogram/methods/chats/get_forum_topics.py +++ b/pyrogram/methods/chats/get_forum_topics.py @@ -41,6 +41,7 @@ class GetForumTopics: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). limit (``int``, *optional*): Limits the number of topics to be retrieved. diff --git a/pyrogram/methods/chats/get_forum_topics_by_id.py b/pyrogram/methods/chats/get_forum_topics_by_id.py index deae1006..ea2114aa 100644 --- a/pyrogram/methods/chats/get_forum_topics_by_id.py +++ b/pyrogram/methods/chats/get_forum_topics_by_id.py @@ -41,6 +41,7 @@ class GetForumTopicsByID: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). topic_ids (``int`` | Iterable of ``int``, *optional*): Pass a single topic identifier or an iterable of topic ids (as integers) to get the information of the diff --git a/pyrogram/methods/chats/get_send_as_chats.py b/pyrogram/methods/chats/get_send_as_chats.py index c9a358c3..b530fe48 100644 --- a/pyrogram/methods/chats/get_send_as_chats.py +++ b/pyrogram/methods/chats/get_send_as_chats.py @@ -35,6 +35,7 @@ class GetSendAsChats: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: List[:obj:`~pyrogram.types.Chat`]: The list of chats. diff --git a/pyrogram/methods/chats/hide_general_topic.py b/pyrogram/methods/chats/hide_general_topic.py index 8c42f6cc..901758ca 100644 --- a/pyrogram/methods/chats/hide_general_topic.py +++ b/pyrogram/methods/chats/hide_general_topic.py @@ -33,6 +33,7 @@ class HideGeneralTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: `bool`: On success, a True is returned. diff --git a/pyrogram/methods/chats/join_chat.py b/pyrogram/methods/chats/join_chat.py index 2ef82cff..def52db4 100644 --- a/pyrogram/methods/chats/join_chat.py +++ b/pyrogram/methods/chats/join_chat.py @@ -34,8 +34,8 @@ class JoinChat: Parameters: chat_id (``int`` | ``str``): - Unique identifier for the target chat in form of a *t.me/joinchat/* link, a username of the target - channel/supergroup (in the format @username) or a chat id of a linked chat (channel or supergroup). + Unique identifier for the target chat in form of a *t.me/joinchat/* or *t.me/* link, + a username of the target channel/supergroup (in the format @username) or a chat id of a linked chat (channel or supergroup). Returns: :obj:`~pyrogram.types.Chat`: On success, a chat object is returned. diff --git a/pyrogram/methods/chats/leave_chat.py b/pyrogram/methods/chats/leave_chat.py index b974e387..0e307897 100644 --- a/pyrogram/methods/chats/leave_chat.py +++ b/pyrogram/methods/chats/leave_chat.py @@ -36,6 +36,7 @@ class LeaveChat: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). delete (``bool``, *optional*): Deletes the group chat dialog after leaving (for simple group chats, not supergroups). diff --git a/pyrogram/methods/chats/mark_chat_unread.py b/pyrogram/methods/chats/mark_chat_unread.py index 45aec2f8..b5426597 100644 --- a/pyrogram/methods/chats/mark_chat_unread.py +++ b/pyrogram/methods/chats/mark_chat_unread.py @@ -34,6 +34,7 @@ class MarkChatUnread: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: On success, True is returned. diff --git a/pyrogram/methods/chats/pin_chat_message.py b/pyrogram/methods/chats/pin_chat_message.py index 8ec06e7b..73b373ff 100644 --- a/pyrogram/methods/chats/pin_chat_message.py +++ b/pyrogram/methods/chats/pin_chat_message.py @@ -39,6 +39,7 @@ class PinChatMessage: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Identifier of a message to pin. diff --git a/pyrogram/methods/chats/promote_chat_member.py b/pyrogram/methods/chats/promote_chat_member.py index 3fea18d5..9fe37180 100644 --- a/pyrogram/methods/chats/promote_chat_member.py +++ b/pyrogram/methods/chats/promote_chat_member.py @@ -40,10 +40,12 @@ class PromoteChatMember: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). privileges (:obj:`~pyrogram.types.ChatPrivileges`, *optional*): New user privileges. diff --git a/pyrogram/methods/chats/reopen_forum_topic.py b/pyrogram/methods/chats/reopen_forum_topic.py index f491fbb5..1b5e6a63 100644 --- a/pyrogram/methods/chats/reopen_forum_topic.py +++ b/pyrogram/methods/chats/reopen_forum_topic.py @@ -34,6 +34,7 @@ class ReopenForumTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). topic_id (``int``): Unique identifier (int) of the target forum topic. diff --git a/pyrogram/methods/chats/reopen_general_topic.py b/pyrogram/methods/chats/reopen_general_topic.py index 25381085..a1ba65da 100644 --- a/pyrogram/methods/chats/reopen_general_topic.py +++ b/pyrogram/methods/chats/reopen_general_topic.py @@ -33,6 +33,7 @@ class ReopenGeneralTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: `bool`: On success, a True is returned. diff --git a/pyrogram/methods/chats/restrict_chat_member.py b/pyrogram/methods/chats/restrict_chat_member.py index be2524ff..c5626db3 100644 --- a/pyrogram/methods/chats/restrict_chat_member.py +++ b/pyrogram/methods/chats/restrict_chat_member.py @@ -43,10 +43,12 @@ class RestrictChatMember: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). permissions (:obj:`~pyrogram.types.ChatPermissions`): New user permissions. diff --git a/pyrogram/methods/chats/set_administrator_title.py b/pyrogram/methods/chats/set_administrator_title.py index 2c77066e..9e042408 100644 --- a/pyrogram/methods/chats/set_administrator_title.py +++ b/pyrogram/methods/chats/set_administrator_title.py @@ -39,10 +39,12 @@ class SetAdministratorTitle: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). title (``str``, *optional*): A custom title that will be shown to all members instead of "Owner" or "Admin". diff --git a/pyrogram/methods/chats/set_chat_description.py b/pyrogram/methods/chats/set_chat_description.py index 563e990c..c9cd14da 100644 --- a/pyrogram/methods/chats/set_chat_description.py +++ b/pyrogram/methods/chats/set_chat_description.py @@ -36,6 +36,7 @@ class SetChatDescription: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). description (``str``): New chat description, 0-255 characters. diff --git a/pyrogram/methods/chats/set_chat_permissions.py b/pyrogram/methods/chats/set_chat_permissions.py index 7fc0e18a..9210b246 100644 --- a/pyrogram/methods/chats/set_chat_permissions.py +++ b/pyrogram/methods/chats/set_chat_permissions.py @@ -40,6 +40,7 @@ class SetChatPermissions: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). permissions (:obj:`~pyrogram.types.ChatPermissions`): New default chat permissions. diff --git a/pyrogram/methods/chats/set_chat_photo.py b/pyrogram/methods/chats/set_chat_photo.py index f3db5329..7a305739 100644 --- a/pyrogram/methods/chats/set_chat_photo.py +++ b/pyrogram/methods/chats/set_chat_photo.py @@ -46,6 +46,7 @@ class SetChatPhoto: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). photo (``str`` | ``BinaryIO``, *optional*): New chat photo. You can pass a :obj:`~pyrogram.types.Photo` file_id, a file path to upload a new photo diff --git a/pyrogram/methods/chats/set_chat_protected_content.py b/pyrogram/methods/chats/set_chat_protected_content.py index b6a89c11..2ed9a097 100644 --- a/pyrogram/methods/chats/set_chat_protected_content.py +++ b/pyrogram/methods/chats/set_chat_protected_content.py @@ -35,6 +35,7 @@ class SetChatProtectedContent: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). enabled (``bool``): Pass True to enable the protected content setting, False to disable. diff --git a/pyrogram/methods/chats/set_chat_title.py b/pyrogram/methods/chats/set_chat_title.py index 9a963571..1e0b2ed8 100644 --- a/pyrogram/methods/chats/set_chat_title.py +++ b/pyrogram/methods/chats/set_chat_title.py @@ -41,6 +41,7 @@ class SetChatTitle: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). title (``str``): New chat title, 1-255 characters. diff --git a/pyrogram/methods/chats/set_chat_username.py b/pyrogram/methods/chats/set_chat_username.py index e6d64e98..af12d542 100644 --- a/pyrogram/methods/chats/set_chat_username.py +++ b/pyrogram/methods/chats/set_chat_username.py @@ -37,6 +37,7 @@ class SetChatUsername: Parameters: chat_id (``int`` | ``str``) Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). username (``str`` | ``None``): Username to set. Pass "" (empty string) or None to remove the username. diff --git a/pyrogram/methods/chats/set_send_as_chat.py b/pyrogram/methods/chats/set_send_as_chat.py index 15201f3b..95f29464 100644 --- a/pyrogram/methods/chats/set_send_as_chat.py +++ b/pyrogram/methods/chats/set_send_as_chat.py @@ -37,9 +37,11 @@ class SetSendAsChat: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). send_as_chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the send_as chat. + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: On success, true is returned diff --git a/pyrogram/methods/chats/set_slow_mode.py b/pyrogram/methods/chats/set_slow_mode.py index 60e88e6d..9ad544ce 100644 --- a/pyrogram/methods/chats/set_slow_mode.py +++ b/pyrogram/methods/chats/set_slow_mode.py @@ -35,6 +35,7 @@ class SetSlowMode: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). seconds (``int`` | ``None``): Seconds in which members will be able to send only one message per this interval. diff --git a/pyrogram/methods/chats/unarchive_chats.py b/pyrogram/methods/chats/unarchive_chats.py index 4d2cb0e4..160a56b1 100644 --- a/pyrogram/methods/chats/unarchive_chats.py +++ b/pyrogram/methods/chats/unarchive_chats.py @@ -35,6 +35,7 @@ class UnarchiveChats: chat_ids (``int`` | ``str`` | List[``int``, ``str``]): Unique identifier (int) or username (str) of the target chat. You can also pass a list of ids (int) or usernames (str). + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: On success, True is returned. diff --git a/pyrogram/methods/chats/unban_chat_member.py b/pyrogram/methods/chats/unban_chat_member.py index bbe7b454..38eff234 100644 --- a/pyrogram/methods/chats/unban_chat_member.py +++ b/pyrogram/methods/chats/unban_chat_member.py @@ -37,6 +37,7 @@ class UnbanChatMember: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. diff --git a/pyrogram/methods/chats/unhide_general_topic.py b/pyrogram/methods/chats/unhide_general_topic.py index 0f3213aa..2bad75ed 100644 --- a/pyrogram/methods/chats/unhide_general_topic.py +++ b/pyrogram/methods/chats/unhide_general_topic.py @@ -33,6 +33,7 @@ class UnhideGeneralTopic: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: `bool`: On success, a True is returned. diff --git a/pyrogram/methods/chats/unpin_all_chat_messages.py b/pyrogram/methods/chats/unpin_all_chat_messages.py index 25a53caf..c05b2672 100644 --- a/pyrogram/methods/chats/unpin_all_chat_messages.py +++ b/pyrogram/methods/chats/unpin_all_chat_messages.py @@ -36,6 +36,7 @@ class UnpinAllChatMessages: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: ``bool``: True on success. diff --git a/pyrogram/methods/chats/unpin_chat_message.py b/pyrogram/methods/chats/unpin_chat_message.py index 6c8e036e..4d1c1a23 100644 --- a/pyrogram/methods/chats/unpin_chat_message.py +++ b/pyrogram/methods/chats/unpin_chat_message.py @@ -37,6 +37,7 @@ class UnpinChatMessage: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). message_id (``int``, *optional*): Identifier of a message to unpin. diff --git a/pyrogram/methods/chats/update_color.py b/pyrogram/methods/chats/update_color.py index eb96ea31..f14d5568 100644 --- a/pyrogram/methods/chats/update_color.py +++ b/pyrogram/methods/chats/update_color.py @@ -36,6 +36,7 @@ class UpdateColor: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). color (:obj:`~pyrogram.enums.ReplyColor` | :obj:`~pyrogram.enums.ProfileColor`): Color type. diff --git a/pyrogram/methods/contacts/add_contact.py b/pyrogram/methods/contacts/add_contact.py index 9c4faa7e..26e15230 100644 --- a/pyrogram/methods/contacts/add_contact.py +++ b/pyrogram/methods/contacts/add_contact.py @@ -39,6 +39,7 @@ class AddContact: Parameters: user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. + You can also use user profile link in form of *t.me/* (str). first_name (``str``): User's first name. diff --git a/pyrogram/methods/contacts/delete_contacts.py b/pyrogram/methods/contacts/delete_contacts.py index 7f08f297..cd2df5e1 100644 --- a/pyrogram/methods/contacts/delete_contacts.py +++ b/pyrogram/methods/contacts/delete_contacts.py @@ -34,6 +34,7 @@ class DeleteContacts: Parameters: user_ids (``int`` | ``str`` | List of ``int`` or ``str``): A single user id/username or a list of user identifiers (id or username). + You can also use user profile link in form of *t.me/* (str). Returns: :obj:`~pyrogram.types.User` | List of :obj:`~pyrogram.types.User` | ``None``: In case *user_ids* was an diff --git a/pyrogram/methods/invite_links/approve_all_chat_join_requests.py b/pyrogram/methods/invite_links/approve_all_chat_join_requests.py index 623fd87f..3cbf778a 100644 --- a/pyrogram/methods/invite_links/approve_all_chat_join_requests.py +++ b/pyrogram/methods/invite_links/approve_all_chat_join_requests.py @@ -36,6 +36,7 @@ class ApproveAllChatJoinRequests: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (``str``, *optional*): Pass an invite link to approve only its join requests. diff --git a/pyrogram/methods/invite_links/approve_chat_join_request.py b/pyrogram/methods/invite_links/approve_chat_join_request.py index 2fc4e6d3..6b5f9b17 100644 --- a/pyrogram/methods/invite_links/approve_chat_join_request.py +++ b/pyrogram/methods/invite_links/approve_chat_join_request.py @@ -39,9 +39,11 @@ class ApproveChatJoinRequest: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). user_id (``int``): Unique identifier of the target user. + You can also use user profile link in form of *t.me/* (str). Returns: ``bool``: True on success. diff --git a/pyrogram/methods/invite_links/create_chat_invite_link.py b/pyrogram/methods/invite_links/create_chat_invite_link.py index ccf8d650..ce70a0ad 100644 --- a/pyrogram/methods/invite_links/create_chat_invite_link.py +++ b/pyrogram/methods/invite_links/create_chat_invite_link.py @@ -45,6 +45,7 @@ class CreateChatInviteLink: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). name (``str``, *optional*): Invite link name. diff --git a/pyrogram/methods/invite_links/decline_all_chat_join_requests.py b/pyrogram/methods/invite_links/decline_all_chat_join_requests.py index 9cf50955..2a135c63 100644 --- a/pyrogram/methods/invite_links/decline_all_chat_join_requests.py +++ b/pyrogram/methods/invite_links/decline_all_chat_join_requests.py @@ -36,6 +36,7 @@ class DeclineAllChatJoinRequests: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (``str``, *optional*): Pass an invite link to decline only its join requests. diff --git a/pyrogram/methods/invite_links/decline_chat_join_request.py b/pyrogram/methods/invite_links/decline_chat_join_request.py index 9a35b8ee..2379071f 100644 --- a/pyrogram/methods/invite_links/decline_chat_join_request.py +++ b/pyrogram/methods/invite_links/decline_chat_join_request.py @@ -39,9 +39,11 @@ class DeclineChatJoinRequest: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). user_id (``int``): Unique identifier of the target user. + You can also use user profile link in form of *t.me/* (str). Returns: ``bool``: True on success. diff --git a/pyrogram/methods/invite_links/delete_chat_admin_invite_links.py b/pyrogram/methods/invite_links/delete_chat_admin_invite_links.py index 32ef1de5..fc9e71f7 100644 --- a/pyrogram/methods/invite_links/delete_chat_admin_invite_links.py +++ b/pyrogram/methods/invite_links/delete_chat_admin_invite_links.py @@ -36,11 +36,13 @@ class DeleteChatAdminInviteLinks: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). admin_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. For you yourself you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). Returns: ``bool``: On success ``True`` is returned. diff --git a/pyrogram/methods/invite_links/delete_chat_invite_link.py b/pyrogram/methods/invite_links/delete_chat_invite_link.py index 82db623a..8421a4da 100644 --- a/pyrogram/methods/invite_links/delete_chat_invite_link.py +++ b/pyrogram/methods/invite_links/delete_chat_invite_link.py @@ -36,6 +36,7 @@ class DeleteChatInviteLink: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (``str``): The revoked invite link to delete. diff --git a/pyrogram/methods/invite_links/edit_chat_invite_link.py b/pyrogram/methods/invite_links/edit_chat_invite_link.py index 553c25dd..a29995e4 100644 --- a/pyrogram/methods/invite_links/edit_chat_invite_link.py +++ b/pyrogram/methods/invite_links/edit_chat_invite_link.py @@ -44,6 +44,7 @@ class EditChatInviteLink: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (``str``): The invite link to edit diff --git a/pyrogram/methods/invite_links/export_chat_invite_link.py b/pyrogram/methods/invite_links/export_chat_invite_link.py index f06caf0f..8c6badb0 100644 --- a/pyrogram/methods/invite_links/export_chat_invite_link.py +++ b/pyrogram/methods/invite_links/export_chat_invite_link.py @@ -45,6 +45,7 @@ class ExportChatInviteLink: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). Returns: ``str``: On success, the new invite link as string is returned. diff --git a/pyrogram/methods/invite_links/get_chat_admin_invite_links.py b/pyrogram/methods/invite_links/get_chat_admin_invite_links.py index 62acca10..921042b2 100644 --- a/pyrogram/methods/invite_links/get_chat_admin_invite_links.py +++ b/pyrogram/methods/invite_links/get_chat_admin_invite_links.py @@ -44,11 +44,13 @@ class GetChatAdminInviteLinks: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). admin_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. For you yourself you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). revoked (``bool``, *optional*): True, if you want to get revoked links instead. diff --git a/pyrogram/methods/invite_links/get_chat_admin_invite_links_count.py b/pyrogram/methods/invite_links/get_chat_admin_invite_links_count.py index 528876ed..9c4b175c 100644 --- a/pyrogram/methods/invite_links/get_chat_admin_invite_links_count.py +++ b/pyrogram/methods/invite_links/get_chat_admin_invite_links_count.py @@ -37,11 +37,13 @@ class GetChatAdminInviteLinksCount: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). admin_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. For you yourself you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). revoked (``bool``, *optional*): True, if you want to get revoked links instead. diff --git a/pyrogram/methods/invite_links/get_chat_admins_with_invite_links.py b/pyrogram/methods/invite_links/get_chat_admins_with_invite_links.py index f283e534..1c16119c 100644 --- a/pyrogram/methods/invite_links/get_chat_admins_with_invite_links.py +++ b/pyrogram/methods/invite_links/get_chat_admins_with_invite_links.py @@ -37,6 +37,7 @@ class GetChatAdminsWithInviteLinks: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). Returns: List of :obj:`~pyrogram.types.ChatAdminWithInviteLink`: On success, the list of admins that have exported diff --git a/pyrogram/methods/invite_links/get_chat_invite_link.py b/pyrogram/methods/invite_links/get_chat_invite_link.py index 8ad575f3..2867f226 100644 --- a/pyrogram/methods/invite_links/get_chat_invite_link.py +++ b/pyrogram/methods/invite_links/get_chat_invite_link.py @@ -37,6 +37,7 @@ class GetChatInviteLink: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (str): The invite link. diff --git a/pyrogram/methods/invite_links/get_chat_invite_link_joiners.py b/pyrogram/methods/invite_links/get_chat_invite_link_joiners.py index c1fc43a7..9bc0e54a 100644 --- a/pyrogram/methods/invite_links/get_chat_invite_link_joiners.py +++ b/pyrogram/methods/invite_links/get_chat_invite_link_joiners.py @@ -38,6 +38,7 @@ class GetChatInviteLinkJoiners: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (str): The invite link. diff --git a/pyrogram/methods/invite_links/get_chat_invite_link_joiners_count.py b/pyrogram/methods/invite_links/get_chat_invite_link_joiners_count.py index c591be19..cb032ef4 100644 --- a/pyrogram/methods/invite_links/get_chat_invite_link_joiners_count.py +++ b/pyrogram/methods/invite_links/get_chat_invite_link_joiners_count.py @@ -36,6 +36,7 @@ class GetChatInviteLinkJoinersCount: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (str): The invite link. diff --git a/pyrogram/methods/invite_links/get_chat_join_requests.py b/pyrogram/methods/invite_links/get_chat_join_requests.py index a75498e2..20a20fb1 100644 --- a/pyrogram/methods/invite_links/get_chat_join_requests.py +++ b/pyrogram/methods/invite_links/get_chat_join_requests.py @@ -38,6 +38,7 @@ class GetChatJoinRequests: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). limit (``int``, *optional*): Limits the number of invite links to be retrieved. diff --git a/pyrogram/methods/invite_links/revoke_chat_invite_link.py b/pyrogram/methods/invite_links/revoke_chat_invite_link.py index ff55a04e..144c5a38 100644 --- a/pyrogram/methods/invite_links/revoke_chat_invite_link.py +++ b/pyrogram/methods/invite_links/revoke_chat_invite_link.py @@ -41,6 +41,7 @@ class RevokeChatInviteLink: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). + You can also use chat public link in form of *t.me/* (str). invite_link (``str``): The invite link to revoke. diff --git a/pyrogram/methods/messages/copy_media_group.py b/pyrogram/methods/messages/copy_media_group.py index e0a63df1..b0e14afe 100644 --- a/pyrogram/methods/messages/copy_media_group.py +++ b/pyrogram/methods/messages/copy_media_group.py @@ -49,11 +49,13 @@ class CopyMediaGroup: 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). + You can also use chat public link in form of *t.me/* (str). from_chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the source chat where the original media group 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message identifier in the chat specified in *from_chat_id*. diff --git a/pyrogram/methods/messages/copy_message.py b/pyrogram/methods/messages/copy_message.py index 55f18b33..8629d095 100644 --- a/pyrogram/methods/messages/copy_message.py +++ b/pyrogram/methods/messages/copy_message.py @@ -61,11 +61,13 @@ class CopyMessage: 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). + You can also use chat public link in form of *t.me/* (str). from_chat_id (``int`` | ``str``): 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message identifier in the chat specified in *from_chat_id*. diff --git a/pyrogram/methods/messages/delete_messages.py b/pyrogram/methods/messages/delete_messages.py index 07c3a7b8..91859e82 100644 --- a/pyrogram/methods/messages/delete_messages.py +++ b/pyrogram/methods/messages/delete_messages.py @@ -38,6 +38,7 @@ class DeleteMessages: 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). + You can also use chat public link in form of *t.me/* (str). message_ids (``int`` | Iterable of ``int``): An iterable of message identifiers to delete (integers) or a single message id. diff --git a/pyrogram/methods/messages/edit_message_caption.py b/pyrogram/methods/messages/edit_message_caption.py index 2e4a45a6..4fc4bfdb 100644 --- a/pyrogram/methods/messages/edit_message_caption.py +++ b/pyrogram/methods/messages/edit_message_caption.py @@ -41,6 +41,7 @@ class EditMessageCaption: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message identifier in the chat specified in chat_id. diff --git a/pyrogram/methods/messages/edit_message_media.py b/pyrogram/methods/messages/edit_message_media.py index 5a34f138..2ab0a5c9 100644 --- a/pyrogram/methods/messages/edit_message_media.py +++ b/pyrogram/methods/messages/edit_message_media.py @@ -49,6 +49,7 @@ class EditMessageMedia: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message identifier in the chat specified in chat_id. diff --git a/pyrogram/methods/messages/edit_message_reply_markup.py b/pyrogram/methods/messages/edit_message_reply_markup.py index 1cd75c1a..68b568be 100644 --- a/pyrogram/methods/messages/edit_message_reply_markup.py +++ b/pyrogram/methods/messages/edit_message_reply_markup.py @@ -39,6 +39,7 @@ class EditMessageReplyMarkup: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message identifier in the chat specified in chat_id. diff --git a/pyrogram/methods/messages/edit_message_text.py b/pyrogram/methods/messages/edit_message_text.py index 540b6aa6..c1e0df09 100644 --- a/pyrogram/methods/messages/edit_message_text.py +++ b/pyrogram/methods/messages/edit_message_text.py @@ -44,6 +44,7 @@ class EditMessageText: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message identifier in the chat specified in chat_id. diff --git a/pyrogram/methods/messages/forward_messages.py b/pyrogram/methods/messages/forward_messages.py index cdf6b95f..f47e8578 100644 --- a/pyrogram/methods/messages/forward_messages.py +++ b/pyrogram/methods/messages/forward_messages.py @@ -46,11 +46,13 @@ class ForwardMessages: 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). + You can also use chat public link in form of *t.me/* (str). from_chat_id (``int`` | ``str``): 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). + You can also use chat public link in form of *t.me/* (str). message_ids (``int`` | Iterable of ``int``): An iterable of message identifiers in the chat specified in *from_chat_id* or a single message id. diff --git a/pyrogram/methods/messages/get_chat_history.py b/pyrogram/methods/messages/get_chat_history.py index 99445c19..fff96c7c 100644 --- a/pyrogram/methods/messages/get_chat_history.py +++ b/pyrogram/methods/messages/get_chat_history.py @@ -74,6 +74,7 @@ class GetChatHistory: 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). + You can also use chat public link in form of *t.me/* (str). limit (``int``, *optional*): Limits the number of messages to be retrieved. diff --git a/pyrogram/methods/messages/get_chat_history_count.py b/pyrogram/methods/messages/get_chat_history_count.py index 1926224b..0982f288 100644 --- a/pyrogram/methods/messages/get_chat_history_count.py +++ b/pyrogram/methods/messages/get_chat_history_count.py @@ -43,6 +43,7 @@ class GetChatHistoryCount: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). Returns: ``int``: On success, the chat history count is returned. diff --git a/pyrogram/methods/messages/get_discussion_message.py b/pyrogram/methods/messages/get_discussion_message.py index 58a6b704..76ceff98 100644 --- a/pyrogram/methods/messages/get_discussion_message.py +++ b/pyrogram/methods/messages/get_discussion_message.py @@ -39,6 +39,7 @@ class GetDiscussionMessage: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message id. diff --git a/pyrogram/methods/messages/get_discussion_replies.py b/pyrogram/methods/messages/get_discussion_replies.py index dd23751b..5ee8667f 100644 --- a/pyrogram/methods/messages/get_discussion_replies.py +++ b/pyrogram/methods/messages/get_discussion_replies.py @@ -36,6 +36,7 @@ class GetDiscussionReplies: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message id. diff --git a/pyrogram/methods/messages/get_discussion_replies_count.py b/pyrogram/methods/messages/get_discussion_replies_count.py index bbb90ac3..d035017e 100644 --- a/pyrogram/methods/messages/get_discussion_replies_count.py +++ b/pyrogram/methods/messages/get_discussion_replies_count.py @@ -35,6 +35,7 @@ class GetDiscussionRepliesCount: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Message id. diff --git a/pyrogram/methods/messages/get_media_group.py b/pyrogram/methods/messages/get_media_group.py index 97770d90..7a332c3d 100644 --- a/pyrogram/methods/messages/get_media_group.py +++ b/pyrogram/methods/messages/get_media_group.py @@ -40,6 +40,7 @@ class GetMediaGroup: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): The id of one of the messages that belong to the media group. diff --git a/pyrogram/methods/messages/get_messages.py b/pyrogram/methods/messages/get_messages.py index 3f398c36..aff7a34b 100644 --- a/pyrogram/methods/messages/get_messages.py +++ b/pyrogram/methods/messages/get_messages.py @@ -49,6 +49,7 @@ class GetMessages: 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). + You can also use chat public link in form of *t.me/* (str). message_ids (``int`` | Iterable of ``int``, *optional*): Pass a single message identifier or an iterable of message ids (as integers) to get the content of the diff --git a/pyrogram/methods/messages/read_chat_history.py b/pyrogram/methods/messages/read_chat_history.py index 4b962739..9688a86d 100644 --- a/pyrogram/methods/messages/read_chat_history.py +++ b/pyrogram/methods/messages/read_chat_history.py @@ -37,6 +37,7 @@ class ReadChatHistory: 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). + You can also use chat public link in form of *t.me/* (str). max_id (``int``, *optional*): The id of the last message you want to mark as read; all the messages before this one will be marked as diff --git a/pyrogram/methods/messages/retract_vote.py b/pyrogram/methods/messages/retract_vote.py index c456f4d0..9baa552b 100644 --- a/pyrogram/methods/messages/retract_vote.py +++ b/pyrogram/methods/messages/retract_vote.py @@ -38,6 +38,7 @@ class RetractVote: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Identifier of the original message with the poll. diff --git a/pyrogram/methods/messages/search_messages.py b/pyrogram/methods/messages/search_messages.py index 4497ff1c..40dbb4e4 100644 --- a/pyrogram/methods/messages/search_messages.py +++ b/pyrogram/methods/messages/search_messages.py @@ -79,6 +79,7 @@ class SearchMessages: 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). + You can also use chat public link in form of *t.me/* (str). query (``str``, *optional*): Text query string. diff --git a/pyrogram/methods/messages/search_messages_count.py b/pyrogram/methods/messages/search_messages_count.py index ea9ae4d1..fa9227e2 100644 --- a/pyrogram/methods/messages/search_messages_count.py +++ b/pyrogram/methods/messages/search_messages_count.py @@ -41,6 +41,7 @@ class SearchMessagesCount: 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). + You can also use chat public link in form of *t.me/* (str). query (``str``, *optional*): Text query string. diff --git a/pyrogram/methods/messages/send_animation.py b/pyrogram/methods/messages/send_animation.py index 516e7448..2276f4e1 100644 --- a/pyrogram/methods/messages/send_animation.py +++ b/pyrogram/methods/messages/send_animation.py @@ -73,6 +73,7 @@ class SendAnimation: 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). + You can also use chat public link in form of *t.me/* (str). animation (``str`` | ``BinaryIO``): Animation to send. @@ -134,6 +135,7 @@ class SendAnimation: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_audio.py b/pyrogram/methods/messages/send_audio.py index 00e07447..9b2a9b64 100644 --- a/pyrogram/methods/messages/send_audio.py +++ b/pyrogram/methods/messages/send_audio.py @@ -73,6 +73,7 @@ class SendAudio: 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). + You can also use chat public link in form of *t.me/* (str). audio (``str`` | ``BinaryIO``): Audio file to send. @@ -127,6 +128,7 @@ class SendAudio: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_cached_media.py b/pyrogram/methods/messages/send_cached_media.py index 8cc3761c..9361ed32 100644 --- a/pyrogram/methods/messages/send_cached_media.py +++ b/pyrogram/methods/messages/send_cached_media.py @@ -64,6 +64,7 @@ class SendCachedMedia: 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). + You can also use chat public link in form of *t.me/* (str). file_id (``str``): Media to send. @@ -99,6 +100,7 @@ class SendCachedMedia: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_chat_action.py b/pyrogram/methods/messages/send_chat_action.py index 58f9616b..57ebdd51 100644 --- a/pyrogram/methods/messages/send_chat_action.py +++ b/pyrogram/methods/messages/send_chat_action.py @@ -39,6 +39,7 @@ class SendChatAction: 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). + You can also use chat public link in form of *t.me/* (str). action (:obj:`~pyrogram.enums.ChatAction`): Type of action to broadcast. diff --git a/pyrogram/methods/messages/send_contact.py b/pyrogram/methods/messages/send_contact.py index 58af7e75..883a6e41 100644 --- a/pyrogram/methods/messages/send_contact.py +++ b/pyrogram/methods/messages/send_contact.py @@ -58,6 +58,7 @@ class SendContact: 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). + You can also use chat public link in form of *t.me/* (str). phone_number (``str``): Contact's phone number. @@ -85,6 +86,7 @@ class SendContact: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_dice.py b/pyrogram/methods/messages/send_dice.py index 894dc746..b852af60 100644 --- a/pyrogram/methods/messages/send_dice.py +++ b/pyrogram/methods/messages/send_dice.py @@ -56,6 +56,7 @@ class SendDice: 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). + You can also use chat public link in form of *t.me/* (str). emoji (``str``, *optional*): Emoji on which the dice throw animation is based. @@ -81,6 +82,7 @@ class SendDice: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_document.py b/pyrogram/methods/messages/send_document.py index c89547e2..41bd2728 100644 --- a/pyrogram/methods/messages/send_document.py +++ b/pyrogram/methods/messages/send_document.py @@ -69,6 +69,7 @@ class SendDocument: 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). + You can also use chat public link in form of *t.me/* (str). document (``str`` | ``BinaryIO``): File to send. @@ -119,6 +120,7 @@ class SendDocument: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_location.py b/pyrogram/methods/messages/send_location.py index 77b9dacd..0465f235 100644 --- a/pyrogram/methods/messages/send_location.py +++ b/pyrogram/methods/messages/send_location.py @@ -56,6 +56,7 @@ class SendLocation: 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). + You can also use chat public link in form of *t.me/* (str). latitude (``float``): Latitude of the location. @@ -74,6 +75,7 @@ class SendLocation: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). reply_to_message_id (``int``, *optional*): If the message is a reply, ID of the original message diff --git a/pyrogram/methods/messages/send_media_group.py b/pyrogram/methods/messages/send_media_group.py index 914fc066..2a34aea2 100644 --- a/pyrogram/methods/messages/send_media_group.py +++ b/pyrogram/methods/messages/send_media_group.py @@ -66,6 +66,7 @@ class SendMediaGroup: 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). + You can also use chat public link in form of *t.me/* (str). media (List of :obj:`~pyrogram.types.InputMediaPhoto`, :obj:`~pyrogram.types.InputMediaVideo`, :obj:`~pyrogram.types.InputMediaAudio`, :obj:`~pyrogram.types.InputMediaDocument` and :obj:`~pyrogram.types.InputMediaAnimation`): A list describing photos and videos to be sent, must include 2–10 items. @@ -87,6 +88,7 @@ class SendMediaGroup: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_message.py b/pyrogram/methods/messages/send_message.py index 3e0874a6..039deec8 100644 --- a/pyrogram/methods/messages/send_message.py +++ b/pyrogram/methods/messages/send_message.py @@ -59,6 +59,7 @@ class SendMessage: 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). + You can also use chat public link in form of *t.me/* (str). text (``str``): Text of the message to be sent. @@ -90,6 +91,7 @@ class SendMessage: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_photo.py b/pyrogram/methods/messages/send_photo.py index 710e4d28..a2b18b4f 100644 --- a/pyrogram/methods/messages/send_photo.py +++ b/pyrogram/methods/messages/send_photo.py @@ -67,6 +67,7 @@ class SendPhoto: 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). + You can also use chat public link in form of *t.me/* (str). photo (``str`` | ``BinaryIO``): Photo to send. @@ -110,6 +111,7 @@ class SendPhoto: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_poll.py b/pyrogram/methods/messages/send_poll.py index 5e1fd5e7..bceb8a8b 100644 --- a/pyrogram/methods/messages/send_poll.py +++ b/pyrogram/methods/messages/send_poll.py @@ -66,6 +66,7 @@ class SendPoll: 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). + You can also use chat public link in form of *t.me/* (str). question (``str``): Poll question, 1-255 characters. @@ -130,6 +131,7 @@ class SendPoll: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_reaction.py b/pyrogram/methods/messages/send_reaction.py index 2b034aeb..180763f2 100644 --- a/pyrogram/methods/messages/send_reaction.py +++ b/pyrogram/methods/messages/send_reaction.py @@ -39,6 +39,7 @@ class SendReaction: Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. + You can also use chat public link in form of *t.me/* (str). message_id (``int``, *optional*): Identifier of the message. diff --git a/pyrogram/methods/messages/send_sticker.py b/pyrogram/methods/messages/send_sticker.py index db2d0612..25bc8a7d 100644 --- a/pyrogram/methods/messages/send_sticker.py +++ b/pyrogram/methods/messages/send_sticker.py @@ -65,6 +65,7 @@ class SendSticker: 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). + You can also use chat public link in form of *t.me/* (str). sticker (``str`` | ``BinaryIO``): Sticker to send. @@ -90,6 +91,7 @@ class SendSticker: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_venue.py b/pyrogram/methods/messages/send_venue.py index 6a544e1d..5d6d6186 100644 --- a/pyrogram/methods/messages/send_venue.py +++ b/pyrogram/methods/messages/send_venue.py @@ -60,6 +60,7 @@ class SendVenue: 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). + You can also use chat public link in form of *t.me/* (str). latitude (``float``): Latitude of the venue. @@ -94,6 +95,7 @@ class SendVenue: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_video.py b/pyrogram/methods/messages/send_video.py index 9a32a792..43fafa4f 100644 --- a/pyrogram/methods/messages/send_video.py +++ b/pyrogram/methods/messages/send_video.py @@ -74,6 +74,7 @@ class SendVideo: 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). + You can also use chat public link in form of *t.me/* (str). video (``str`` | ``BinaryIO``): Video to send. @@ -140,6 +141,7 @@ class SendVideo: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_video_note.py b/pyrogram/methods/messages/send_video_note.py index fc7684c9..2f65bf27 100644 --- a/pyrogram/methods/messages/send_video_note.py +++ b/pyrogram/methods/messages/send_video_note.py @@ -67,6 +67,7 @@ class SendVideoNote: 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). + You can also use chat public link in form of *t.me/* (str). video_note (``str`` | ``BinaryIO``): Video note to send. @@ -104,6 +105,7 @@ class SendVideoNote: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_voice.py b/pyrogram/methods/messages/send_voice.py index 875452e3..d300cc2e 100644 --- a/pyrogram/methods/messages/send_voice.py +++ b/pyrogram/methods/messages/send_voice.py @@ -67,6 +67,7 @@ class SendVoice: 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). + You can also use chat public link in form of *t.me/* (str). voice (``str`` | ``BinaryIO``): Audio file to send. @@ -108,6 +109,7 @@ class SendVoice: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/send_web_page.py b/pyrogram/methods/messages/send_web_page.py index 4dbbe4ce..5a9aec9f 100644 --- a/pyrogram/methods/messages/send_web_page.py +++ b/pyrogram/methods/messages/send_web_page.py @@ -59,6 +59,7 @@ class SendWebPage: 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). + You can also use chat public link in form of *t.me/* (str). url (``str``): Link that will be previewed. @@ -96,6 +97,7 @@ class SendWebPage: reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. diff --git a/pyrogram/methods/messages/stop_poll.py b/pyrogram/methods/messages/stop_poll.py index 89a33434..c809be34 100644 --- a/pyrogram/methods/messages/stop_poll.py +++ b/pyrogram/methods/messages/stop_poll.py @@ -41,6 +41,7 @@ class StopPoll: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Identifier of the original message with the poll. diff --git a/pyrogram/methods/messages/vote_poll.py b/pyrogram/methods/messages/vote_poll.py index 620fac5a..76b00d34 100644 --- a/pyrogram/methods/messages/vote_poll.py +++ b/pyrogram/methods/messages/vote_poll.py @@ -39,6 +39,7 @@ class VotePoll: 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). + You can also use chat public link in form of *t.me/* (str). message_id (``int``): Identifier of the original message with the poll. diff --git a/pyrogram/methods/users/block_user.py b/pyrogram/methods/users/block_user.py index 25cd0ce8..6782ada8 100644 --- a/pyrogram/methods/users/block_user.py +++ b/pyrogram/methods/users/block_user.py @@ -36,6 +36,7 @@ class BlockUser: Unique identifier (int) or username (str) of the target user. For you yourself you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). Returns: ``bool``: True on success diff --git a/pyrogram/methods/users/delete_stories.py b/pyrogram/methods/users/delete_stories.py index 3a061ba9..2b2898d0 100644 --- a/pyrogram/methods/users/delete_stories.py +++ b/pyrogram/methods/users/delete_stories.py @@ -42,6 +42,7 @@ class DeleteStories: chat_id (``int``, *optional*): Unique identifier (int) or username (str) of the target channel. + You can also use channel public link in form of *t.me/* (str). Returns: `bool`: On success, a True is returned. diff --git a/pyrogram/methods/users/edit_story.py b/pyrogram/methods/users/edit_story.py index 9939263c..8b78025b 100644 --- a/pyrogram/methods/users/edit_story.py +++ b/pyrogram/methods/users/edit_story.py @@ -55,6 +55,7 @@ class EditStory: chat_id (``int``, *optional*): Unique identifier (int) of the target channel. + You can also use channel public link in form of *t.me/* (str). animation (``str`` | ``BinaryIO``, *optional*): New story Animation. diff --git a/pyrogram/methods/users/export_story_link.py b/pyrogram/methods/users/export_story_link.py index f411150b..dec8e24c 100644 --- a/pyrogram/methods/users/export_story_link.py +++ b/pyrogram/methods/users/export_story_link.py @@ -40,6 +40,7 @@ class ExportStoryLink: Unique identifier (int) or username (str) of the target user/channel. For your personal story you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile/channel public link in form of *t.me/* (str). story_id (``int``): Pass a single story identifier of story (as integers). diff --git a/pyrogram/methods/users/forward_story.py b/pyrogram/methods/users/forward_story.py index ecb7d451..ab37bf64 100644 --- a/pyrogram/methods/users/forward_story.py +++ b/pyrogram/methods/users/forward_story.py @@ -51,6 +51,7 @@ class ForwardStory: Unique identifier (int) or username (str) of the target chat/user. For your personal story you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile/channel public link in form of *t.me/* (str). from_story_id (``int``): Unique identifier of original story. @@ -58,6 +59,7 @@ class ForwardStory: chat_id (``int`` | ``str``, *optional*): Unique identifier (int) or username (str) of the target channel. If you want to forward story to a channel. + You can also use channel public link in form of *t.me/* (str). privacy (:obj:`~pyrogram.enums.StoriesPrivacyRules`, *optional*): Story privacy. diff --git a/pyrogram/methods/users/get_chat_photos.py b/pyrogram/methods/users/get_chat_photos.py index d22c68dc..94552b27 100644 --- a/pyrogram/methods/users/get_chat_photos.py +++ b/pyrogram/methods/users/get_chat_photos.py @@ -37,6 +37,7 @@ class GetChatPhotos: 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). + You can also use user profile/chat public link in form of *t.me/* (str). limit (``int``, *optional*): Limits the number of profile photos to be retrieved. diff --git a/pyrogram/methods/users/get_chat_photos_count.py b/pyrogram/methods/users/get_chat_photos_count.py index d4cf1594..74d0081c 100644 --- a/pyrogram/methods/users/get_chat_photos_count.py +++ b/pyrogram/methods/users/get_chat_photos_count.py @@ -36,6 +36,7 @@ class GetChatPhotosCount: 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). + You can also use user profile/chat public link in form of *t.me/* (str). Returns: ``int``: On success, the user profile photos count is returned. diff --git a/pyrogram/methods/users/get_common_chats.py b/pyrogram/methods/users/get_common_chats.py index 31e2bac3..b4cba4fd 100644 --- a/pyrogram/methods/users/get_common_chats.py +++ b/pyrogram/methods/users/get_common_chats.py @@ -37,6 +37,7 @@ class GetCommonChats: 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). + You can also use user profile link in form of *t.me/* (str). Returns: List of :obj:`~pyrogram.types.Chat`: On success, a list of the common chats is returned. diff --git a/pyrogram/methods/users/get_peer_stories.py b/pyrogram/methods/users/get_peer_stories.py index 72ad9ef7..939ca812 100644 --- a/pyrogram/methods/users/get_peer_stories.py +++ b/pyrogram/methods/users/get_peer_stories.py @@ -39,6 +39,7 @@ class GetPeerStories: Unique identifier (int) or username (str) of the target user/channel. For your personal story you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile/channel public link in form of *t.me/* (str). Returns: ``Generator``: On success, a generator yielding :obj:`~pyrogram.types.Story` objects is returned. diff --git a/pyrogram/methods/users/get_stories.py b/pyrogram/methods/users/get_stories.py index 18965cdc..97ea8a6d 100644 --- a/pyrogram/methods/users/get_stories.py +++ b/pyrogram/methods/users/get_stories.py @@ -40,6 +40,7 @@ class GetStories: Unique identifier (int) or username (str) of the target user/channel. For your personal story you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile/channel public link in form of *t.me/* (str). story_ids (``int`` | Iterable of ``int``, *optional*): Pass a single story identifier or an iterable of story ids (as integers) to get the content of the diff --git a/pyrogram/methods/users/get_stories_history.py b/pyrogram/methods/users/get_stories_history.py index 6a07e2c9..a89b1845 100644 --- a/pyrogram/methods/users/get_stories_history.py +++ b/pyrogram/methods/users/get_stories_history.py @@ -39,6 +39,7 @@ class GetUserStoriesHistory: Parameters: chat_id (``int``, *optional*): Unique identifier (int) of the target channel. + You can also use user profile/channel public link in form of *t.me/* (str). limit (``int``, *optional*): Limits the number of stories to be retrieved. diff --git a/pyrogram/methods/users/get_users.py b/pyrogram/methods/users/get_users.py index 39821a8c..3f11df34 100644 --- a/pyrogram/methods/users/get_users.py +++ b/pyrogram/methods/users/get_users.py @@ -38,6 +38,7 @@ class GetUsers: user_ids (``int`` | ``str`` | Iterable of ``int`` or ``str``): A list of User identifiers (id or username) or a single user id/username. For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). Returns: :obj:`~pyrogram.types.User` | List of :obj:`~pyrogram.types.User`: In case *user_ids* was not a list, diff --git a/pyrogram/methods/users/send_story.py b/pyrogram/methods/users/send_story.py index ec5dbe64..ae4fb4be 100644 --- a/pyrogram/methods/users/send_story.py +++ b/pyrogram/methods/users/send_story.py @@ -58,6 +58,7 @@ class SendStory: Parameters: chat_id (``int`` | ``str``, *optional*): Unique identifier (int) or username (str) of the target channel. + You can also use channel public link in form of *t.me/* (str). animation (``str`` | ``BinaryIO``, *optional*): Animation to send. diff --git a/pyrogram/methods/users/unblock_user.py b/pyrogram/methods/users/unblock_user.py index db4fdddc..df28cb24 100644 --- a/pyrogram/methods/users/unblock_user.py +++ b/pyrogram/methods/users/unblock_user.py @@ -36,6 +36,7 @@ class UnblockUser: Unique identifier (int) or username (str) of the target user. For you yourself you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). + You can also use user profile link in form of *t.me/* (str). Returns: ``bool``: True on success diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index e44e671d..4f71b24a 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -1245,6 +1245,7 @@ class Message(Object, Update): reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. @@ -1407,6 +1408,7 @@ class Message(Object, Update): reply_to_chat_id (``int`` | ``str``, *optional*): Unique identifier for the origin chat. for reply to message from another chat. + You can also use chat public link in form of *t.me/* (str). quote_text (``str``, *optional*): Text to quote. @@ -3919,6 +3921,7 @@ class Message(Object, Update): 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). + You can also use chat public link in form of *t.me/* (str). message_thread_id (``int``, *optional*): Unique identifier of a message thread to which the message belongs; for supergroups only @@ -3996,6 +3999,7 @@ class Message(Object, Update): 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). + You can also use chat public link in form of *t.me/* (str). caption (``string``, *optional*): New caption for media, 0-1024 characters after entities parsing.