diff --git a/pyrogram/methods/advanced/invoke.py b/pyrogram/methods/advanced/invoke.py index 9ae25d00..0af771ad 100644 --- a/pyrogram/methods/advanced/invoke.py +++ b/pyrogram/methods/advanced/invoke.py @@ -46,6 +46,8 @@ class Invoke: :obj:`functions ` (i.e: a Telegram API method you wish to use which is not available yet in the Client class as an easy-to-use method). + .. include:: /_includes/usable-by/users-bots.rst + Parameters: query (``RawFunction``): The API Schema function filled with proper arguments. diff --git a/pyrogram/methods/advanced/resolve_peer.py b/pyrogram/methods/advanced/resolve_peer.py index 80fe7975..ebb8ff44 100644 --- a/pyrogram/methods/advanced/resolve_peer.py +++ b/pyrogram/methods/advanced/resolve_peer.py @@ -42,6 +42,8 @@ class ResolvePeer: :obj:`functions ` (i.e: a Telegram API method you wish to use which is not available yet in the Client class as an easy-to-use method). + .. include:: /_includes/usable-by/users-bots.rst + Parameters: peer_id (``int`` | ``str``): The peer id you want to extract the InputPeer from. diff --git a/pyrogram/methods/advanced/save_file.py b/pyrogram/methods/advanced/save_file.py index 6a43deac..c7f3a953 100644 --- a/pyrogram/methods/advanced/save_file.py +++ b/pyrogram/methods/advanced/save_file.py @@ -53,6 +53,8 @@ class SaveFile: :obj:`functions ` (i.e: a Telegram API method you wish to use which is not available yet in the Client class as an easy-to-use method). + .. include:: /_includes/usable-by/users-bots.rst + Parameters: path (``str`` | ``BinaryIO``): The path of the file you want to upload that exists on your local machine or a binary file-like object diff --git a/pyrogram/methods/auth/accept_terms_of_service.py b/pyrogram/methods/auth/accept_terms_of_service.py index 3bc5fbad..cc1fcf54 100644 --- a/pyrogram/methods/auth/accept_terms_of_service.py +++ b/pyrogram/methods/auth/accept_terms_of_service.py @@ -27,6 +27,8 @@ class AcceptTermsOfService: ) -> bool: """Accept the given terms of service. + .. include:: /_includes/usable-by/users.rst + Parameters: terms_of_service_id (``str``): The terms of service identifier. diff --git a/pyrogram/methods/auth/check_password.py b/pyrogram/methods/auth/check_password.py index 9d8b08ab..39aa82fc 100644 --- a/pyrogram/methods/auth/check_password.py +++ b/pyrogram/methods/auth/check_password.py @@ -33,6 +33,8 @@ class CheckPassword: ) -> "types.User": """Check your Two-Step Verification password and log in. + .. include:: /_includes/usable-by/users.rst + Parameters: password (``str``): Your Two-Step Verification password. diff --git a/pyrogram/methods/auth/get_password_hint.py b/pyrogram/methods/auth/get_password_hint.py index af655758..a57f7c80 100644 --- a/pyrogram/methods/auth/get_password_hint.py +++ b/pyrogram/methods/auth/get_password_hint.py @@ -30,6 +30,8 @@ class GetPasswordHint: ) -> str: """Get your Two-Step Verification password hint. + .. include:: /_includes/usable-by/users.rst + Returns: ``str``: On success, the password hint as string is returned. """ diff --git a/pyrogram/methods/auth/log_out.py b/pyrogram/methods/auth/log_out.py index b4a29f82..84b7db64 100644 --- a/pyrogram/methods/auth/log_out.py +++ b/pyrogram/methods/auth/log_out.py @@ -33,6 +33,8 @@ class LogOut: When you log out, the current client is stopped and the storage session deleted. No more API calls can be made until you start the client and re-authorize again. + .. include:: /_includes/usable-by/users-bots.rst + Returns: ``bool``: On success, True is returned. diff --git a/pyrogram/methods/auth/recover_password.py b/pyrogram/methods/auth/recover_password.py index 9f75a93f..0a347507 100644 --- a/pyrogram/methods/auth/recover_password.py +++ b/pyrogram/methods/auth/recover_password.py @@ -32,6 +32,8 @@ class RecoverPassword: ) -> "types.User": """Recover your password with a recovery code and log in. + .. include:: /_includes/usable-by/users.rst + Parameters: recovery_code (``str``): The recovery code sent via email. diff --git a/pyrogram/methods/auth/resend_code.py b/pyrogram/methods/auth/resend_code.py index 4210e04d..9644ac4f 100644 --- a/pyrogram/methods/auth/resend_code.py +++ b/pyrogram/methods/auth/resend_code.py @@ -36,6 +36,8 @@ class ResendCode: The type of the code to be re-sent is specified in the *next_type* attribute of the :obj:`~pyrogram.types.SentCode` object returned by :meth:`send_code`. + .. include:: /_includes/usable-by/users.rst + Parameters: phone_number (``str``): Phone number in international format (includes the country prefix). diff --git a/pyrogram/methods/auth/send_code.py b/pyrogram/methods/auth/send_code.py index 5f7f7091..92ffc999 100644 --- a/pyrogram/methods/auth/send_code.py +++ b/pyrogram/methods/auth/send_code.py @@ -34,6 +34,8 @@ class SendCode: ) -> "types.SentCode": """Send the confirmation code to the given phone number. + .. include:: /_includes/usable-by/users.rst + Parameters: phone_number (``str``): Phone number in international format (includes the country prefix). diff --git a/pyrogram/methods/auth/send_recovery_code.py b/pyrogram/methods/auth/send_recovery_code.py index d1f23bf9..9a25f3c6 100644 --- a/pyrogram/methods/auth/send_recovery_code.py +++ b/pyrogram/methods/auth/send_recovery_code.py @@ -30,6 +30,8 @@ class SendRecoveryCode: ) -> str: """Send a code to your email to recover your password. + .. include:: /_includes/usable-by/users.rst + Returns: ``str``: On success, the hidden email pattern is returned and a recovery code is sent to that email. diff --git a/pyrogram/methods/auth/sign_in.py b/pyrogram/methods/auth/sign_in.py index c328c958..9d77f1cd 100644 --- a/pyrogram/methods/auth/sign_in.py +++ b/pyrogram/methods/auth/sign_in.py @@ -35,6 +35,8 @@ class SignIn: ) -> Union["types.User", "types.TermsOfService", bool]: """Authorize a user in Telegram with a valid confirmation code. + .. include:: /_includes/usable-by/users.rst + Parameters: phone_number (``str``): Phone number in international format (includes the country prefix). diff --git a/pyrogram/methods/auth/sign_in_bot.py b/pyrogram/methods/auth/sign_in_bot.py index dd322a8e..09a2f283 100644 --- a/pyrogram/methods/auth/sign_in_bot.py +++ b/pyrogram/methods/auth/sign_in_bot.py @@ -34,6 +34,8 @@ class SignInBot: ) -> "types.User": """Authorize a bot using its bot token generated by BotFather. + .. include:: /_includes/usable-by/bots.rst + Parameters: bot_token (``str``): The bot token generated by BotFather diff --git a/pyrogram/methods/auth/sign_up.py b/pyrogram/methods/auth/sign_up.py index 6700fee4..f09a779d 100644 --- a/pyrogram/methods/auth/sign_up.py +++ b/pyrogram/methods/auth/sign_up.py @@ -35,6 +35,8 @@ class SignUp: ) -> "types.User": """Register a new user in Telegram. + .. include:: /_includes/usable-by/users.rst + Parameters: phone_number (``str``): Phone number in international format (includes the country prefix). diff --git a/pyrogram/methods/bots/answer_callback_query.py b/pyrogram/methods/bots/answer_callback_query.py index 95d47931..a6d8747c 100644 --- a/pyrogram/methods/bots/answer_callback_query.py +++ b/pyrogram/methods/bots/answer_callback_query.py @@ -32,6 +32,8 @@ class AnswerCallbackQuery: """Send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. + .. include:: /_includes/usable-by/bots.rst + Parameters: callback_query_id (``str``): Unique identifier for the query to be answered. diff --git a/pyrogram/methods/bots/answer_inline_query.py b/pyrogram/methods/bots/answer_inline_query.py index e9acd937..c3a450a0 100644 --- a/pyrogram/methods/bots/answer_inline_query.py +++ b/pyrogram/methods/bots/answer_inline_query.py @@ -39,6 +39,8 @@ class AnswerInlineQuery: A maximum of 50 results per query is allowed. + .. include:: /_includes/usable-by/bots.rst + Parameters: inline_query_id (``str``): Unique identifier for the answered query. diff --git a/pyrogram/methods/bots/answer_web_app_query.py b/pyrogram/methods/bots/answer_web_app_query.py index f887e280..74f56079 100644 --- a/pyrogram/methods/bots/answer_web_app_query.py +++ b/pyrogram/methods/bots/answer_web_app_query.py @@ -30,6 +30,8 @@ class AnswerWebAppQuery: """Set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. + .. include:: /_includes/usable-by/bots.rst + Parameters: web_app_query_id (``str``): Unique identifier for the answered query. diff --git a/pyrogram/methods/bots/delete_bot_commands.py b/pyrogram/methods/bots/delete_bot_commands.py index 2e638aed..e8173d32 100644 --- a/pyrogram/methods/bots/delete_bot_commands.py +++ b/pyrogram/methods/bots/delete_bot_commands.py @@ -32,6 +32,8 @@ class DeleteBotCommands: The commands passed will overwrite any command set previously. This method can be used by the own bot only. + .. include:: /_includes/usable-by/bots.rst + Parameters: scope (:obj:`~pyrogram.types.BotCommandScope`, *optional*): An object describing the scope of users for which the commands are relevant. diff --git a/pyrogram/methods/bots/get_bot_commands.py b/pyrogram/methods/bots/get_bot_commands.py index f62b6375..78deff30 100644 --- a/pyrogram/methods/bots/get_bot_commands.py +++ b/pyrogram/methods/bots/get_bot_commands.py @@ -34,6 +34,8 @@ class GetBotCommands: The commands passed will overwrite any command set previously. This method can be used by the own bot only. + .. include:: /_includes/usable-by/bots.rst + Parameters: scope (:obj:`~pyrogram.types.BotCommandScope`, *optional*): An object describing the scope of users for which the commands are relevant. diff --git a/pyrogram/methods/bots/get_bot_default_privileges.py b/pyrogram/methods/bots/get_bot_default_privileges.py index e1f70fa1..217d9b43 100644 --- a/pyrogram/methods/bots/get_bot_default_privileges.py +++ b/pyrogram/methods/bots/get_bot_default_privileges.py @@ -30,6 +30,8 @@ class GetBotDefaultPrivileges: ) -> Optional["types.ChatPrivileges"]: """Get the current default privileges of the bot. + .. include:: /_includes/usable-by/bots.rst + Parameters: for_channels (``bool``, *optional*): Pass True to get default privileges of the bot in channels. Otherwise, default privileges of the bot diff --git a/pyrogram/methods/bots/get_chat_menu_button.py b/pyrogram/methods/bots/get_chat_menu_button.py index 8fb61b01..9d143d58 100644 --- a/pyrogram/methods/bots/get_chat_menu_button.py +++ b/pyrogram/methods/bots/get_chat_menu_button.py @@ -30,6 +30,8 @@ class GetChatMenuButton: ) -> "types.MenuButton": """Get the current value of the bot's menu button in a private chat, or the default menu button. + .. include:: /_includes/usable-by/bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/bots/get_game_high_scores.py b/pyrogram/methods/bots/get_game_high_scores.py index 555e9af5..068ecab8 100644 --- a/pyrogram/methods/bots/get_game_high_scores.py +++ b/pyrogram/methods/bots/get_game_high_scores.py @@ -32,6 +32,8 @@ class GetGameHighScores: ) -> List["types.GameHighScore"]: """Get data for high score tables. + .. include:: /_includes/usable-by/bots.rst + Parameters: user_id (``int`` | ``str``): 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 3ef1d4de..7cb0aa12 100644 --- a/pyrogram/methods/bots/get_inline_bot_results.py +++ b/pyrogram/methods/bots/get_inline_bot_results.py @@ -35,6 +35,8 @@ class GetInlineBotResults: """Get bot results via inline queries. You can then send a result using :meth:`~pyrogram.Client.send_inline_bot_result` + .. include:: /_includes/usable-by/users.rst + Parameters: bot (``int`` | ``str``): Unique identifier of the inline bot you want to get results from. You can specify diff --git a/pyrogram/methods/bots/request_callback_answer.py b/pyrogram/methods/bots/request_callback_answer.py index 9c0626a5..22debcbe 100644 --- a/pyrogram/methods/bots/request_callback_answer.py +++ b/pyrogram/methods/bots/request_callback_answer.py @@ -33,6 +33,8 @@ class RequestCallbackAnswer: """Request a callback answer from bots. This is the equivalent of clicking an inline button containing callback data. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/bots/send_game.py b/pyrogram/methods/bots/send_game.py index e4181166..60155a6f 100644 --- a/pyrogram/methods/bots/send_game.py +++ b/pyrogram/methods/bots/send_game.py @@ -40,6 +40,8 @@ class SendGame: ) -> "types.Message": """Send a game. + .. include:: /_includes/usable-by/bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/bots/send_inline_bot_result.py b/pyrogram/methods/bots/send_inline_bot_result.py index ebe5ca8d..0f318806 100644 --- a/pyrogram/methods/bots/send_inline_bot_result.py +++ b/pyrogram/methods/bots/send_inline_bot_result.py @@ -34,6 +34,8 @@ class SendInlineBotResult: """Send an inline bot result. Bot results can be retrieved using :meth:`~pyrogram.Client.get_inline_bot_results` + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/bots/set_bot_commands.py b/pyrogram/methods/bots/set_bot_commands.py index 7dfbf109..f6f7e6c9 100644 --- a/pyrogram/methods/bots/set_bot_commands.py +++ b/pyrogram/methods/bots/set_bot_commands.py @@ -34,6 +34,8 @@ class SetBotCommands: The commands passed will overwrite any command set previously. This method can be used by the own bot only. + .. include:: /_includes/usable-by/bots.rst + Parameters: commands (List of :obj:`~pyrogram.types.BotCommand`): A list of bot commands. diff --git a/pyrogram/methods/bots/set_bot_default_privileges.py b/pyrogram/methods/bots/set_bot_default_privileges.py index 52e48026..2890ee1a 100644 --- a/pyrogram/methods/bots/set_bot_default_privileges.py +++ b/pyrogram/methods/bots/set_bot_default_privileges.py @@ -31,6 +31,8 @@ class SetBotDefaultPrivileges: These privileges will be suggested to users, but they are are free to modify the list before adding the bot. + .. include:: /_includes/usable-by/bots.rst + Parameters: privileges (:obj:`~pyrogram.types.ChatPrivileges`): New default privileges. None to clear. diff --git a/pyrogram/methods/bots/set_chat_menu_button.py b/pyrogram/methods/bots/set_chat_menu_button.py index 87e26c03..fa5af85c 100644 --- a/pyrogram/methods/bots/set_chat_menu_button.py +++ b/pyrogram/methods/bots/set_chat_menu_button.py @@ -31,6 +31,8 @@ class SetChatMenuButton: ) -> bool: """Change the bot's menu button in a private chat, or the default menu button. + .. include:: /_includes/usable-by/bots.rst + Parameters: chat_id (``int`` | ``str``, *optional*): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/bots/set_game_score.py b/pyrogram/methods/bots/set_game_score.py index f9008e44..b3b58b23 100644 --- a/pyrogram/methods/bots/set_game_score.py +++ b/pyrogram/methods/bots/set_game_score.py @@ -36,6 +36,8 @@ class SetGameScore: # inline_message_id: str = None): TODO Add inline_message_id """Set the score of the specified user in a game. + .. include:: /_includes/usable-by/bots.rst + Parameters: user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/add_chat_members.py b/pyrogram/methods/chats/add_chat_members.py index 2bf145f9..b560a6af 100644 --- a/pyrogram/methods/chats/add_chat_members.py +++ b/pyrogram/methods/chats/add_chat_members.py @@ -31,6 +31,8 @@ class AddChatMembers: ) -> bool: """Add new chat members to a group, supergroup or channel + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): The group, supergroup or channel id diff --git a/pyrogram/methods/chats/archive_chats.py b/pyrogram/methods/chats/archive_chats.py index 40544e0f..661b450c 100644 --- a/pyrogram/methods/chats/archive_chats.py +++ b/pyrogram/methods/chats/archive_chats.py @@ -29,6 +29,8 @@ class ArchiveChats: ) -> bool: """Archive one or more chats. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_ids (``int`` | ``str`` | List[``int``, ``str``]): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/ban_chat_member.py b/pyrogram/methods/chats/ban_chat_member.py index 16a13082..635c48b5 100644 --- a/pyrogram/methods/chats/ban_chat_member.py +++ b/pyrogram/methods/chats/ban_chat_member.py @@ -41,6 +41,8 @@ class BanChatMember: off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/create_channel.py b/pyrogram/methods/chats/create_channel.py index 2a149778..292fa97d 100644 --- a/pyrogram/methods/chats/create_channel.py +++ b/pyrogram/methods/chats/create_channel.py @@ -28,6 +28,8 @@ class CreateChannel: ) -> "types.Chat": """Create a new broadcast channel. + .. include:: /_includes/usable-by/users.rst + Parameters: title (``str``): The channel title. diff --git a/pyrogram/methods/chats/create_group.py b/pyrogram/methods/chats/create_group.py index a2ffa8de..027315de 100644 --- a/pyrogram/methods/chats/create_group.py +++ b/pyrogram/methods/chats/create_group.py @@ -35,6 +35,8 @@ class CreateGroup: If you want to create a new supergroup, use :meth:`~pyrogram.Client.create_supergroup` instead. + .. include:: /_includes/usable-by/users.rst + Parameters: title (``str``): The group title. diff --git a/pyrogram/methods/chats/create_supergroup.py b/pyrogram/methods/chats/create_supergroup.py index 04da148a..d1cbbbd8 100644 --- a/pyrogram/methods/chats/create_supergroup.py +++ b/pyrogram/methods/chats/create_supergroup.py @@ -32,6 +32,8 @@ class CreateSupergroup: If you want to create a new basic group, use :meth:`~pyrogram.Client.create_group` instead. + .. include:: /_includes/usable-by/users.rst + Parameters: title (``str``): The supergroup title. diff --git a/pyrogram/methods/chats/delete_channel.py b/pyrogram/methods/chats/delete_channel.py index 7aad47d0..374d89a6 100644 --- a/pyrogram/methods/chats/delete_channel.py +++ b/pyrogram/methods/chats/delete_channel.py @@ -29,6 +29,8 @@ class DeleteChannel: ) -> bool: """Delete a channel. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): The id of the channel to be deleted. diff --git a/pyrogram/methods/chats/delete_chat_photo.py b/pyrogram/methods/chats/delete_chat_photo.py index 058b7fdb..1984bc0c 100644 --- a/pyrogram/methods/chats/delete_chat_photo.py +++ b/pyrogram/methods/chats/delete_chat_photo.py @@ -31,6 +31,8 @@ class DeleteChatPhoto: You must be an administrator in the chat for this to work and must have the appropriate admin rights. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/delete_supergroup.py b/pyrogram/methods/chats/delete_supergroup.py index 39d5a07d..ebd60bef 100644 --- a/pyrogram/methods/chats/delete_supergroup.py +++ b/pyrogram/methods/chats/delete_supergroup.py @@ -29,6 +29,8 @@ class DeleteSupergroup: ) -> bool: """Delete a supergroup. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): The id of the supergroup to be deleted. diff --git a/pyrogram/methods/chats/delete_user_history.py b/pyrogram/methods/chats/delete_user_history.py index 4411ddbd..7769c7c3 100644 --- a/pyrogram/methods/chats/delete_user_history.py +++ b/pyrogram/methods/chats/delete_user_history.py @@ -30,6 +30,8 @@ class DeleteUserHistory: ) -> bool: """Delete all messages sent by a certain user in a supergroup. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/get_chat.py b/pyrogram/methods/chats/get_chat.py index d3246447..e2289935 100644 --- a/pyrogram/methods/chats/get_chat.py +++ b/pyrogram/methods/chats/get_chat.py @@ -34,6 +34,8 @@ class GetChat: Information include current name of the user for one-on-one conversations, current username of a user, group or channel, etc. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/get_chat_event_log.py b/pyrogram/methods/chats/get_chat_event_log.py index 622fe0bc..06fa01c8 100644 --- a/pyrogram/methods/chats/get_chat_event_log.py +++ b/pyrogram/methods/chats/get_chat_event_log.py @@ -38,7 +38,9 @@ class GetChatEventLog: Only available for supergroups and channels. Requires administrator rights. Results are returned in reverse chronological order (i.e., newest first). - Args: + .. include:: /_includes/usable-by/users.rst + + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/get_chat_member.py b/pyrogram/methods/chats/get_chat_member.py index 526cf744..53d2faad 100644 --- a/pyrogram/methods/chats/get_chat_member.py +++ b/pyrogram/methods/chats/get_chat_member.py @@ -32,6 +32,8 @@ class GetChatMember: ) -> "types.ChatMember": """Get information about one member of a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/get_chat_members.py b/pyrogram/methods/chats/get_chat_members.py index 3e11872c..49fb0a09 100644 --- a/pyrogram/methods/chats/get_chat_members.py +++ b/pyrogram/methods/chats/get_chat_members.py @@ -70,6 +70,8 @@ class GetChatMembers: A chat can be either a basic group, a supergroup or a channel. Requires administrator rights in channels. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/get_chat_members_count.py b/pyrogram/methods/chats/get_chat_members_count.py index e2f7fa8b..26807028 100644 --- a/pyrogram/methods/chats/get_chat_members_count.py +++ b/pyrogram/methods/chats/get_chat_members_count.py @@ -29,6 +29,8 @@ class GetChatMembersCount: ) -> int: """Get the number of members in a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/get_chat_online_count.py b/pyrogram/methods/chats/get_chat_online_count.py index 45c60d97..6ecd5727 100644 --- a/pyrogram/methods/chats/get_chat_online_count.py +++ b/pyrogram/methods/chats/get_chat_online_count.py @@ -29,6 +29,8 @@ class GetChatOnlineCount: ) -> int: """Get the number of members that are currently online in a chat. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/get_dialogs.py b/pyrogram/methods/chats/get_dialogs.py index 2869a6a1..3509ccbc 100644 --- a/pyrogram/methods/chats/get_dialogs.py +++ b/pyrogram/methods/chats/get_dialogs.py @@ -29,6 +29,8 @@ class GetDialogs: ) -> Optional[AsyncGenerator["types.Dialog", None]]: """Get a user's dialogs sequentially. + .. include:: /_includes/usable-by/users.rst + Parameters: limit (``int``, *optional*): Limits the number of dialogs to be retrieved. diff --git a/pyrogram/methods/chats/get_dialogs_count.py b/pyrogram/methods/chats/get_dialogs_count.py index 3d96732c..ae22eb5c 100644 --- a/pyrogram/methods/chats/get_dialogs_count.py +++ b/pyrogram/methods/chats/get_dialogs_count.py @@ -27,9 +27,12 @@ class GetDialogsCount: ) -> int: """Get the total count of your dialogs. - pinned_only (``bool``, *optional*): - Pass True if you want to count only pinned dialogs. - Defaults to False. + .. include:: /_includes/usable-by/users.rst + + Parameters: + pinned_only (``bool``, *optional*): + Pass True if you want to count only pinned dialogs. + Defaults to False. Returns: ``int``: On success, the dialogs count is returned. diff --git a/pyrogram/methods/chats/get_nearby_chats.py b/pyrogram/methods/chats/get_nearby_chats.py index 2ebd9306..8d1163ac 100644 --- a/pyrogram/methods/chats/get_nearby_chats.py +++ b/pyrogram/methods/chats/get_nearby_chats.py @@ -32,6 +32,8 @@ class GetNearbyChats: ) -> List["types.Chat"]: """Get nearby chats. + .. include:: /_includes/usable-by/users.rst + Parameters: latitude (``float``): Latitude of the location. diff --git a/pyrogram/methods/chats/get_send_as_chats.py b/pyrogram/methods/chats/get_send_as_chats.py index 2ad3b8b5..c9a358c3 100644 --- a/pyrogram/methods/chats/get_send_as_chats.py +++ b/pyrogram/methods/chats/get_send_as_chats.py @@ -30,6 +30,8 @@ class GetSendAsChats: ) -> List["types.Chat"]: """Get the list of "send_as" chats available. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/join_chat.py b/pyrogram/methods/chats/join_chat.py index 07d7b2a7..2ef82cff 100644 --- a/pyrogram/methods/chats/join_chat.py +++ b/pyrogram/methods/chats/join_chat.py @@ -30,6 +30,8 @@ class JoinChat: ) -> "types.Chat": """Join a group chat or channel. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat in form of a *t.me/joinchat/* link, a username of the target diff --git a/pyrogram/methods/chats/leave_chat.py b/pyrogram/methods/chats/leave_chat.py index 942173f4..b974e387 100644 --- a/pyrogram/methods/chats/leave_chat.py +++ b/pyrogram/methods/chats/leave_chat.py @@ -30,6 +30,8 @@ class LeaveChat: ): """Leave a group chat or channel. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/chats/mark_chat_unread.py b/pyrogram/methods/chats/mark_chat_unread.py index 62cb8bee..45aec2f8 100644 --- a/pyrogram/methods/chats/mark_chat_unread.py +++ b/pyrogram/methods/chats/mark_chat_unread.py @@ -29,6 +29,8 @@ class MarkChatUnread: ) -> bool: """Mark a chat as unread. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/pin_chat_message.py b/pyrogram/methods/chats/pin_chat_message.py index 0eaa1525..8ec06e7b 100644 --- a/pyrogram/methods/chats/pin_chat_message.py +++ b/pyrogram/methods/chats/pin_chat_message.py @@ -34,6 +34,8 @@ class PinChatMessage: You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin right in the supergroup or "can_edit_messages" admin right in the channel. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/promote_chat_member.py b/pyrogram/methods/chats/promote_chat_member.py index 46ffe446..e4539037 100644 --- a/pyrogram/methods/chats/promote_chat_member.py +++ b/pyrogram/methods/chats/promote_chat_member.py @@ -34,6 +34,8 @@ class PromoteChatMember: You must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/restrict_chat_member.py b/pyrogram/methods/chats/restrict_chat_member.py index 717ba60b..6e42b364 100644 --- a/pyrogram/methods/chats/restrict_chat_member.py +++ b/pyrogram/methods/chats/restrict_chat_member.py @@ -37,6 +37,8 @@ class RestrictChatMember: You must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_administrator_title.py b/pyrogram/methods/chats/set_administrator_title.py index 15f9dea5..2c77066e 100644 --- a/pyrogram/methods/chats/set_administrator_title.py +++ b/pyrogram/methods/chats/set_administrator_title.py @@ -34,6 +34,8 @@ class SetAdministratorTitle: If you are an administrator of a supergroup (i.e. not the owner), you can only set the title of other administrators who have been promoted by you. If you are the owner, you can change every administrator's title. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_chat_description.py b/pyrogram/methods/chats/set_chat_description.py index 3eee92ca..563e990c 100644 --- a/pyrogram/methods/chats/set_chat_description.py +++ b/pyrogram/methods/chats/set_chat_description.py @@ -31,6 +31,8 @@ class SetChatDescription: """Change the description of a supergroup or a channel. You must be an administrator in the chat for this to work and must have the appropriate admin rights. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_chat_permissions.py b/pyrogram/methods/chats/set_chat_permissions.py index d1280ea7..d8ec0cf0 100644 --- a/pyrogram/methods/chats/set_chat_permissions.py +++ b/pyrogram/methods/chats/set_chat_permissions.py @@ -34,6 +34,8 @@ class SetChatPermissions: You must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* admin rights. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_chat_photo.py b/pyrogram/methods/chats/set_chat_photo.py index 615eca25..f3db5329 100644 --- a/pyrogram/methods/chats/set_chat_photo.py +++ b/pyrogram/methods/chats/set_chat_photo.py @@ -41,6 +41,8 @@ class SetChatPhoto: You must be an administrator in the chat for this to work and must have the appropriate admin rights. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_chat_protected_content.py b/pyrogram/methods/chats/set_chat_protected_content.py index ee72d722..b6a89c11 100644 --- a/pyrogram/methods/chats/set_chat_protected_content.py +++ b/pyrogram/methods/chats/set_chat_protected_content.py @@ -30,6 +30,8 @@ class SetChatProtectedContent: ) -> bool: """Set the chat protected content setting. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_chat_title.py b/pyrogram/methods/chats/set_chat_title.py index e2c270e6..9a963571 100644 --- a/pyrogram/methods/chats/set_chat_title.py +++ b/pyrogram/methods/chats/set_chat_title.py @@ -36,6 +36,8 @@ class SetChatTitle: In regular groups (non-supergroups), this method will only work if the "All Members Are Admins" setting is off. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_chat_username.py b/pyrogram/methods/chats/set_chat_username.py index 2d4bc08a..e6d64e98 100644 --- a/pyrogram/methods/chats/set_chat_username.py +++ b/pyrogram/methods/chats/set_chat_username.py @@ -32,6 +32,8 @@ class SetChatUsername: To set your own username (for users only, not bots) you can use :meth:`~pyrogram.Client.set_username`. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``) Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_send_as_chat.py b/pyrogram/methods/chats/set_send_as_chat.py index 4cb50aed..15201f3b 100644 --- a/pyrogram/methods/chats/set_send_as_chat.py +++ b/pyrogram/methods/chats/set_send_as_chat.py @@ -32,6 +32,8 @@ class SetSendAsChat: Use :meth:`~pyrogram.Client.get_send_as_chats` to get all the "send_as" chats available for use. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/set_slow_mode.py b/pyrogram/methods/chats/set_slow_mode.py index ca68c87f..60e88e6d 100644 --- a/pyrogram/methods/chats/set_slow_mode.py +++ b/pyrogram/methods/chats/set_slow_mode.py @@ -30,6 +30,8 @@ class SetSlowMode: ) -> bool: """Set the slow mode interval for a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/unarchive_chats.py b/pyrogram/methods/chats/unarchive_chats.py index c518fe91..4d2cb0e4 100644 --- a/pyrogram/methods/chats/unarchive_chats.py +++ b/pyrogram/methods/chats/unarchive_chats.py @@ -29,6 +29,8 @@ class UnarchiveChats: ) -> bool: """Unarchive one or more chats. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_ids (``int`` | ``str`` | List[``int``, ``str``]): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/unban_chat_member.py b/pyrogram/methods/chats/unban_chat_member.py index 46c2241e..bbe7b454 100644 --- a/pyrogram/methods/chats/unban_chat_member.py +++ b/pyrogram/methods/chats/unban_chat_member.py @@ -32,6 +32,8 @@ class UnbanChatMember: The user will **not** return to the group or channel automatically, but will be able to join via link, etc. You must be an administrator for this to work. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/unpin_all_chat_messages.py b/pyrogram/methods/chats/unpin_all_chat_messages.py index 866ca7c0..25a53caf 100644 --- a/pyrogram/methods/chats/unpin_all_chat_messages.py +++ b/pyrogram/methods/chats/unpin_all_chat_messages.py @@ -31,6 +31,8 @@ class UnpinAllChatMessages: If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/chats/unpin_chat_message.py b/pyrogram/methods/chats/unpin_chat_message.py index 5b3768c0..6c8e036e 100644 --- a/pyrogram/methods/chats/unpin_chat_message.py +++ b/pyrogram/methods/chats/unpin_chat_message.py @@ -32,6 +32,8 @@ class UnpinChatMessage: You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin right in the supergroup or "can_edit_messages" admin right in the channel. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/contacts/add_contact.py b/pyrogram/methods/contacts/add_contact.py index ae7566b2..9c4faa7e 100644 --- a/pyrogram/methods/contacts/add_contact.py +++ b/pyrogram/methods/contacts/add_contact.py @@ -34,6 +34,8 @@ class AddContact: ): """Add an existing Telegram user as contact, even without a phone number. + .. include:: /_includes/usable-by/users.rst + Parameters: user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target user. diff --git a/pyrogram/methods/contacts/delete_contacts.py b/pyrogram/methods/contacts/delete_contacts.py index 448e849a..b4b2c628 100644 --- a/pyrogram/methods/contacts/delete_contacts.py +++ b/pyrogram/methods/contacts/delete_contacts.py @@ -29,6 +29,8 @@ class DeleteContacts: ) -> Union["types.User", List["types.User"], None]: """Delete contacts from your Telegram address book. + .. include:: /_includes/usable-by/users.rst + Parameters: user_ids (``int`` | ``str`` | List of ``int`` or ``str``): A single user id/username o a list of user identifiers (id or username). diff --git a/pyrogram/methods/contacts/get_contacts.py b/pyrogram/methods/contacts/get_contacts.py index 110d93a3..763f9a30 100644 --- a/pyrogram/methods/contacts/get_contacts.py +++ b/pyrogram/methods/contacts/get_contacts.py @@ -32,6 +32,8 @@ class GetContacts: ) -> List["types.User"]: """Get contacts from your Telegram address book. + .. include:: /_includes/usable-by/users.rst + Returns: List of :obj:`~pyrogram.types.User`: On success, a list of users is returned. diff --git a/pyrogram/methods/contacts/get_contacts_count.py b/pyrogram/methods/contacts/get_contacts_count.py index a709b676..56120bac 100644 --- a/pyrogram/methods/contacts/get_contacts_count.py +++ b/pyrogram/methods/contacts/get_contacts_count.py @@ -26,6 +26,8 @@ class GetContactsCount: ) -> int: """Get the total count of contacts from your Telegram address book. + .. include:: /_includes/usable-by/users.rst + Returns: ``int``: On success, the contacts count is returned. diff --git a/pyrogram/methods/contacts/import_contacts.py b/pyrogram/methods/contacts/import_contacts.py index 11df315b..aa8fd4ae 100644 --- a/pyrogram/methods/contacts/import_contacts.py +++ b/pyrogram/methods/contacts/import_contacts.py @@ -30,6 +30,8 @@ class ImportContacts: ): """Import contacts to your Telegram address book. + .. include:: /_includes/usable-by/users.rst + Parameters: contacts (List of :obj:`~pyrogram.types.InputPhoneContact`): The contact list to be added 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 ec2fc1bc..06894bc8 100644 --- a/pyrogram/methods/invite_links/approve_all_chat_join_requests.py +++ b/pyrogram/methods/invite_links/approve_all_chat_join_requests.py @@ -30,6 +30,8 @@ class ApproveAllChatJoinRequests: ) -> bool: """Approve all pending join requests in a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/approve_chat_join_request.py b/pyrogram/methods/invite_links/approve_chat_join_request.py index 3cd22489..2fc4e6d3 100644 --- a/pyrogram/methods/invite_links/approve_chat_join_request.py +++ b/pyrogram/methods/invite_links/approve_chat_join_request.py @@ -30,9 +30,11 @@ class ApproveChatJoinRequest: ) -> bool: """Approve a chat join request. - The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator + You must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/create_chat_invite_link.py b/pyrogram/methods/invite_links/create_chat_invite_link.py index 703d3d14..ccf8d650 100644 --- a/pyrogram/methods/invite_links/create_chat_invite_link.py +++ b/pyrogram/methods/invite_links/create_chat_invite_link.py @@ -39,6 +39,8 @@ class CreateChatInviteLink: The link can be revoked using the method :meth:`~pyrogram.Client.revoke_chat_invite_link`. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup 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 620e2624..4ce32de8 100644 --- a/pyrogram/methods/invite_links/decline_all_chat_join_requests.py +++ b/pyrogram/methods/invite_links/decline_all_chat_join_requests.py @@ -30,6 +30,8 @@ class DeclineAllChatJoinRequests: ) -> bool: """Decline all pending join requests in a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/decline_chat_join_request.py b/pyrogram/methods/invite_links/decline_chat_join_request.py index 94e3c2fe..9a35b8ee 100644 --- a/pyrogram/methods/invite_links/decline_chat_join_request.py +++ b/pyrogram/methods/invite_links/decline_chat_join_request.py @@ -30,9 +30,11 @@ class DeclineChatJoinRequest: ) -> bool: """Decline a chat join request. - The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator + You must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup 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 8ba6754d..6e127506 100644 --- a/pyrogram/methods/invite_links/delete_chat_admin_invite_links.py +++ b/pyrogram/methods/invite_links/delete_chat_admin_invite_links.py @@ -30,6 +30,8 @@ class DeleteChatAdminInviteLinks: ) -> bool: """Delete all revoked invite links of an administrator. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/delete_chat_invite_link.py b/pyrogram/methods/invite_links/delete_chat_invite_link.py index 1f38e46c..a5915979 100644 --- a/pyrogram/methods/invite_links/delete_chat_invite_link.py +++ b/pyrogram/methods/invite_links/delete_chat_invite_link.py @@ -30,6 +30,8 @@ class DeleteChatInviteLink: ) -> bool: """Delete an already revoked invite link. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/edit_chat_invite_link.py b/pyrogram/methods/invite_links/edit_chat_invite_link.py index 99516847..553c25dd 100644 --- a/pyrogram/methods/invite_links/edit_chat_invite_link.py +++ b/pyrogram/methods/invite_links/edit_chat_invite_link.py @@ -38,6 +38,8 @@ class EditChatInviteLink: You must be an administrator in the chat for this to work and must have the appropriate admin rights. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/export_chat_invite_link.py b/pyrogram/methods/invite_links/export_chat_invite_link.py index ae40391f..f06caf0f 100644 --- a/pyrogram/methods/invite_links/export_chat_invite_link.py +++ b/pyrogram/methods/invite_links/export_chat_invite_link.py @@ -39,6 +39,8 @@ class ExportChatInviteLink: :meth:`~pyrogram.Client.get_chat` method. If your bot needs to generate a new invite link replacing its previous one, use this method again. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup 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 1c79ce27..c845902e 100644 --- a/pyrogram/methods/invite_links/get_chat_admin_invite_links.py +++ b/pyrogram/methods/invite_links/get_chat_admin_invite_links.py @@ -38,6 +38,8 @@ class GetChatAdminInviteLinks: As an administrator you can only get your own links you have exported. As the chat or channel owner you can get everyones links. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup 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 c26af506..68479a61 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 @@ -31,6 +31,8 @@ class GetChatAdminInviteLinksCount: ) -> int: """Get the count of the invite links created by an administrator in a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup 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 61e082bc..d5bf6569 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 @@ -31,7 +31,9 @@ class GetChatAdminsWithInviteLinks: You must be the owner of a chat for this to work. - Args: + .. include:: /_includes/usable-by/users-bots.rst + + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup (in the format @username). diff --git a/pyrogram/methods/invite_links/get_chat_invite_link.py b/pyrogram/methods/invite_links/get_chat_invite_link.py index 74479336..8ad575f3 100644 --- a/pyrogram/methods/invite_links/get_chat_invite_link.py +++ b/pyrogram/methods/invite_links/get_chat_invite_link.py @@ -31,6 +31,8 @@ class GetChatInviteLink: ) -> "types.ChatInviteLink": """Get detailed information about a chat invite link. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup 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 cfd68734..d03d1083 100644 --- a/pyrogram/methods/invite_links/get_chat_invite_link_joiners.py +++ b/pyrogram/methods/invite_links/get_chat_invite_link_joiners.py @@ -32,6 +32,8 @@ class GetChatInviteLinkJoiners: ) -> Optional[AsyncGenerator["types.ChatJoiner", None]]: """Get the members who joined the chat with the invite link. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup 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 084fbae5..715053e6 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 @@ -30,6 +30,8 @@ class GetChatInviteLinkJoinersCount: ) -> int: """Get the count of the members who joined the chat with the invite link. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/get_chat_join_requests.py b/pyrogram/methods/invite_links/get_chat_join_requests.py index 9a9bc387..ee6fe7e3 100644 --- a/pyrogram/methods/invite_links/get_chat_join_requests.py +++ b/pyrogram/methods/invite_links/get_chat_join_requests.py @@ -32,6 +32,8 @@ class GetChatJoinRequests: ) -> Optional[AsyncGenerator["types.ChatJoiner", None]]: """Get the pending join requests of a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/invite_links/revoke_chat_invite_link.py b/pyrogram/methods/invite_links/revoke_chat_invite_link.py index a334bb8d..ff55a04e 100644 --- a/pyrogram/methods/invite_links/revoke_chat_invite_link.py +++ b/pyrogram/methods/invite_links/revoke_chat_invite_link.py @@ -35,6 +35,8 @@ class RevokeChatInviteLink: You must be an administrator in the chat for this to work and must have the appropriate admin rights. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier for the target chat or username of the target channel/supergroup diff --git a/pyrogram/methods/messages/copy_media_group.py b/pyrogram/methods/messages/copy_media_group.py index de47465d..52911ea0 100644 --- a/pyrogram/methods/messages/copy_media_group.py +++ b/pyrogram/methods/messages/copy_media_group.py @@ -36,6 +36,8 @@ class CopyMediaGroup: ) -> List["types.Message"]: """Copy a media group by providing one of the message ids. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/copy_message.py b/pyrogram/methods/messages/copy_message.py index b114a9e0..66b7e37c 100644 --- a/pyrogram/methods/messages/copy_message.py +++ b/pyrogram/methods/messages/copy_message.py @@ -51,6 +51,8 @@ class CopyMessage: The method is analogous to the method :meth:`~Client.forward_messages`, but the copied message doesn't have a link to the original message. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/delete_messages.py b/pyrogram/methods/messages/delete_messages.py index 523ecd54..07c3a7b8 100644 --- a/pyrogram/methods/messages/delete_messages.py +++ b/pyrogram/methods/messages/delete_messages.py @@ -31,6 +31,8 @@ class DeleteMessages: ) -> int: """Delete messages, including service messages. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/download_media.py b/pyrogram/methods/messages/download_media.py index d46bd503..4f44ff25 100644 --- a/pyrogram/methods/messages/download_media.py +++ b/pyrogram/methods/messages/download_media.py @@ -40,6 +40,8 @@ class DownloadMedia: ) -> Optional[Union[str, BinaryIO]]: """Download the media from a message. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: message (:obj:`~pyrogram.types.Message` | ``str``): Pass a Message containing the media, the media itself (message.audio, message.video, ...) or a file id diff --git a/pyrogram/methods/messages/edit_inline_caption.py b/pyrogram/methods/messages/edit_inline_caption.py index 0996d34e..69c73334 100644 --- a/pyrogram/methods/messages/edit_inline_caption.py +++ b/pyrogram/methods/messages/edit_inline_caption.py @@ -32,6 +32,8 @@ class EditInlineCaption: ) -> bool: """Edit the caption of inline media messages. + .. include:: /_includes/usable-by/bots.rst + Parameters: inline_message_id (``str``): Identifier of the inline message. diff --git a/pyrogram/methods/messages/edit_inline_media.py b/pyrogram/methods/messages/edit_inline_media.py index 81aa30ee..77fa673a 100644 --- a/pyrogram/methods/messages/edit_inline_media.py +++ b/pyrogram/methods/messages/edit_inline_media.py @@ -45,6 +45,8 @@ class EditInlineMedia: When the inline message is edited, a new file can't be uploaded. Use a previously uploaded file via its file_id or specify a URL. + .. include:: /_includes/usable-by/bots.rst + Parameters: inline_message_id (``str``): Required if *chat_id* and *message_id* are not specified. diff --git a/pyrogram/methods/messages/edit_inline_reply_markup.py b/pyrogram/methods/messages/edit_inline_reply_markup.py index 4e06e447..e2ef40e1 100644 --- a/pyrogram/methods/messages/edit_inline_reply_markup.py +++ b/pyrogram/methods/messages/edit_inline_reply_markup.py @@ -31,6 +31,8 @@ class EditInlineReplyMarkup: ) -> bool: """Edit only the reply markup of inline messages sent via the bot (for inline bots). + .. include:: /_includes/usable-by/bots.rst + Parameters: inline_message_id (``str``): Identifier of the inline message. diff --git a/pyrogram/methods/messages/edit_inline_text.py b/pyrogram/methods/messages/edit_inline_text.py index 9caee55a..354c55a3 100644 --- a/pyrogram/methods/messages/edit_inline_text.py +++ b/pyrogram/methods/messages/edit_inline_text.py @@ -36,6 +36,8 @@ class EditInlineText: ) -> bool: """Edit the text of inline messages. + .. include:: /_includes/usable-by/bots.rst + Parameters: inline_message_id (``str``): Identifier of the inline message. diff --git a/pyrogram/methods/messages/edit_message_caption.py b/pyrogram/methods/messages/edit_message_caption.py index d3b311db..2e4a45a6 100644 --- a/pyrogram/methods/messages/edit_message_caption.py +++ b/pyrogram/methods/messages/edit_message_caption.py @@ -34,6 +34,8 @@ class EditMessageCaption: ) -> "types.Message": """Edit the caption of media messages. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/edit_message_media.py b/pyrogram/methods/messages/edit_message_media.py index a3840f23..16efb5b8 100644 --- a/pyrogram/methods/messages/edit_message_media.py +++ b/pyrogram/methods/messages/edit_message_media.py @@ -42,6 +42,8 @@ class EditMessageMedia: If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, the message type can be changed arbitrarily. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/edit_message_reply_markup.py b/pyrogram/methods/messages/edit_message_reply_markup.py index 088e646d..1cd75c1a 100644 --- a/pyrogram/methods/messages/edit_message_reply_markup.py +++ b/pyrogram/methods/messages/edit_message_reply_markup.py @@ -32,6 +32,8 @@ class EditMessageReplyMarkup: ) -> "types.Message": """Edit only the reply markup of messages sent by the bot. + .. include:: /_includes/usable-by/bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/edit_message_text.py b/pyrogram/methods/messages/edit_message_text.py index 94852de5..540b6aa6 100644 --- a/pyrogram/methods/messages/edit_message_text.py +++ b/pyrogram/methods/messages/edit_message_text.py @@ -37,6 +37,8 @@ class EditMessageText: ) -> "types.Message": """Edit the text of messages. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/forward_messages.py b/pyrogram/methods/messages/forward_messages.py index be7b2ab5..8635e171 100644 --- a/pyrogram/methods/messages/forward_messages.py +++ b/pyrogram/methods/messages/forward_messages.py @@ -36,6 +36,8 @@ class ForwardMessages: ) -> Union["types.Message", List["types.Message"]]: """Forward messages of any kind. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/get_chat_history.py b/pyrogram/methods/messages/get_chat_history.py index a7fcc491..b384c6ba 100644 --- a/pyrogram/methods/messages/get_chat_history.py +++ b/pyrogram/methods/messages/get_chat_history.py @@ -62,6 +62,8 @@ class GetChatHistory: The messages are returned in reverse chronological order. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/get_chat_history_count.py b/pyrogram/methods/messages/get_chat_history_count.py index 46f61eb0..1926224b 100644 --- a/pyrogram/methods/messages/get_chat_history_count.py +++ b/pyrogram/methods/messages/get_chat_history_count.py @@ -38,6 +38,8 @@ class GetChatHistoryCount: a **private** or a **basic group** chat has with a single method call. To overcome this limitation, Pyrogram has to iterate over all the messages. Channels and supergroups are not affected by this limitation. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/get_custom_emoji_stickers.py b/pyrogram/methods/messages/get_custom_emoji_stickers.py index 335f4ce9..7a71f058 100644 --- a/pyrogram/methods/messages/get_custom_emoji_stickers.py +++ b/pyrogram/methods/messages/get_custom_emoji_stickers.py @@ -30,6 +30,8 @@ class GetCustomEmojiStickers: ) -> List["types.Sticker"]: """Get information about custom emoji stickers by their identifiers. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: custom_emoji_ids (List of ``int``): List of custom emoji identifiers. diff --git a/pyrogram/methods/messages/get_discussion_message.py b/pyrogram/methods/messages/get_discussion_message.py index 93510e21..58a6b704 100644 --- a/pyrogram/methods/messages/get_discussion_message.py +++ b/pyrogram/methods/messages/get_discussion_message.py @@ -34,6 +34,8 @@ class GetDiscussionMessage: Reply to the returned message to leave a comment on the linked channel post or to continue the discussion thread. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/get_discussion_replies.py b/pyrogram/methods/messages/get_discussion_replies.py index 467cca8d..dd23751b 100644 --- a/pyrogram/methods/messages/get_discussion_replies.py +++ b/pyrogram/methods/messages/get_discussion_replies.py @@ -31,6 +31,8 @@ class GetDiscussionReplies: ) -> Optional[AsyncGenerator["types.Message", None]]: """Get the message replies of a discussion thread. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/get_discussion_replies_count.py b/pyrogram/methods/messages/get_discussion_replies_count.py index 260be802..bbb90ac3 100644 --- a/pyrogram/methods/messages/get_discussion_replies_count.py +++ b/pyrogram/methods/messages/get_discussion_replies_count.py @@ -30,6 +30,8 @@ class GetDiscussionRepliesCount: ) -> int: """Get the total count of replies in a discussion thread. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/get_media_group.py b/pyrogram/methods/messages/get_media_group.py index b50d4785..97770d90 100644 --- a/pyrogram/methods/messages/get_media_group.py +++ b/pyrogram/methods/messages/get_media_group.py @@ -32,7 +32,9 @@ class GetMediaGroup: message_id: int ) -> List["types.Message"]: """Get the media group a message belongs to. - + + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/get_messages.py b/pyrogram/methods/messages/get_messages.py index 17d80e58..3f398c36 100644 --- a/pyrogram/methods/messages/get_messages.py +++ b/pyrogram/methods/messages/get_messages.py @@ -42,6 +42,8 @@ class GetMessages: You can retrieve up to 200 messages at once. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/read_chat_history.py b/pyrogram/methods/messages/read_chat_history.py index b3cc3bfc..4b962739 100644 --- a/pyrogram/methods/messages/read_chat_history.py +++ b/pyrogram/methods/messages/read_chat_history.py @@ -30,6 +30,8 @@ class ReadChatHistory: ) -> bool: """Mark a chat's message history as read. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/retract_vote.py b/pyrogram/methods/messages/retract_vote.py index 8420a4a3..c456f4d0 100644 --- a/pyrogram/methods/messages/retract_vote.py +++ b/pyrogram/methods/messages/retract_vote.py @@ -31,6 +31,8 @@ class RetractVote: ) -> "types.Poll": """Retract your vote in a poll. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/search_global.py b/pyrogram/methods/messages/search_global.py index 5e54a965..f566c981 100644 --- a/pyrogram/methods/messages/search_global.py +++ b/pyrogram/methods/messages/search_global.py @@ -40,6 +40,8 @@ class SearchGlobal: Due to server-side limitations, you can only get up to around ~10,000 messages and each message retrieved will not have any *reply_to_message* field. + .. include:: /_includes/usable-by/users.rst + Parameters: query (``str``, *optional*): Text query string. diff --git a/pyrogram/methods/messages/search_global_count.py b/pyrogram/methods/messages/search_global_count.py index 2e559ded..8323a821 100644 --- a/pyrogram/methods/messages/search_global_count.py +++ b/pyrogram/methods/messages/search_global_count.py @@ -30,6 +30,8 @@ class SearchGlobalCount: If you want to get the actual messages, see :meth:`~pyrogram.Client.search_global`. + .. include:: /_includes/usable-by/users.rst + Parameters: query (``str``, *optional*): Text query string. diff --git a/pyrogram/methods/messages/search_messages.py b/pyrogram/methods/messages/search_messages.py index 1f9fa3c7..4497ff1c 100644 --- a/pyrogram/methods/messages/search_messages.py +++ b/pyrogram/methods/messages/search_messages.py @@ -72,6 +72,8 @@ class SearchMessages: If you want to get the messages count only, see :meth:`~pyrogram.Client.search_messages_count`. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/search_messages_count.py b/pyrogram/methods/messages/search_messages_count.py index 09f77855..ea9ae4d1 100644 --- a/pyrogram/methods/messages/search_messages_count.py +++ b/pyrogram/methods/messages/search_messages_count.py @@ -34,6 +34,8 @@ class SearchMessagesCount: If you want to get the actual messages, see :meth:`~pyrogram.Client.search_messages`. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_animation.py b/pyrogram/methods/messages/send_animation.py index efa9cb16..ec85dc05 100644 --- a/pyrogram/methods/messages/send_animation.py +++ b/pyrogram/methods/messages/send_animation.py @@ -59,6 +59,8 @@ class SendAnimation: ) -> Optional["types.Message"]: """Send animation files (animation or H.264/MPEG-4 AVC video without sound). + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_audio.py b/pyrogram/methods/messages/send_audio.py index f4552832..7a81df01 100644 --- a/pyrogram/methods/messages/send_audio.py +++ b/pyrogram/methods/messages/send_audio.py @@ -60,6 +60,8 @@ class SendAudio: For sending voice messages, use the :meth:`~pyrogram.Client.send_voice` method instead. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_cached_media.py b/pyrogram/methods/messages/send_cached_media.py index f0e04d72..5a9e2e1f 100644 --- a/pyrogram/methods/messages/send_cached_media.py +++ b/pyrogram/methods/messages/send_cached_media.py @@ -50,6 +50,8 @@ class SendCachedMedia: It does the same as calling the relevant method for sending media using a file_id, thus saving you from the hassle of using the correct method for the media the file_id is pointing to. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_chat_action.py b/pyrogram/methods/messages/send_chat_action.py index 15b5ac08..44b16628 100644 --- a/pyrogram/methods/messages/send_chat_action.py +++ b/pyrogram/methods/messages/send_chat_action.py @@ -30,6 +30,8 @@ class SendChatAction: ) -> bool: """Tell the other party that something is happening on your side. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_contact.py b/pyrogram/methods/messages/send_contact.py index cedcd0b2..30f7abd3 100644 --- a/pyrogram/methods/messages/send_contact.py +++ b/pyrogram/methods/messages/send_contact.py @@ -45,6 +45,8 @@ class SendContact: ) -> "types.Message": """Send phone contacts. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_dice.py b/pyrogram/methods/messages/send_dice.py index 942f681f..c657d85d 100644 --- a/pyrogram/methods/messages/send_dice.py +++ b/pyrogram/methods/messages/send_dice.py @@ -42,6 +42,8 @@ class SendDice: ) -> Optional["types.Message"]: """Send a dice with a random value from 1 to 6. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_document.py b/pyrogram/methods/messages/send_document.py index 99c90fbb..b0a4a531 100644 --- a/pyrogram/methods/messages/send_document.py +++ b/pyrogram/methods/messages/send_document.py @@ -56,6 +56,8 @@ class SendDocument: ) -> Optional["types.Message"]: """Send generic files. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_location.py b/pyrogram/methods/messages/send_location.py index fe7d1ed1..2bd17681 100644 --- a/pyrogram/methods/messages/send_location.py +++ b/pyrogram/methods/messages/send_location.py @@ -43,6 +43,8 @@ class SendLocation: ) -> "types.Message": """Send points on the map. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_media_group.py b/pyrogram/methods/messages/send_media_group.py index 43eb9d7c..0dfbbaa2 100644 --- a/pyrogram/methods/messages/send_media_group.py +++ b/pyrogram/methods/messages/send_media_group.py @@ -49,6 +49,8 @@ class SendMediaGroup: ) -> List["types.Message"]: """Send a group of photos or videos as an album. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_message.py b/pyrogram/methods/messages/send_message.py index b365880e..ad73f9a1 100644 --- a/pyrogram/methods/messages/send_message.py +++ b/pyrogram/methods/messages/send_message.py @@ -45,6 +45,8 @@ class SendMessage: ) -> "types.Message": """Send text messages. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_photo.py b/pyrogram/methods/messages/send_photo.py index 6add68cd..994f0c93 100644 --- a/pyrogram/methods/messages/send_photo.py +++ b/pyrogram/methods/messages/send_photo.py @@ -53,6 +53,8 @@ class SendPhoto: ) -> Optional["types.Message"]: """Send photos. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_poll.py b/pyrogram/methods/messages/send_poll.py index 207cff9f..267dcb6d 100644 --- a/pyrogram/methods/messages/send_poll.py +++ b/pyrogram/methods/messages/send_poll.py @@ -53,6 +53,8 @@ class SendPoll: ) -> "types.Message": """Send a new poll. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_reaction.py b/pyrogram/methods/messages/send_reaction.py index b1e6540b..f4d1d343 100644 --- a/pyrogram/methods/messages/send_reaction.py +++ b/pyrogram/methods/messages/send_reaction.py @@ -32,6 +32,8 @@ class SendReaction: ) -> bool: """Send a reaction to a message. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_sticker.py b/pyrogram/methods/messages/send_sticker.py index 2fc4565c..ccfaada5 100644 --- a/pyrogram/methods/messages/send_sticker.py +++ b/pyrogram/methods/messages/send_sticker.py @@ -50,6 +50,8 @@ class SendSticker: ) -> Optional["types.Message"]: """Send static .webp or animated .tgs stickers. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_venue.py b/pyrogram/methods/messages/send_venue.py index e8cc760b..4d3167bf 100644 --- a/pyrogram/methods/messages/send_venue.py +++ b/pyrogram/methods/messages/send_venue.py @@ -47,6 +47,8 @@ class SendVenue: ) -> "types.Message": """Send information about a venue. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_video.py b/pyrogram/methods/messages/send_video.py index 669b42ec..c2053064 100644 --- a/pyrogram/methods/messages/send_video.py +++ b/pyrogram/methods/messages/send_video.py @@ -60,6 +60,8 @@ class SendVideo: ) -> Optional["types.Message"]: """Send video files. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_video_note.py b/pyrogram/methods/messages/send_video_note.py index bf33cdb7..9c615d31 100644 --- a/pyrogram/methods/messages/send_video_note.py +++ b/pyrogram/methods/messages/send_video_note.py @@ -52,6 +52,8 @@ class SendVideoNote: ) -> Optional["types.Message"]: """Send video messages. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/send_voice.py b/pyrogram/methods/messages/send_voice.py index 5947ecc2..266702fd 100644 --- a/pyrogram/methods/messages/send_voice.py +++ b/pyrogram/methods/messages/send_voice.py @@ -54,6 +54,8 @@ class SendVoice: ) -> Optional["types.Message"]: """Send audio files. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/stop_poll.py b/pyrogram/methods/messages/stop_poll.py index 6104403f..89a33434 100644 --- a/pyrogram/methods/messages/stop_poll.py +++ b/pyrogram/methods/messages/stop_poll.py @@ -34,6 +34,8 @@ class StopPoll: Stopped polls can't be reopened and nobody will be able to vote in it anymore. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/messages/stream_media.py b/pyrogram/methods/messages/stream_media.py index 91ffefd7..b432badb 100644 --- a/pyrogram/methods/messages/stream_media.py +++ b/pyrogram/methods/messages/stream_media.py @@ -36,6 +36,8 @@ class StreamMedia: You can use this method to partially download a file into memory or to selectively download chunks of file. The chunk maximum size is 1 MiB (1024 * 1024 bytes). + .. include:: /_includes/usable-by/users-bots.rst + Parameters: message (:obj:`~pyrogram.types.Message` | ``str``): Pass a Message containing the media, the media itself (message.audio, message.video, ...) or a file id diff --git a/pyrogram/methods/messages/vote_poll.py b/pyrogram/methods/messages/vote_poll.py index 72a912de..620fac5a 100644 --- a/pyrogram/methods/messages/vote_poll.py +++ b/pyrogram/methods/messages/vote_poll.py @@ -32,6 +32,8 @@ class VotePoll: ) -> "types.Poll": """Vote a poll. + .. include:: /_includes/usable-by/users.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/password/change_cloud_password.py b/pyrogram/methods/password/change_cloud_password.py index c5e8bd27..29540d65 100644 --- a/pyrogram/methods/password/change_cloud_password.py +++ b/pyrogram/methods/password/change_cloud_password.py @@ -32,6 +32,8 @@ class ChangeCloudPassword: ) -> bool: """Change your Two-Step Verification password (Cloud Password) with a new one. + .. include:: /_includes/usable-by/users.rst + Parameters: current_password (``str``): Your current password. diff --git a/pyrogram/methods/password/enable_cloud_password.py b/pyrogram/methods/password/enable_cloud_password.py index a6533dbf..8f5e59c5 100644 --- a/pyrogram/methods/password/enable_cloud_password.py +++ b/pyrogram/methods/password/enable_cloud_password.py @@ -34,6 +34,8 @@ class EnableCloudPassword: This password will be asked when you log-in on a new device in addition to the SMS code. + .. include:: /_includes/usable-by/users.rst + Parameters: password (``str``): Your password. diff --git a/pyrogram/methods/password/remove_cloud_password.py b/pyrogram/methods/password/remove_cloud_password.py index dab37d86..0ec16e12 100644 --- a/pyrogram/methods/password/remove_cloud_password.py +++ b/pyrogram/methods/password/remove_cloud_password.py @@ -28,6 +28,8 @@ class RemoveCloudPassword: ) -> bool: """Turn off the Two-Step Verification security feature (Cloud Password) on your account. + .. include:: /_includes/usable-by/users.rst + Parameters: password (``str``): Your current password. diff --git a/pyrogram/methods/users/block_user.py b/pyrogram/methods/users/block_user.py index f1447955..25cd0ce8 100644 --- a/pyrogram/methods/users/block_user.py +++ b/pyrogram/methods/users/block_user.py @@ -29,6 +29,8 @@ class BlockUser: ) -> bool: """Block a user. + .. include:: /_includes/usable-by/users.rst + Parameters: user_id (``int`` | ``str``):: Unique identifier (int) or username (str) of the target user. diff --git a/pyrogram/methods/users/delete_profile_photos.py b/pyrogram/methods/users/delete_profile_photos.py index 4ee8b7b5..2b52d02f 100644 --- a/pyrogram/methods/users/delete_profile_photos.py +++ b/pyrogram/methods/users/delete_profile_photos.py @@ -31,6 +31,8 @@ class DeleteProfilePhotos: ) -> bool: """Delete your own profile photos. + .. include:: /_includes/usable-by/users.rst + Parameters: photo_ids (``str`` | List of ``str``): A single :obj:`~pyrogram.types.Photo` id as string or multiple ids as list of strings for deleting diff --git a/pyrogram/methods/users/get_chat_photos.py b/pyrogram/methods/users/get_chat_photos.py index d3bc1f1f..d22c68dc 100644 --- a/pyrogram/methods/users/get_chat_photos.py +++ b/pyrogram/methods/users/get_chat_photos.py @@ -30,6 +30,8 @@ class GetChatPhotos: ) -> Optional[AsyncGenerator["types.Photo", None]]: """Get a chat or a user profile photos sequentially. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/users/get_chat_photos_count.py b/pyrogram/methods/users/get_chat_photos_count.py index eca186a8..d4cf1594 100644 --- a/pyrogram/methods/users/get_chat_photos_count.py +++ b/pyrogram/methods/users/get_chat_photos_count.py @@ -29,6 +29,8 @@ class GetChatPhotosCount: ) -> int: """Get the total count of photos for a chat. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/users/get_common_chats.py b/pyrogram/methods/users/get_common_chats.py index a45bda6f..31e2bac3 100644 --- a/pyrogram/methods/users/get_common_chats.py +++ b/pyrogram/methods/users/get_common_chats.py @@ -30,6 +30,8 @@ class GetCommonChats: ) -> List["types.Chat"]: """Get the common chats you have with a user. + .. include:: /_includes/usable-by/users.rst + Parameters: user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. diff --git a/pyrogram/methods/users/get_default_emoji_statuses.py b/pyrogram/methods/users/get_default_emoji_statuses.py index 8c85a3c2..cd3768b9 100644 --- a/pyrogram/methods/users/get_default_emoji_statuses.py +++ b/pyrogram/methods/users/get_default_emoji_statuses.py @@ -29,6 +29,8 @@ class GetDefaultEmojiStatuses: ) -> List["types.EmojiStatus"]: """Get the default emoji statuses. + .. include:: /_includes/usable-by/users-bots.rst + Returns: List of :obj:`~pyrogram.types.EmojiStatus`: On success, a list of emoji statuses is returned. diff --git a/pyrogram/methods/users/get_me.py b/pyrogram/methods/users/get_me.py index 610a11af..a8df3ae9 100644 --- a/pyrogram/methods/users/get_me.py +++ b/pyrogram/methods/users/get_me.py @@ -27,6 +27,8 @@ class GetMe: ) -> "types.User": """Get your own user identity. + .. include:: /_includes/usable-by/users-bots.rst + Returns: :obj:`~pyrogram.types.User`: Information about the own logged in user/bot. diff --git a/pyrogram/methods/users/get_users.py b/pyrogram/methods/users/get_users.py index 384dded0..39821a8c 100644 --- a/pyrogram/methods/users/get_users.py +++ b/pyrogram/methods/users/get_users.py @@ -32,6 +32,8 @@ class GetUsers: """Get information about a user. You can retrieve up to 200 users at once. + .. include:: /_includes/usable-by/users-bots.rst + Parameters: user_ids (``int`` | ``str`` | Iterable of ``int`` or ``str``): A list of User identifiers (id or username) or a single user id/username. diff --git a/pyrogram/methods/users/set_emoji_status.py b/pyrogram/methods/users/set_emoji_status.py index 288e966b..2d8c77cc 100644 --- a/pyrogram/methods/users/set_emoji_status.py +++ b/pyrogram/methods/users/set_emoji_status.py @@ -29,6 +29,8 @@ class SetEmojiStatus: ) -> bool: """Set the emoji status. + .. include:: /_includes/usable-by/users.rst + Parameters: emoji_status (:obj:`~pyrogram.types.EmojiStatus`, *optional*): The emoji status to set. None to remove. diff --git a/pyrogram/methods/users/set_profile_photo.py b/pyrogram/methods/users/set_profile_photo.py index 86aaf31f..e08e669c 100644 --- a/pyrogram/methods/users/set_profile_photo.py +++ b/pyrogram/methods/users/set_profile_photo.py @@ -39,6 +39,8 @@ class SetProfilePhoto: This method only works for Users. Bots profile photos must be set using BotFather. + .. include:: /_includes/usable-by/users.rst + Parameters: photo (``str`` | ``BinaryIO``, *optional*): Profile photo to set. diff --git a/pyrogram/methods/users/set_username.py b/pyrogram/methods/users/set_username.py index 6f070bc5..d336628e 100644 --- a/pyrogram/methods/users/set_username.py +++ b/pyrogram/methods/users/set_username.py @@ -33,6 +33,8 @@ class SetUsername: them from scratch using BotFather. To set a channel or supergroup username you can use :meth:`~pyrogram.Client.set_chat_username`. + .. include:: /_includes/usable-by/users.rst + Parameters: username (``str`` | ``None``): Username to set. "" (empty string) or None to remove it. diff --git a/pyrogram/methods/users/unblock_user.py b/pyrogram/methods/users/unblock_user.py index 4809aa6b..db4fdddc 100644 --- a/pyrogram/methods/users/unblock_user.py +++ b/pyrogram/methods/users/unblock_user.py @@ -29,6 +29,8 @@ class UnblockUser: ) -> bool: """Unblock a user. + .. include:: /_includes/usable-by/users.rst + Parameters: user_id (``int`` | ``str``):: Unique identifier (int) or username (str) of the target user. diff --git a/pyrogram/methods/users/update_profile.py b/pyrogram/methods/users/update_profile.py index 31f12508..6c10d16c 100644 --- a/pyrogram/methods/users/update_profile.py +++ b/pyrogram/methods/users/update_profile.py @@ -31,6 +31,8 @@ class UpdateProfile: You can omit the parameters you don't want to change. + .. include:: /_includes/usable-by/users.rst + Parameters: first_name (``str``, *optional*): The new first name.