PyroMt 2.0.106__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyrogram/__init__.py +42 -0
- pyrogram/client.py +1048 -0
- pyrogram/connection/__init__.py +19 -0
- pyrogram/connection/connection.py +72 -0
- pyrogram/connection/transport/__init__.py +19 -0
- pyrogram/connection/transport/tcp/__init__.py +24 -0
- pyrogram/connection/transport/tcp/tcp.py +123 -0
- pyrogram/connection/transport/tcp/tcp_abridged.py +57 -0
- pyrogram/connection/transport/tcp/tcp_abridged_o.py +86 -0
- pyrogram/connection/transport/tcp/tcp_full.py +64 -0
- pyrogram/connection/transport/tcp/tcp_intermediate.py +45 -0
- pyrogram/connection/transport/tcp/tcp_intermediate_o.py +79 -0
- pyrogram/crypto/__init__.py +17 -0
- pyrogram/crypto/aes.py +130 -0
- pyrogram/crypto/mtproto.py +100 -0
- pyrogram/crypto/prime.py +82 -0
- pyrogram/crypto/rsa.py +259 -0
- pyrogram/dispatcher.py +259 -0
- pyrogram/emoji.py +4019 -0
- pyrogram/enums/__init__.py +49 -0
- pyrogram/enums/auto_name.py +27 -0
- pyrogram/enums/chat_action.py +72 -0
- pyrogram/enums/chat_event_action.py +127 -0
- pyrogram/enums/chat_member_status.py +43 -0
- pyrogram/enums/chat_members_filter.py +42 -0
- pyrogram/enums/chat_type.py +40 -0
- pyrogram/enums/message_entity_type.py +84 -0
- pyrogram/enums/message_media_type.py +70 -0
- pyrogram/enums/message_service_type.py +73 -0
- pyrogram/enums/messages_filter.py +75 -0
- pyrogram/enums/next_code_type.py +39 -0
- pyrogram/enums/parse_mode.py +37 -0
- pyrogram/enums/poll_type.py +31 -0
- pyrogram/enums/sent_code_type.py +45 -0
- pyrogram/enums/user_status.py +43 -0
- pyrogram/errors/__init__.py +65 -0
- pyrogram/errors/exceptions/__init__.py +26 -0
- pyrogram/errors/exceptions/all.py +509 -0
- pyrogram/errors/exceptions/bad_request_400.py +2541 -0
- pyrogram/errors/exceptions/flood_420.py +63 -0
- pyrogram/errors/exceptions/forbidden_403.py +217 -0
- pyrogram/errors/exceptions/internal_server_error_500.py +336 -0
- pyrogram/errors/exceptions/not_acceptable_406.py +112 -0
- pyrogram/errors/exceptions/see_other_303.py +63 -0
- pyrogram/errors/exceptions/service_unavailable_503.py +42 -0
- pyrogram/errors/exceptions/unauthorized_401.py +91 -0
- pyrogram/errors/rpc_error.py +103 -0
- pyrogram/file_id.py +481 -0
- pyrogram/filters.py +929 -0
- pyrogram/handlers/__init__.py +30 -0
- pyrogram/handlers/callback_query_handler.py +49 -0
- pyrogram/handlers/chat_join_request_handler.py +49 -0
- pyrogram/handlers/chat_member_updated_handler.py +49 -0
- pyrogram/handlers/chosen_inline_result_handler.py +50 -0
- pyrogram/handlers/deleted_messages_handler.py +61 -0
- pyrogram/handlers/disconnect_handler.py +43 -0
- pyrogram/handlers/edited_message_handler.py +49 -0
- pyrogram/handlers/handler.py +43 -0
- pyrogram/handlers/inline_query_handler.py +49 -0
- pyrogram/handlers/message_handler.py +49 -0
- pyrogram/handlers/poll_handler.py +50 -0
- pyrogram/handlers/raw_update_handler.py +67 -0
- pyrogram/handlers/user_status_handler.py +47 -0
- pyrogram/methods/__init__.py +45 -0
- pyrogram/methods/advanced/__init__.py +29 -0
- pyrogram/methods/advanced/invoke.py +89 -0
- pyrogram/methods/advanced/resolve_peer.py +125 -0
- pyrogram/methods/advanced/save_file.py +226 -0
- pyrogram/methods/auth/__init__.py +53 -0
- pyrogram/methods/auth/accept_terms_of_service.py +44 -0
- pyrogram/methods/auth/check_password.py +60 -0
- pyrogram/methods/auth/connect.py +51 -0
- pyrogram/methods/auth/disconnect.py +40 -0
- pyrogram/methods/auth/get_password_hint.py +38 -0
- pyrogram/methods/auth/initialize.py +52 -0
- pyrogram/methods/auth/log_out.py +51 -0
- pyrogram/methods/auth/recover_password.py +57 -0
- pyrogram/methods/auth/resend_code.py +64 -0
- pyrogram/methods/auth/send_code.py +79 -0
- pyrogram/methods/auth/send_recovery_code.py +43 -0
- pyrogram/methods/auth/sign_in.py +80 -0
- pyrogram/methods/auth/sign_in_bot.py +79 -0
- pyrogram/methods/auth/sign_up.py +73 -0
- pyrogram/methods/auth/terminate.py +61 -0
- pyrogram/methods/bots/__init__.py +55 -0
- pyrogram/methods/bots/answer_callback_query.py +81 -0
- pyrogram/methods/bots/answer_inline_query.py +112 -0
- pyrogram/methods/bots/answer_web_app_query.py +53 -0
- pyrogram/methods/bots/delete_bot_commands.py +62 -0
- pyrogram/methods/bots/get_bot_commands.py +67 -0
- pyrogram/methods/bots/get_bot_default_privileges.py +59 -0
- pyrogram/methods/bots/get_chat_menu_button.py +66 -0
- pyrogram/methods/bots/get_game_high_scores.py +72 -0
- pyrogram/methods/bots/get_inline_bot_results.py +92 -0
- pyrogram/methods/bots/request_callback_answer.py +77 -0
- pyrogram/methods/bots/send_game.py +100 -0
- pyrogram/methods/bots/send_inline_bot_result.py +75 -0
- pyrogram/methods/bots/set_bot_commands.py +73 -0
- pyrogram/methods/bots/set_bot_default_privileges.py +81 -0
- pyrogram/methods/bots/set_chat_menu_button.py +56 -0
- pyrogram/methods/bots/set_game_score.py +100 -0
- pyrogram/methods/chats/__init__.py +101 -0
- pyrogram/methods/chats/add_chat_members.py +90 -0
- pyrogram/methods/chats/archive_chats.py +71 -0
- pyrogram/methods/chats/ban_chat_member.py +111 -0
- pyrogram/methods/chats/create_channel.py +56 -0
- pyrogram/methods/chats/create_group.py +67 -0
- pyrogram/methods/chats/create_supergroup.py +60 -0
- pyrogram/methods/chats/delete_channel.py +52 -0
- pyrogram/methods/chats/delete_chat_photo.py +70 -0
- pyrogram/methods/chats/delete_supergroup.py +52 -0
- pyrogram/methods/chats/delete_user_history.py +55 -0
- pyrogram/methods/chats/get_chat.py +87 -0
- pyrogram/methods/chats/get_chat_event_log.py +109 -0
- pyrogram/methods/chats/get_chat_member.py +92 -0
- pyrogram/methods/chats/get_chat_members.py +158 -0
- pyrogram/methods/chats/get_chat_members_count.py +69 -0
- pyrogram/methods/chats/get_chat_online_count.py +51 -0
- pyrogram/methods/chats/get_dialogs.py +104 -0
- pyrogram/methods/chats/get_dialogs_count.py +63 -0
- pyrogram/methods/chats/get_nearby_chats.py +78 -0
- pyrogram/methods/chats/get_send_as_chats.py +65 -0
- pyrogram/methods/chats/join_chat.py +74 -0
- pyrogram/methods/chats/leave_chat.py +77 -0
- pyrogram/methods/chats/mark_chat_unread.py +47 -0
- pyrogram/methods/chats/pin_chat_message.py +81 -0
- pyrogram/methods/chats/promote_chat_member.py +101 -0
- pyrogram/methods/chats/restrict_chat_member.py +99 -0
- pyrogram/methods/chats/set_administrator_title.py +85 -0
- pyrogram/methods/chats/set_chat_description.py +66 -0
- pyrogram/methods/chats/set_chat_permissions.py +87 -0
- pyrogram/methods/chats/set_chat_photo.py +121 -0
- pyrogram/methods/chats/set_chat_protected_content.py +53 -0
- pyrogram/methods/chats/set_chat_title.py +78 -0
- pyrogram/methods/chats/set_chat_username.py +68 -0
- pyrogram/methods/chats/set_send_as_chat.py +57 -0
- pyrogram/methods/chats/set_slow_mode.py +63 -0
- pyrogram/methods/chats/unarchive_chats.py +71 -0
- pyrogram/methods/chats/unban_chat_member.py +64 -0
- pyrogram/methods/chats/unpin_all_chat_messages.py +55 -0
- pyrogram/methods/chats/unpin_chat_message.py +61 -0
- pyrogram/methods/contacts/__init__.py +33 -0
- pyrogram/methods/contacts/add_contact.py +78 -0
- pyrogram/methods/contacts/delete_contacts.py +66 -0
- pyrogram/methods/contacts/get_contacts.py +47 -0
- pyrogram/methods/contacts/get_contacts_count.py +41 -0
- pyrogram/methods/contacts/import_contacts.py +58 -0
- pyrogram/methods/decorators/__init__.py +47 -0
- pyrogram/methods/decorators/on_callback_query.py +61 -0
- pyrogram/methods/decorators/on_chat_join_request.py +60 -0
- pyrogram/methods/decorators/on_chat_member_updated.py +60 -0
- pyrogram/methods/decorators/on_chosen_inline_result.py +61 -0
- pyrogram/methods/decorators/on_deleted_messages.py +61 -0
- pyrogram/methods/decorators/on_disconnect.py +43 -0
- pyrogram/methods/decorators/on_edited_message.py +61 -0
- pyrogram/methods/decorators/on_inline_query.py +61 -0
- pyrogram/methods/decorators/on_message.py +61 -0
- pyrogram/methods/decorators/on_poll.py +61 -0
- pyrogram/methods/decorators/on_raw_update.py +55 -0
- pyrogram/methods/decorators/on_user_status.py +59 -0
- pyrogram/methods/invite_links/__init__.py +58 -0
- pyrogram/methods/invite_links/approve_all_chat_join_requests.py +55 -0
- pyrogram/methods/invite_links/approve_chat_join_request.py +57 -0
- pyrogram/methods/invite_links/create_chat_invite_link.py +87 -0
- pyrogram/methods/invite_links/decline_all_chat_join_requests.py +55 -0
- pyrogram/methods/invite_links/decline_chat_join_request.py +57 -0
- pyrogram/methods/invite_links/delete_chat_admin_invite_links.py +54 -0
- pyrogram/methods/invite_links/delete_chat_invite_link.py +52 -0
- pyrogram/methods/invite_links/edit_chat_invite_link.py +92 -0
- pyrogram/methods/invite_links/export_chat_invite_link.py +65 -0
- pyrogram/methods/invite_links/get_chat_admin_invite_links.py +100 -0
- pyrogram/methods/invite_links/get_chat_admin_invite_links_count.py +62 -0
- pyrogram/methods/invite_links/get_chat_admins_with_invite_links.py +56 -0
- pyrogram/methods/invite_links/get_chat_invite_link.py +56 -0
- pyrogram/methods/invite_links/get_chat_invite_link_joiners.py +87 -0
- pyrogram/methods/invite_links/get_chat_invite_link_joiners_count.py +56 -0
- pyrogram/methods/invite_links/get_chat_join_requests.py +88 -0
- pyrogram/methods/invite_links/revoke_chat_invite_link.py +68 -0
- pyrogram/methods/messages/__init__.py +119 -0
- pyrogram/methods/messages/copy_media_group.py +140 -0
- pyrogram/methods/messages/copy_message.py +121 -0
- pyrogram/methods/messages/delete_messages.py +84 -0
- pyrogram/methods/messages/download_media.py +187 -0
- pyrogram/methods/messages/edit_inline_caption.py +65 -0
- pyrogram/methods/messages/edit_inline_media.py +244 -0
- pyrogram/methods/messages/edit_inline_reply_markup.py +69 -0
- pyrogram/methods/messages/edit_inline_text.py +88 -0
- pyrogram/methods/messages/edit_message_caption.py +76 -0
- pyrogram/methods/messages/edit_message_media.py +287 -0
- pyrogram/methods/messages/edit_message_reply_markup.py +77 -0
- pyrogram/methods/messages/edit_message_text.py +98 -0
- pyrogram/methods/messages/forward_messages.py +110 -0
- pyrogram/methods/messages/get_chat_history.py +121 -0
- pyrogram/methods/messages/get_chat_history_count.py +72 -0
- pyrogram/methods/messages/get_custom_emoji_stickers.py +55 -0
- pyrogram/methods/messages/get_discussion_message.py +65 -0
- pyrogram/methods/messages/get_discussion_replies.py +86 -0
- pyrogram/methods/messages/get_discussion_replies_count.py +62 -0
- pyrogram/methods/messages/get_media_group.py +73 -0
- pyrogram/methods/messages/get_messages.py +119 -0
- pyrogram/methods/messages/inline_session.py +64 -0
- pyrogram/methods/messages/read_chat_history.py +73 -0
- pyrogram/methods/messages/retract_vote.py +61 -0
- pyrogram/methods/messages/search_global.py +117 -0
- pyrogram/methods/messages/search_global_count.py +62 -0
- pyrogram/methods/messages/search_messages.py +151 -0
- pyrogram/methods/messages/search_messages_count.py +84 -0
- pyrogram/methods/messages/send_animation.py +271 -0
- pyrogram/methods/messages/send_audio.py +242 -0
- pyrogram/methods/messages/send_cached_media.py +124 -0
- pyrogram/methods/messages/send_chat_action.py +80 -0
- pyrogram/methods/messages/send_contact.py +121 -0
- pyrogram/methods/messages/send_dice.py +116 -0
- pyrogram/methods/messages/send_document.py +220 -0
- pyrogram/methods/messages/send_location.py +113 -0
- pyrogram/methods/messages/send_media_group.py +417 -0
- pyrogram/methods/messages/send_message.py +180 -0
- pyrogram/methods/messages/send_photo.py +204 -0
- pyrogram/methods/messages/send_poll.py +181 -0
- pyrogram/methods/messages/send_reaction.py +73 -0
- pyrogram/methods/messages/send_sticker.py +179 -0
- pyrogram/methods/messages/send_venue.py +137 -0
- pyrogram/methods/messages/send_video.py +261 -0
- pyrogram/methods/messages/send_video_note.py +203 -0
- pyrogram/methods/messages/send_voice.py +204 -0
- pyrogram/methods/messages/stop_poll.py +77 -0
- pyrogram/methods/messages/stream_media.py +106 -0
- pyrogram/methods/messages/vote_poll.py +69 -0
- pyrogram/methods/password/__init__.py +29 -0
- pyrogram/methods/password/change_cloud_password.py +82 -0
- pyrogram/methods/password/enable_cloud_password.py +88 -0
- pyrogram/methods/password/remove_cloud_password.py +64 -0
- pyrogram/methods/users/__init__.py +49 -0
- pyrogram/methods/users/block_user.py +54 -0
- pyrogram/methods/users/delete_profile_photos.py +63 -0
- pyrogram/methods/users/get_chat_photos.py +135 -0
- pyrogram/methods/users/get_chat_photos_count.py +74 -0
- pyrogram/methods/users/get_common_chats.py +67 -0
- pyrogram/methods/users/get_default_emoji_statuses.py +47 -0
- pyrogram/methods/users/get_me.py +49 -0
- pyrogram/methods/users/get_users.py +71 -0
- pyrogram/methods/users/set_emoji_status.py +58 -0
- pyrogram/methods/users/set_profile_photo.py +75 -0
- pyrogram/methods/users/set_username.py +57 -0
- pyrogram/methods/users/unblock_user.py +54 -0
- pyrogram/methods/users/update_profile.py +72 -0
- pyrogram/methods/utilities/__init__.py +39 -0
- pyrogram/methods/utilities/add_handler.py +67 -0
- pyrogram/methods/utilities/compose.py +78 -0
- pyrogram/methods/utilities/export_session_string.py +40 -0
- pyrogram/methods/utilities/idle.py +87 -0
- pyrogram/methods/utilities/remove_handler.py +63 -0
- pyrogram/methods/utilities/restart.py +72 -0
- pyrogram/methods/utilities/run.py +86 -0
- pyrogram/methods/utilities/start.py +76 -0
- pyrogram/methods/utilities/stop.py +69 -0
- pyrogram/methods/utilities/stop_transmission.py +43 -0
- pyrogram/mime_types.py +1881 -0
- pyrogram/parser/__init__.py +19 -0
- pyrogram/parser/html.py +243 -0
- pyrogram/parser/markdown.py +173 -0
- pyrogram/parser/parser.py +61 -0
- pyrogram/parser/utils.py +41 -0
- pyrogram/py.typed +0 -0
- pyrogram/raw/__init__.py +26 -0
- pyrogram/raw/all.py +1706 -0
- pyrogram/raw/base/__init__.py +310 -0
- pyrogram/raw/base/access_point_rule.py +53 -0
- pyrogram/raw/base/account/__init__.py +44 -0
- pyrogram/raw/base/account/authorization_form.py +63 -0
- pyrogram/raw/base/account/authorizations.py +63 -0
- pyrogram/raw/base/account/auto_download_settings.py +63 -0
- pyrogram/raw/base/account/auto_save_settings.py +63 -0
- pyrogram/raw/base/account/content_settings.py +63 -0
- pyrogram/raw/base/account/email_verified.py +64 -0
- pyrogram/raw/base/account/emoji_statuses.py +65 -0
- pyrogram/raw/base/account/password.py +63 -0
- pyrogram/raw/base/account/password_input_settings.py +53 -0
- pyrogram/raw/base/account/password_settings.py +63 -0
- pyrogram/raw/base/account/privacy_rules.py +64 -0
- pyrogram/raw/base/account/reset_password_result.py +65 -0
- pyrogram/raw/base/account/saved_ringtone.py +64 -0
- pyrogram/raw/base/account/saved_ringtones.py +64 -0
- pyrogram/raw/base/account/sent_email_code.py +63 -0
- pyrogram/raw/base/account/takeout.py +63 -0
- pyrogram/raw/base/account/themes.py +65 -0
- pyrogram/raw/base/account/tmp_password.py +63 -0
- pyrogram/raw/base/account/wall_papers.py +64 -0
- pyrogram/raw/base/account/web_authorizations.py +63 -0
- pyrogram/raw/base/account_days_ttl.py +63 -0
- pyrogram/raw/base/app_web_view_result.py +63 -0
- pyrogram/raw/base/attach_menu_bot.py +53 -0
- pyrogram/raw/base/attach_menu_bot_icon.py +53 -0
- pyrogram/raw/base/attach_menu_bot_icon_color.py +53 -0
- pyrogram/raw/base/attach_menu_bots.py +64 -0
- pyrogram/raw/base/attach_menu_bots_bot.py +63 -0
- pyrogram/raw/base/attach_menu_peer_type.py +57 -0
- pyrogram/raw/base/auth/__init__.py +32 -0
- pyrogram/raw/base/auth/authorization.py +70 -0
- pyrogram/raw/base/auth/code_type.py +57 -0
- pyrogram/raw/base/auth/exported_authorization.py +63 -0
- pyrogram/raw/base/auth/logged_out.py +63 -0
- pyrogram/raw/base/auth/login_token.py +66 -0
- pyrogram/raw/base/auth/password_recovery.py +63 -0
- pyrogram/raw/base/auth/sent_code.py +69 -0
- pyrogram/raw/base/auth/sent_code_type.py +61 -0
- pyrogram/raw/base/authorization.py +63 -0
- pyrogram/raw/base/auto_download_settings.py +53 -0
- pyrogram/raw/base/auto_save_exception.py +53 -0
- pyrogram/raw/base/auto_save_settings.py +53 -0
- pyrogram/raw/base/available_reaction.py +53 -0
- pyrogram/raw/base/bad_msg_notification.py +54 -0
- pyrogram/raw/base/bank_card_open_url.py +53 -0
- pyrogram/raw/base/base_theme.py +57 -0
- pyrogram/raw/base/bind_auth_key_inner.py +53 -0
- pyrogram/raw/base/bot_app.py +54 -0
- pyrogram/raw/base/bot_command.py +63 -0
- pyrogram/raw/base/bot_command_scope.py +59 -0
- pyrogram/raw/base/bot_info.py +53 -0
- pyrogram/raw/base/bot_inline_message.py +58 -0
- pyrogram/raw/base/bot_inline_result.py +54 -0
- pyrogram/raw/base/bot_menu_button.py +65 -0
- pyrogram/raw/base/bots/__init__.py +25 -0
- pyrogram/raw/base/bots/bot_info.py +63 -0
- pyrogram/raw/base/cdn_config.py +63 -0
- pyrogram/raw/base/cdn_public_key.py +53 -0
- pyrogram/raw/base/channel_admin_log_event.py +53 -0
- pyrogram/raw/base/channel_admin_log_event_action.py +95 -0
- pyrogram/raw/base/channel_admin_log_events_filter.py +53 -0
- pyrogram/raw/base/channel_location.py +54 -0
- pyrogram/raw/base/channel_messages_filter.py +54 -0
- pyrogram/raw/base/channel_participant.py +58 -0
- pyrogram/raw/base/channel_participants_filter.py +60 -0
- pyrogram/raw/base/channels/__init__.py +28 -0
- pyrogram/raw/base/channels/admin_log_results.py +63 -0
- pyrogram/raw/base/channels/channel_participant.py +63 -0
- pyrogram/raw/base/channels/channel_participants.py +64 -0
- pyrogram/raw/base/channels/send_as_peers.py +63 -0
- pyrogram/raw/base/chat.py +57 -0
- pyrogram/raw/base/chat_admin_rights.py +53 -0
- pyrogram/raw/base/chat_admin_with_invites.py +53 -0
- pyrogram/raw/base/chat_banned_rights.py +53 -0
- pyrogram/raw/base/chat_full.py +54 -0
- pyrogram/raw/base/chat_invite.py +65 -0
- pyrogram/raw/base/chat_invite_importer.py +53 -0
- pyrogram/raw/base/chat_onlines.py +63 -0
- pyrogram/raw/base/chat_participant.py +55 -0
- pyrogram/raw/base/chat_participants.py +54 -0
- pyrogram/raw/base/chat_photo.py +54 -0
- pyrogram/raw/base/chat_reactions.py +55 -0
- pyrogram/raw/base/chatlists/__init__.py +28 -0
- pyrogram/raw/base/chatlists/chatlist_invite.py +64 -0
- pyrogram/raw/base/chatlists/chatlist_updates.py +63 -0
- pyrogram/raw/base/chatlists/exported_chatlist_invite.py +63 -0
- pyrogram/raw/base/chatlists/exported_invites.py +63 -0
- pyrogram/raw/base/client_dh_inner_data.py +53 -0
- pyrogram/raw/base/code_settings.py +53 -0
- pyrogram/raw/base/config.py +63 -0
- pyrogram/raw/base/contact.py +53 -0
- pyrogram/raw/base/contact_status.py +63 -0
- pyrogram/raw/base/contacts/__init__.py +30 -0
- pyrogram/raw/base/contacts/blocked.py +64 -0
- pyrogram/raw/base/contacts/contacts.py +64 -0
- pyrogram/raw/base/contacts/found.py +63 -0
- pyrogram/raw/base/contacts/imported_contacts.py +63 -0
- pyrogram/raw/base/contacts/resolved_peer.py +64 -0
- pyrogram/raw/base/contacts/top_peers.py +65 -0
- pyrogram/raw/base/data_json.py +64 -0
- pyrogram/raw/base/dc_option.py +53 -0
- pyrogram/raw/base/default_history_ttl.py +63 -0
- pyrogram/raw/base/destroy_auth_key_res.py +65 -0
- pyrogram/raw/base/destroy_session_res.py +64 -0
- pyrogram/raw/base/dialog.py +54 -0
- pyrogram/raw/base/dialog_filter.py +65 -0
- pyrogram/raw/base/dialog_filter_suggested.py +63 -0
- pyrogram/raw/base/dialog_peer.py +64 -0
- pyrogram/raw/base/document.py +67 -0
- pyrogram/raw/base/document_attribute.py +60 -0
- pyrogram/raw/base/draft_message.py +54 -0
- pyrogram/raw/base/email_verification.py +55 -0
- pyrogram/raw/base/email_verify_purpose.py +55 -0
- pyrogram/raw/base/emoji_group.py +53 -0
- pyrogram/raw/base/emoji_keyword.py +54 -0
- pyrogram/raw/base/emoji_keywords_difference.py +64 -0
- pyrogram/raw/base/emoji_language.py +63 -0
- pyrogram/raw/base/emoji_list.py +66 -0
- pyrogram/raw/base/emoji_status.py +55 -0
- pyrogram/raw/base/emoji_url.py +63 -0
- pyrogram/raw/base/encrypted_chat.py +68 -0
- pyrogram/raw/base/encrypted_file.py +64 -0
- pyrogram/raw/base/encrypted_message.py +54 -0
- pyrogram/raw/base/exported_chat_invite.py +64 -0
- pyrogram/raw/base/exported_chatlist_invite.py +63 -0
- pyrogram/raw/base/exported_contact_token.py +63 -0
- pyrogram/raw/base/exported_message_link.py +63 -0
- pyrogram/raw/base/file_hash.py +65 -0
- pyrogram/raw/base/folder.py +53 -0
- pyrogram/raw/base/folder_peer.py +53 -0
- pyrogram/raw/base/forum_topic.py +54 -0
- pyrogram/raw/base/game.py +53 -0
- pyrogram/raw/base/geo_point.py +54 -0
- pyrogram/raw/base/global_privacy_settings.py +64 -0
- pyrogram/raw/base/group_call.py +54 -0
- pyrogram/raw/base/group_call_participant.py +53 -0
- pyrogram/raw/base/group_call_participant_video.py +53 -0
- pyrogram/raw/base/group_call_participant_video_source_group.py +53 -0
- pyrogram/raw/base/group_call_stream_channel.py +53 -0
- pyrogram/raw/base/help/__init__.py +41 -0
- pyrogram/raw/base/help/app_config.py +64 -0
- pyrogram/raw/base/help/app_update.py +64 -0
- pyrogram/raw/base/help/config_simple.py +53 -0
- pyrogram/raw/base/help/countries_list.py +64 -0
- pyrogram/raw/base/help/country.py +53 -0
- pyrogram/raw/base/help/country_code.py +53 -0
- pyrogram/raw/base/help/deep_link_info.py +64 -0
- pyrogram/raw/base/help/invite_text.py +63 -0
- pyrogram/raw/base/help/passport_config.py +64 -0
- pyrogram/raw/base/help/premium_promo.py +63 -0
- pyrogram/raw/base/help/promo_data.py +64 -0
- pyrogram/raw/base/help/recent_me_urls.py +63 -0
- pyrogram/raw/base/help/support.py +63 -0
- pyrogram/raw/base/help/support_name.py +63 -0
- pyrogram/raw/base/help/terms_of_service.py +53 -0
- pyrogram/raw/base/help/terms_of_service_update.py +64 -0
- pyrogram/raw/base/help/user_info.py +65 -0
- pyrogram/raw/base/high_score.py +53 -0
- pyrogram/raw/base/http_wait.py +53 -0
- pyrogram/raw/base/imported_contact.py +53 -0
- pyrogram/raw/base/inline_bot_switch_pm.py +53 -0
- pyrogram/raw/base/inline_bot_web_view.py +53 -0
- pyrogram/raw/base/inline_query_peer_type.py +58 -0
- pyrogram/raw/base/input_app_event.py +53 -0
- pyrogram/raw/base/input_bot_app.py +54 -0
- pyrogram/raw/base/input_bot_inline_message.py +59 -0
- pyrogram/raw/base/input_bot_inline_message_id.py +54 -0
- pyrogram/raw/base/input_bot_inline_result.py +56 -0
- pyrogram/raw/base/input_channel.py +55 -0
- pyrogram/raw/base/input_chat_photo.py +55 -0
- pyrogram/raw/base/input_chatlist.py +53 -0
- pyrogram/raw/base/input_check_password_srp.py +54 -0
- pyrogram/raw/base/input_client_proxy.py +53 -0
- pyrogram/raw/base/input_contact.py +53 -0
- pyrogram/raw/base/input_dialog_peer.py +54 -0
- pyrogram/raw/base/input_document.py +54 -0
- pyrogram/raw/base/input_encrypted_chat.py +53 -0
- pyrogram/raw/base/input_encrypted_file.py +56 -0
- pyrogram/raw/base/input_file.py +54 -0
- pyrogram/raw/base/input_file_location.py +62 -0
- pyrogram/raw/base/input_folder_peer.py +53 -0
- pyrogram/raw/base/input_game.py +54 -0
- pyrogram/raw/base/input_geo_point.py +54 -0
- pyrogram/raw/base/input_group_call.py +53 -0
- pyrogram/raw/base/input_invoice.py +54 -0
- pyrogram/raw/base/input_media.py +67 -0
- pyrogram/raw/base/input_message.py +56 -0
- pyrogram/raw/base/input_notify_peer.py +57 -0
- pyrogram/raw/base/input_payment_credentials.py +56 -0
- pyrogram/raw/base/input_peer.py +59 -0
- pyrogram/raw/base/input_peer_notify_settings.py +53 -0
- pyrogram/raw/base/input_phone_call.py +53 -0
- pyrogram/raw/base/input_photo.py +54 -0
- pyrogram/raw/base/input_privacy_key.py +61 -0
- pyrogram/raw/base/input_privacy_rule.py +60 -0
- pyrogram/raw/base/input_secure_file.py +54 -0
- pyrogram/raw/base/input_secure_value.py +53 -0
- pyrogram/raw/base/input_single_media.py +53 -0
- pyrogram/raw/base/input_sticker_set.py +62 -0
- pyrogram/raw/base/input_sticker_set_item.py +53 -0
- pyrogram/raw/base/input_stickered_media.py +54 -0
- pyrogram/raw/base/input_store_payment_purpose.py +54 -0
- pyrogram/raw/base/input_theme.py +54 -0
- pyrogram/raw/base/input_theme_settings.py +53 -0
- pyrogram/raw/base/input_user.py +56 -0
- pyrogram/raw/base/input_wall_paper.py +55 -0
- pyrogram/raw/base/input_web_document.py +53 -0
- pyrogram/raw/base/input_web_file_location.py +55 -0
- pyrogram/raw/base/invoice.py +53 -0
- pyrogram/raw/base/ip_port.py +54 -0
- pyrogram/raw/base/json_object_value.py +53 -0
- pyrogram/raw/base/json_value.py +58 -0
- pyrogram/raw/base/keyboard_button.py +68 -0
- pyrogram/raw/base/keyboard_button_row.py +53 -0
- pyrogram/raw/base/labeled_price.py +53 -0
- pyrogram/raw/base/lang_pack_difference.py +64 -0
- pyrogram/raw/base/lang_pack_language.py +64 -0
- pyrogram/raw/base/lang_pack_string.py +65 -0
- pyrogram/raw/base/mask_coords.py +53 -0
- pyrogram/raw/base/message.py +55 -0
- pyrogram/raw/base/message_action.py +91 -0
- pyrogram/raw/base/message_entity.py +73 -0
- pyrogram/raw/base/message_extended_media.py +54 -0
- pyrogram/raw/base/message_fwd_header.py +53 -0
- pyrogram/raw/base/message_interaction_counters.py +53 -0
- pyrogram/raw/base/message_media.py +77 -0
- pyrogram/raw/base/message_peer_reaction.py +53 -0
- pyrogram/raw/base/message_range.py +63 -0
- pyrogram/raw/base/message_reactions.py +53 -0
- pyrogram/raw/base/message_replies.py +53 -0
- pyrogram/raw/base/message_reply_header.py +53 -0
- pyrogram/raw/base/message_user_vote.py +55 -0
- pyrogram/raw/base/message_views.py +53 -0
- pyrogram/raw/base/messages/__init__.py +72 -0
- pyrogram/raw/base/messages/affected_found_messages.py +63 -0
- pyrogram/raw/base/messages/affected_history.py +68 -0
- pyrogram/raw/base/messages/affected_messages.py +66 -0
- pyrogram/raw/base/messages/all_stickers.py +66 -0
- pyrogram/raw/base/messages/archived_stickers.py +63 -0
- pyrogram/raw/base/messages/available_reactions.py +64 -0
- pyrogram/raw/base/messages/bot_app.py +63 -0
- pyrogram/raw/base/messages/bot_callback_answer.py +63 -0
- pyrogram/raw/base/messages/bot_results.py +63 -0
- pyrogram/raw/base/messages/chat_admins_with_invites.py +63 -0
- pyrogram/raw/base/messages/chat_full.py +64 -0
- pyrogram/raw/base/messages/chat_invite_importers.py +63 -0
- pyrogram/raw/base/messages/chats.py +70 -0
- pyrogram/raw/base/messages/checked_history_import_peer.py +63 -0
- pyrogram/raw/base/messages/dh_config.py +64 -0
- pyrogram/raw/base/messages/dialogs.py +65 -0
- pyrogram/raw/base/messages/discussion_message.py +63 -0
- pyrogram/raw/base/messages/emoji_groups.py +66 -0
- pyrogram/raw/base/messages/exported_chat_invite.py +65 -0
- pyrogram/raw/base/messages/exported_chat_invites.py +63 -0
- pyrogram/raw/base/messages/faved_stickers.py +64 -0
- pyrogram/raw/base/messages/featured_stickers.py +66 -0
- pyrogram/raw/base/messages/forum_topics.py +64 -0
- pyrogram/raw/base/messages/found_sticker_sets.py +64 -0
- pyrogram/raw/base/messages/high_scores.py +64 -0
- pyrogram/raw/base/messages/history_import.py +63 -0
- pyrogram/raw/base/messages/history_import_parsed.py +63 -0
- pyrogram/raw/base/messages/inactive_chats.py +63 -0
- pyrogram/raw/base/messages/message_edit_data.py +63 -0
- pyrogram/raw/base/messages/message_reactions_list.py +63 -0
- pyrogram/raw/base/messages/message_views.py +63 -0
- pyrogram/raw/base/messages/messages.py +78 -0
- pyrogram/raw/base/messages/peer_dialogs.py +64 -0
- pyrogram/raw/base/messages/peer_settings.py +63 -0
- pyrogram/raw/base/messages/reactions.py +65 -0
- pyrogram/raw/base/messages/recent_stickers.py +64 -0
- pyrogram/raw/base/messages/saved_gifs.py +64 -0
- pyrogram/raw/base/messages/search_counter.py +63 -0
- pyrogram/raw/base/messages/search_results_calendar.py +63 -0
- pyrogram/raw/base/messages/search_results_positions.py +63 -0
- pyrogram/raw/base/messages/sent_encrypted_message.py +66 -0
- pyrogram/raw/base/messages/sponsored_messages.py +64 -0
- pyrogram/raw/base/messages/sticker_set.py +71 -0
- pyrogram/raw/base/messages/sticker_set_install_result.py +64 -0
- pyrogram/raw/base/messages/stickers.py +64 -0
- pyrogram/raw/base/messages/transcribed_audio.py +63 -0
- pyrogram/raw/base/messages/translated_text.py +63 -0
- pyrogram/raw/base/messages/votes_list.py +63 -0
- pyrogram/raw/base/messages_filter.py +69 -0
- pyrogram/raw/base/msg_detailed_info.py +54 -0
- pyrogram/raw/base/msg_resend_req.py +54 -0
- pyrogram/raw/base/msgs_ack.py +53 -0
- pyrogram/raw/base/msgs_all_info.py +53 -0
- pyrogram/raw/base/msgs_state_info.py +53 -0
- pyrogram/raw/base/msgs_state_req.py +53 -0
- pyrogram/raw/base/nearest_dc.py +63 -0
- pyrogram/raw/base/new_session.py +53 -0
- pyrogram/raw/base/notification_sound.py +56 -0
- pyrogram/raw/base/notify_peer.py +57 -0
- pyrogram/raw/base/page.py +53 -0
- pyrogram/raw/base/page_block.py +81 -0
- pyrogram/raw/base/page_caption.py +53 -0
- pyrogram/raw/base/page_list_item.py +54 -0
- pyrogram/raw/base/page_list_ordered_item.py +54 -0
- pyrogram/raw/base/page_related_article.py +53 -0
- pyrogram/raw/base/page_table_cell.py +53 -0
- pyrogram/raw/base/page_table_row.py +53 -0
- pyrogram/raw/base/password_kdf_algo.py +54 -0
- pyrogram/raw/base/payment_charge.py +53 -0
- pyrogram/raw/base/payment_form_method.py +53 -0
- pyrogram/raw/base/payment_requested_info.py +53 -0
- pyrogram/raw/base/payment_saved_credentials.py +53 -0
- pyrogram/raw/base/payments/__init__.py +31 -0
- pyrogram/raw/base/payments/bank_card_data.py +63 -0
- pyrogram/raw/base/payments/exported_invoice.py +63 -0
- pyrogram/raw/base/payments/payment_form.py +63 -0
- pyrogram/raw/base/payments/payment_receipt.py +63 -0
- pyrogram/raw/base/payments/payment_result.py +64 -0
- pyrogram/raw/base/payments/saved_info.py +63 -0
- pyrogram/raw/base/payments/validated_requested_info.py +63 -0
- pyrogram/raw/base/peer.py +65 -0
- pyrogram/raw/base/peer_blocked.py +53 -0
- pyrogram/raw/base/peer_located.py +54 -0
- pyrogram/raw/base/peer_notify_settings.py +63 -0
- pyrogram/raw/base/peer_settings.py +53 -0
- pyrogram/raw/base/phone/__init__.py +31 -0
- pyrogram/raw/base/phone/exported_group_call_invite.py +63 -0
- pyrogram/raw/base/phone/group_call.py +63 -0
- pyrogram/raw/base/phone/group_call_stream_channels.py +63 -0
- pyrogram/raw/base/phone/group_call_stream_rtmp_url.py +63 -0
- pyrogram/raw/base/phone/group_participants.py +63 -0
- pyrogram/raw/base/phone/join_as_peers.py +63 -0
- pyrogram/raw/base/phone/phone_call.py +65 -0
- pyrogram/raw/base/phone_call.py +58 -0
- pyrogram/raw/base/phone_call_discard_reason.py +56 -0
- pyrogram/raw/base/phone_call_protocol.py +53 -0
- pyrogram/raw/base/phone_connection.py +54 -0
- pyrogram/raw/base/photo.py +54 -0
- pyrogram/raw/base/photo_size.py +58 -0
- pyrogram/raw/base/photos/__init__.py +26 -0
- pyrogram/raw/base/photos/photo.py +65 -0
- pyrogram/raw/base/photos/photos.py +64 -0
- pyrogram/raw/base/poll.py +53 -0
- pyrogram/raw/base/poll_answer.py +53 -0
- pyrogram/raw/base/poll_answer_voters.py +53 -0
- pyrogram/raw/base/poll_results.py +53 -0
- pyrogram/raw/base/pong.py +64 -0
- pyrogram/raw/base/popular_contact.py +53 -0
- pyrogram/raw/base/post_address.py +53 -0
- pyrogram/raw/base/pq_inner_data.py +56 -0
- pyrogram/raw/base/premium_gift_option.py +53 -0
- pyrogram/raw/base/premium_subscription_option.py +53 -0
- pyrogram/raw/base/privacy_key.py +61 -0
- pyrogram/raw/base/privacy_rule.py +60 -0
- pyrogram/raw/base/reaction.py +55 -0
- pyrogram/raw/base/reaction_count.py +53 -0
- pyrogram/raw/base/read_participant_date.py +63 -0
- pyrogram/raw/base/received_notify_message.py +63 -0
- pyrogram/raw/base/recent_me_url.py +57 -0
- pyrogram/raw/base/reply_markup.py +56 -0
- pyrogram/raw/base/report_reason.py +62 -0
- pyrogram/raw/base/request_peer_type.py +55 -0
- pyrogram/raw/base/res_pq.py +64 -0
- pyrogram/raw/base/restriction_reason.py +53 -0
- pyrogram/raw/base/rich_text.py +68 -0
- pyrogram/raw/base/rpc_drop_answer.py +65 -0
- pyrogram/raw/base/rpc_error.py +53 -0
- pyrogram/raw/base/rpc_result.py +53 -0
- pyrogram/raw/base/saved_contact.py +63 -0
- pyrogram/raw/base/search_results_calendar_period.py +53 -0
- pyrogram/raw/base/search_results_position.py +53 -0
- pyrogram/raw/base/secure_credentials_encrypted.py +53 -0
- pyrogram/raw/base/secure_data.py +53 -0
- pyrogram/raw/base/secure_file.py +54 -0
- pyrogram/raw/base/secure_password_kdf_algo.py +55 -0
- pyrogram/raw/base/secure_plain_data.py +54 -0
- pyrogram/raw/base/secure_required_type.py +54 -0
- pyrogram/raw/base/secure_secret_settings.py +53 -0
- pyrogram/raw/base/secure_value.py +65 -0
- pyrogram/raw/base/secure_value_error.py +61 -0
- pyrogram/raw/base/secure_value_hash.py +53 -0
- pyrogram/raw/base/secure_value_type.py +65 -0
- pyrogram/raw/base/send_as_peer.py +53 -0
- pyrogram/raw/base/send_message_action.py +70 -0
- pyrogram/raw/base/server_dh_inner_data.py +53 -0
- pyrogram/raw/base/server_dh_params.py +64 -0
- pyrogram/raw/base/set_client_dh_params_answer.py +65 -0
- pyrogram/raw/base/shipping_option.py +53 -0
- pyrogram/raw/base/simple_web_view_result.py +63 -0
- pyrogram/raw/base/sponsored_message.py +53 -0
- pyrogram/raw/base/stats/__init__.py +27 -0
- pyrogram/raw/base/stats/broadcast_stats.py +63 -0
- pyrogram/raw/base/stats/megagroup_stats.py +63 -0
- pyrogram/raw/base/stats/message_stats.py +63 -0
- pyrogram/raw/base/stats_abs_value_and_prev.py +53 -0
- pyrogram/raw/base/stats_date_range_days.py +53 -0
- pyrogram/raw/base/stats_graph.py +65 -0
- pyrogram/raw/base/stats_group_top_admin.py +53 -0
- pyrogram/raw/base/stats_group_top_inviter.py +53 -0
- pyrogram/raw/base/stats_group_top_poster.py +53 -0
- pyrogram/raw/base/stats_percent_value.py +53 -0
- pyrogram/raw/base/stats_url.py +53 -0
- pyrogram/raw/base/sticker_keyword.py +53 -0
- pyrogram/raw/base/sticker_pack.py +53 -0
- pyrogram/raw/base/sticker_set.py +53 -0
- pyrogram/raw/base/sticker_set_covered.py +66 -0
- pyrogram/raw/base/stickers/__init__.py +25 -0
- pyrogram/raw/base/stickers/suggested_short_name.py +63 -0
- pyrogram/raw/base/storage/__init__.py +25 -0
- pyrogram/raw/base/storage/file_type.py +62 -0
- pyrogram/raw/base/text_with_entities.py +53 -0
- pyrogram/raw/base/theme.py +65 -0
- pyrogram/raw/base/theme_settings.py +53 -0
- pyrogram/raw/base/top_peer.py +53 -0
- pyrogram/raw/base/top_peer_category.py +60 -0
- pyrogram/raw/base/top_peer_category_peers.py +53 -0
- pyrogram/raw/base/update.py +163 -0
- pyrogram/raw/base/updates/__init__.py +27 -0
- pyrogram/raw/base/updates/channel_difference.py +65 -0
- pyrogram/raw/base/updates/difference.py +66 -0
- pyrogram/raw/base/updates/state.py +63 -0
- pyrogram/raw/base/updates_t.py +155 -0
- pyrogram/raw/base/upload/__init__.py +27 -0
- pyrogram/raw/base/upload/cdn_file.py +64 -0
- pyrogram/raw/base/upload/file.py +64 -0
- pyrogram/raw/base/upload/web_file.py +63 -0
- pyrogram/raw/base/url_auth_result.py +66 -0
- pyrogram/raw/base/user.py +68 -0
- pyrogram/raw/base/user_full.py +53 -0
- pyrogram/raw/base/user_profile_photo.py +54 -0
- pyrogram/raw/base/user_status.py +58 -0
- pyrogram/raw/base/username.py +53 -0
- pyrogram/raw/base/users/__init__.py +25 -0
- pyrogram/raw/base/users/user_full.py +63 -0
- pyrogram/raw/base/video_size.py +55 -0
- pyrogram/raw/base/wall_paper.py +66 -0
- pyrogram/raw/base/wall_paper_settings.py +53 -0
- pyrogram/raw/base/web_authorization.py +53 -0
- pyrogram/raw/base/web_document.py +54 -0
- pyrogram/raw/base/web_page.py +66 -0
- pyrogram/raw/base/web_page_attribute.py +53 -0
- pyrogram/raw/base/web_view_message_sent.py +63 -0
- pyrogram/raw/base/web_view_result.py +63 -0
- pyrogram/raw/core/__init__.py +31 -0
- pyrogram/raw/core/future_salt.py +53 -0
- pyrogram/raw/core/future_salts.py +63 -0
- pyrogram/raw/core/gzip_packed.py +62 -0
- pyrogram/raw/core/list.py +26 -0
- pyrogram/raw/core/message.py +56 -0
- pyrogram/raw/core/msg_container.py +53 -0
- pyrogram/raw/core/primitives/__init__.py +24 -0
- pyrogram/raw/core/primitives/bool.py +48 -0
- pyrogram/raw/core/primitives/bytes.py +55 -0
- pyrogram/raw/core/primitives/double.py +32 -0
- pyrogram/raw/core/primitives/int.py +45 -0
- pyrogram/raw/core/primitives/string.py +31 -0
- pyrogram/raw/core/primitives/vector.py +59 -0
- pyrogram/raw/core/tl_object.py +82 -0
- pyrogram/raw/functions/__init__.py +42 -0
- pyrogram/raw/functions/account/__init__.py +111 -0
- pyrogram/raw/functions/account/accept_authorization.py +104 -0
- pyrogram/raw/functions/account/cancel_password_email.py +67 -0
- pyrogram/raw/functions/account/change_authorization_settings.py +92 -0
- pyrogram/raw/functions/account/change_phone.py +88 -0
- pyrogram/raw/functions/account/check_username.py +72 -0
- pyrogram/raw/functions/account/clear_recent_emoji_statuses.py +67 -0
- pyrogram/raw/functions/account/confirm_password_email.py +72 -0
- pyrogram/raw/functions/account/confirm_phone.py +80 -0
- pyrogram/raw/functions/account/create_theme.py +102 -0
- pyrogram/raw/functions/account/decline_password_reset.py +67 -0
- pyrogram/raw/functions/account/delete_account.py +84 -0
- pyrogram/raw/functions/account/delete_auto_save_exceptions.py +67 -0
- pyrogram/raw/functions/account/delete_secure_value.py +72 -0
- pyrogram/raw/functions/account/finish_takeout_session.py +72 -0
- pyrogram/raw/functions/account/get_account_ttl.py +67 -0
- pyrogram/raw/functions/account/get_all_secure_values.py +67 -0
- pyrogram/raw/functions/account/get_authorization_form.py +88 -0
- pyrogram/raw/functions/account/get_authorizations.py +67 -0
- pyrogram/raw/functions/account/get_auto_download_settings.py +67 -0
- pyrogram/raw/functions/account/get_auto_save_settings.py +67 -0
- pyrogram/raw/functions/account/get_chat_themes.py +72 -0
- pyrogram/raw/functions/account/get_contact_sign_up_notification.py +67 -0
- pyrogram/raw/functions/account/get_content_settings.py +67 -0
- pyrogram/raw/functions/account/get_default_emoji_statuses.py +72 -0
- pyrogram/raw/functions/account/get_default_group_photo_emojis.py +72 -0
- pyrogram/raw/functions/account/get_default_profile_photo_emojis.py +72 -0
- pyrogram/raw/functions/account/get_global_privacy_settings.py +67 -0
- pyrogram/raw/functions/account/get_multi_wall_papers.py +72 -0
- pyrogram/raw/functions/account/get_notify_exceptions.py +82 -0
- pyrogram/raw/functions/account/get_notify_settings.py +72 -0
- pyrogram/raw/functions/account/get_password.py +67 -0
- pyrogram/raw/functions/account/get_password_settings.py +72 -0
- pyrogram/raw/functions/account/get_privacy.py +72 -0
- pyrogram/raw/functions/account/get_recent_emoji_statuses.py +72 -0
- pyrogram/raw/functions/account/get_saved_ringtones.py +72 -0
- pyrogram/raw/functions/account/get_secure_value.py +72 -0
- pyrogram/raw/functions/account/get_theme.py +80 -0
- pyrogram/raw/functions/account/get_themes.py +80 -0
- pyrogram/raw/functions/account/get_tmp_password.py +80 -0
- pyrogram/raw/functions/account/get_wall_paper.py +72 -0
- pyrogram/raw/functions/account/get_wall_papers.py +72 -0
- pyrogram/raw/functions/account/get_web_authorizations.py +67 -0
- pyrogram/raw/functions/account/init_takeout_session.py +111 -0
- pyrogram/raw/functions/account/install_theme.py +101 -0
- pyrogram/raw/functions/account/install_wall_paper.py +80 -0
- pyrogram/raw/functions/account/register_device.py +112 -0
- pyrogram/raw/functions/account/reorder_usernames.py +72 -0
- pyrogram/raw/functions/account/report_peer.py +88 -0
- pyrogram/raw/functions/account/report_profile_photo.py +96 -0
- pyrogram/raw/functions/account/resend_password_email.py +67 -0
- pyrogram/raw/functions/account/reset_authorization.py +72 -0
- pyrogram/raw/functions/account/reset_notify_settings.py +67 -0
- pyrogram/raw/functions/account/reset_password.py +67 -0
- pyrogram/raw/functions/account/reset_wall_papers.py +67 -0
- pyrogram/raw/functions/account/reset_web_authorization.py +72 -0
- pyrogram/raw/functions/account/reset_web_authorizations.py +67 -0
- pyrogram/raw/functions/account/save_auto_download_settings.py +86 -0
- pyrogram/raw/functions/account/save_auto_save_settings.py +102 -0
- pyrogram/raw/functions/account/save_ringtone.py +80 -0
- pyrogram/raw/functions/account/save_secure_value.py +80 -0
- pyrogram/raw/functions/account/save_theme.py +80 -0
- pyrogram/raw/functions/account/save_wall_paper.py +88 -0
- pyrogram/raw/functions/account/send_change_phone_code.py +80 -0
- pyrogram/raw/functions/account/send_confirm_phone_code.py +80 -0
- pyrogram/raw/functions/account/send_verify_email_code.py +80 -0
- pyrogram/raw/functions/account/send_verify_phone_code.py +80 -0
- pyrogram/raw/functions/account/set_account_ttl.py +72 -0
- pyrogram/raw/functions/account/set_authorization_ttl.py +72 -0
- pyrogram/raw/functions/account/set_contact_sign_up_notification.py +72 -0
- pyrogram/raw/functions/account/set_content_settings.py +72 -0
- pyrogram/raw/functions/account/set_global_privacy_settings.py +72 -0
- pyrogram/raw/functions/account/set_privacy.py +80 -0
- pyrogram/raw/functions/account/toggle_username.py +80 -0
- pyrogram/raw/functions/account/unregister_device.py +88 -0
- pyrogram/raw/functions/account/update_device_locked.py +72 -0
- pyrogram/raw/functions/account/update_emoji_status.py +72 -0
- pyrogram/raw/functions/account/update_notify_settings.py +80 -0
- pyrogram/raw/functions/account/update_password_settings.py +80 -0
- pyrogram/raw/functions/account/update_profile.py +93 -0
- pyrogram/raw/functions/account/update_status.py +72 -0
- pyrogram/raw/functions/account/update_theme.py +120 -0
- pyrogram/raw/functions/account/update_username.py +72 -0
- pyrogram/raw/functions/account/upload_ringtone.py +88 -0
- pyrogram/raw/functions/account/upload_theme.py +100 -0
- pyrogram/raw/functions/account/upload_wall_paper.py +96 -0
- pyrogram/raw/functions/account/verify_email.py +80 -0
- pyrogram/raw/functions/account/verify_phone.py +88 -0
- pyrogram/raw/functions/auth/__init__.py +46 -0
- pyrogram/raw/functions/auth/accept_login_token.py +72 -0
- pyrogram/raw/functions/auth/bind_temp_auth_key.py +96 -0
- pyrogram/raw/functions/auth/cancel_code.py +80 -0
- pyrogram/raw/functions/auth/check_password.py +72 -0
- pyrogram/raw/functions/auth/check_recovery_password.py +72 -0
- pyrogram/raw/functions/auth/drop_temp_auth_keys.py +72 -0
- pyrogram/raw/functions/auth/export_authorization.py +72 -0
- pyrogram/raw/functions/auth/export_login_token.py +88 -0
- pyrogram/raw/functions/auth/import_authorization.py +80 -0
- pyrogram/raw/functions/auth/import_bot_authorization.py +96 -0
- pyrogram/raw/functions/auth/import_login_token.py +72 -0
- pyrogram/raw/functions/auth/import_web_token_authorization.py +88 -0
- pyrogram/raw/functions/auth/log_out.py +67 -0
- pyrogram/raw/functions/auth/recover_password.py +84 -0
- pyrogram/raw/functions/auth/request_firebase_sms.py +100 -0
- pyrogram/raw/functions/auth/request_password_recovery.py +67 -0
- pyrogram/raw/functions/auth/resend_code.py +80 -0
- pyrogram/raw/functions/auth/reset_authorizations.py +67 -0
- pyrogram/raw/functions/auth/reset_login_email.py +80 -0
- pyrogram/raw/functions/auth/send_code.py +96 -0
- pyrogram/raw/functions/auth/sign_in.py +101 -0
- pyrogram/raw/functions/auth/sign_up.py +96 -0
- pyrogram/raw/functions/bots/__init__.py +37 -0
- pyrogram/raw/functions/bots/answer_webhook_json_query.py +80 -0
- pyrogram/raw/functions/bots/get_bot_commands.py +80 -0
- pyrogram/raw/functions/bots/get_bot_info.py +84 -0
- pyrogram/raw/functions/bots/get_bot_menu_button.py +72 -0
- pyrogram/raw/functions/bots/reorder_usernames.py +80 -0
- pyrogram/raw/functions/bots/reset_bot_commands.py +80 -0
- pyrogram/raw/functions/bots/send_custom_request.py +80 -0
- pyrogram/raw/functions/bots/set_bot_broadcast_default_admin_rights.py +72 -0
- pyrogram/raw/functions/bots/set_bot_commands.py +88 -0
- pyrogram/raw/functions/bots/set_bot_group_default_admin_rights.py +72 -0
- pyrogram/raw/functions/bots/set_bot_info.py +111 -0
- pyrogram/raw/functions/bots/set_bot_menu_button.py +80 -0
- pyrogram/raw/functions/bots/toggle_username.py +88 -0
- pyrogram/raw/functions/channels/__init__.py +79 -0
- pyrogram/raw/functions/channels/check_username.py +80 -0
- pyrogram/raw/functions/channels/convert_to_gigagroup.py +72 -0
- pyrogram/raw/functions/channels/create_channel.py +134 -0
- pyrogram/raw/functions/channels/create_forum_topic.py +118 -0
- pyrogram/raw/functions/channels/deactivate_all_usernames.py +72 -0
- pyrogram/raw/functions/channels/delete_channel.py +72 -0
- pyrogram/raw/functions/channels/delete_history.py +88 -0
- pyrogram/raw/functions/channels/delete_messages.py +80 -0
- pyrogram/raw/functions/channels/delete_participant_history.py +80 -0
- pyrogram/raw/functions/channels/delete_topic_history.py +80 -0
- pyrogram/raw/functions/channels/edit_admin.py +96 -0
- pyrogram/raw/functions/channels/edit_banned.py +88 -0
- pyrogram/raw/functions/channels/edit_creator.py +88 -0
- pyrogram/raw/functions/channels/edit_forum_topic.py +118 -0
- pyrogram/raw/functions/channels/edit_location.py +88 -0
- pyrogram/raw/functions/channels/edit_photo.py +80 -0
- pyrogram/raw/functions/channels/edit_title.py +80 -0
- pyrogram/raw/functions/channels/export_message_link.py +94 -0
- pyrogram/raw/functions/channels/get_admin_log.py +126 -0
- pyrogram/raw/functions/channels/get_admined_public_channels.py +78 -0
- pyrogram/raw/functions/channels/get_channels.py +72 -0
- pyrogram/raw/functions/channels/get_forum_topics.py +115 -0
- pyrogram/raw/functions/channels/get_forum_topics_by_id.py +80 -0
- pyrogram/raw/functions/channels/get_full_channel.py +72 -0
- pyrogram/raw/functions/channels/get_groups_for_discussion.py +67 -0
- pyrogram/raw/functions/channels/get_inactive_channels.py +67 -0
- pyrogram/raw/functions/channels/get_left_channels.py +72 -0
- pyrogram/raw/functions/channels/get_messages.py +80 -0
- pyrogram/raw/functions/channels/get_participant.py +80 -0
- pyrogram/raw/functions/channels/get_participants.py +104 -0
- pyrogram/raw/functions/channels/get_send_as.py +72 -0
- pyrogram/raw/functions/channels/get_sponsored_messages.py +72 -0
- pyrogram/raw/functions/channels/invite_to_channel.py +80 -0
- pyrogram/raw/functions/channels/join_channel.py +72 -0
- pyrogram/raw/functions/channels/leave_channel.py +72 -0
- pyrogram/raw/functions/channels/read_history.py +80 -0
- pyrogram/raw/functions/channels/read_message_contents.py +80 -0
- pyrogram/raw/functions/channels/reorder_pinned_forum_topics.py +88 -0
- pyrogram/raw/functions/channels/reorder_usernames.py +80 -0
- pyrogram/raw/functions/channels/report_anti_spam_false_positive.py +80 -0
- pyrogram/raw/functions/channels/report_spam.py +88 -0
- pyrogram/raw/functions/channels/set_discussion_group.py +80 -0
- pyrogram/raw/functions/channels/set_stickers.py +80 -0
- pyrogram/raw/functions/channels/toggle_anti_spam.py +80 -0
- pyrogram/raw/functions/channels/toggle_forum.py +80 -0
- pyrogram/raw/functions/channels/toggle_join_request.py +80 -0
- pyrogram/raw/functions/channels/toggle_join_to_send.py +80 -0
- pyrogram/raw/functions/channels/toggle_participants_hidden.py +80 -0
- pyrogram/raw/functions/channels/toggle_pre_history_hidden.py +80 -0
- pyrogram/raw/functions/channels/toggle_signatures.py +80 -0
- pyrogram/raw/functions/channels/toggle_slow_mode.py +80 -0
- pyrogram/raw/functions/channels/toggle_username.py +88 -0
- pyrogram/raw/functions/channels/update_pinned_forum_topic.py +88 -0
- pyrogram/raw/functions/channels/update_username.py +80 -0
- pyrogram/raw/functions/channels/view_sponsored_message.py +80 -0
- pyrogram/raw/functions/chatlists/__init__.py +35 -0
- pyrogram/raw/functions/chatlists/check_chatlist_invite.py +72 -0
- pyrogram/raw/functions/chatlists/delete_exported_invite.py +80 -0
- pyrogram/raw/functions/chatlists/edit_exported_invite.py +101 -0
- pyrogram/raw/functions/chatlists/export_chatlist_invite.py +88 -0
- pyrogram/raw/functions/chatlists/get_chatlist_updates.py +72 -0
- pyrogram/raw/functions/chatlists/get_exported_invites.py +72 -0
- pyrogram/raw/functions/chatlists/get_leave_chatlist_suggestions.py +72 -0
- pyrogram/raw/functions/chatlists/hide_chatlist_updates.py +72 -0
- pyrogram/raw/functions/chatlists/join_chatlist_invite.py +80 -0
- pyrogram/raw/functions/chatlists/join_chatlist_updates.py +80 -0
- pyrogram/raw/functions/chatlists/leave_chatlist.py +80 -0
- pyrogram/raw/functions/contacts/__init__.py +47 -0
- pyrogram/raw/functions/contacts/accept_contact.py +72 -0
- pyrogram/raw/functions/contacts/add_contact.py +104 -0
- pyrogram/raw/functions/contacts/block.py +72 -0
- pyrogram/raw/functions/contacts/block_from_replies.py +92 -0
- pyrogram/raw/functions/contacts/delete_by_phones.py +72 -0
- pyrogram/raw/functions/contacts/delete_contacts.py +72 -0
- pyrogram/raw/functions/contacts/export_contact_token.py +67 -0
- pyrogram/raw/functions/contacts/get_blocked.py +80 -0
- pyrogram/raw/functions/contacts/get_contact_i_ds.py +72 -0
- pyrogram/raw/functions/contacts/get_contacts.py +72 -0
- pyrogram/raw/functions/contacts/get_located.py +89 -0
- pyrogram/raw/functions/contacts/get_saved.py +67 -0
- pyrogram/raw/functions/contacts/get_statuses.py +67 -0
- pyrogram/raw/functions/contacts/get_top_peers.py +138 -0
- pyrogram/raw/functions/contacts/import_contact_token.py +72 -0
- pyrogram/raw/functions/contacts/import_contacts.py +72 -0
- pyrogram/raw/functions/contacts/reset_saved.py +67 -0
- pyrogram/raw/functions/contacts/reset_top_peer_rating.py +80 -0
- pyrogram/raw/functions/contacts/resolve_phone.py +72 -0
- pyrogram/raw/functions/contacts/resolve_username.py +72 -0
- pyrogram/raw/functions/contacts/search.py +80 -0
- pyrogram/raw/functions/contacts/toggle_top_peers.py +72 -0
- pyrogram/raw/functions/contacts/unblock.py +72 -0
- pyrogram/raw/functions/contest/__init__.py +25 -0
- pyrogram/raw/functions/contest/save_developer_info.py +104 -0
- pyrogram/raw/functions/destroy_auth_key.py +67 -0
- pyrogram/raw/functions/destroy_session.py +72 -0
- pyrogram/raw/functions/folders/__init__.py +25 -0
- pyrogram/raw/functions/folders/edit_peer_folders.py +72 -0
- pyrogram/raw/functions/get_future_salts.py +72 -0
- pyrogram/raw/functions/help/__init__.py +47 -0
- pyrogram/raw/functions/help/accept_terms_of_service.py +72 -0
- pyrogram/raw/functions/help/dismiss_suggestion.py +80 -0
- pyrogram/raw/functions/help/edit_user_info.py +88 -0
- pyrogram/raw/functions/help/get_app_changelog.py +72 -0
- pyrogram/raw/functions/help/get_app_config.py +72 -0
- pyrogram/raw/functions/help/get_app_update.py +72 -0
- pyrogram/raw/functions/help/get_cdn_config.py +67 -0
- pyrogram/raw/functions/help/get_config.py +67 -0
- pyrogram/raw/functions/help/get_countries_list.py +80 -0
- pyrogram/raw/functions/help/get_deep_link_info.py +72 -0
- pyrogram/raw/functions/help/get_invite_text.py +67 -0
- pyrogram/raw/functions/help/get_nearest_dc.py +67 -0
- pyrogram/raw/functions/help/get_passport_config.py +72 -0
- pyrogram/raw/functions/help/get_premium_promo.py +67 -0
- pyrogram/raw/functions/help/get_promo_data.py +67 -0
- pyrogram/raw/functions/help/get_recent_me_urls.py +72 -0
- pyrogram/raw/functions/help/get_support.py +67 -0
- pyrogram/raw/functions/help/get_support_name.py +67 -0
- pyrogram/raw/functions/help/get_terms_of_service_update.py +67 -0
- pyrogram/raw/functions/help/get_user_info.py +72 -0
- pyrogram/raw/functions/help/hide_promo_data.py +72 -0
- pyrogram/raw/functions/help/save_app_log.py +72 -0
- pyrogram/raw/functions/help/set_bot_updates_status.py +80 -0
- pyrogram/raw/functions/init_connection.py +150 -0
- pyrogram/raw/functions/invoke_after_msg.py +80 -0
- pyrogram/raw/functions/invoke_after_msgs.py +80 -0
- pyrogram/raw/functions/invoke_with_layer.py +80 -0
- pyrogram/raw/functions/invoke_with_messages_range.py +80 -0
- pyrogram/raw/functions/invoke_with_takeout.py +80 -0
- pyrogram/raw/functions/invoke_without_updates.py +72 -0
- pyrogram/raw/functions/langpack/__init__.py +29 -0
- pyrogram/raw/functions/langpack/get_difference.py +88 -0
- pyrogram/raw/functions/langpack/get_lang_pack.py +80 -0
- pyrogram/raw/functions/langpack/get_language.py +80 -0
- pyrogram/raw/functions/langpack/get_languages.py +72 -0
- pyrogram/raw/functions/langpack/get_strings.py +88 -0
- pyrogram/raw/functions/messages/__init__.py +212 -0
- pyrogram/raw/functions/messages/accept_encryption.py +88 -0
- pyrogram/raw/functions/messages/accept_url_auth.py +109 -0
- pyrogram/raw/functions/messages/add_chat_user.py +88 -0
- pyrogram/raw/functions/messages/check_chat_invite.py +72 -0
- pyrogram/raw/functions/messages/check_history_import.py +72 -0
- pyrogram/raw/functions/messages/check_history_import_peer.py +72 -0
- pyrogram/raw/functions/messages/clear_all_drafts.py +67 -0
- pyrogram/raw/functions/messages/clear_recent_reactions.py +67 -0
- pyrogram/raw/functions/messages/clear_recent_stickers.py +72 -0
- pyrogram/raw/functions/messages/create_chat.py +91 -0
- pyrogram/raw/functions/messages/delete_chat.py +72 -0
- pyrogram/raw/functions/messages/delete_chat_user.py +88 -0
- pyrogram/raw/functions/messages/delete_exported_chat_invite.py +80 -0
- pyrogram/raw/functions/messages/delete_history.py +112 -0
- pyrogram/raw/functions/messages/delete_messages.py +80 -0
- pyrogram/raw/functions/messages/delete_phone_call_history.py +72 -0
- pyrogram/raw/functions/messages/delete_revoked_exported_chat_invites.py +80 -0
- pyrogram/raw/functions/messages/delete_scheduled_messages.py +80 -0
- pyrogram/raw/functions/messages/discard_encryption.py +80 -0
- pyrogram/raw/functions/messages/edit_chat_about.py +80 -0
- pyrogram/raw/functions/messages/edit_chat_admin.py +88 -0
- pyrogram/raw/functions/messages/edit_chat_default_banned_rights.py +80 -0
- pyrogram/raw/functions/messages/edit_chat_photo.py +80 -0
- pyrogram/raw/functions/messages/edit_chat_title.py +80 -0
- pyrogram/raw/functions/messages/edit_exported_chat_invite.py +124 -0
- pyrogram/raw/functions/messages/edit_inline_bot_message.py +119 -0
- pyrogram/raw/functions/messages/edit_message.py +136 -0
- pyrogram/raw/functions/messages/export_chat_invite.py +113 -0
- pyrogram/raw/functions/messages/fave_sticker.py +80 -0
- pyrogram/raw/functions/messages/forward_messages.py +162 -0
- pyrogram/raw/functions/messages/get_admins_with_invites.py +72 -0
- pyrogram/raw/functions/messages/get_all_chats.py +72 -0
- pyrogram/raw/functions/messages/get_all_drafts.py +67 -0
- pyrogram/raw/functions/messages/get_all_stickers.py +72 -0
- pyrogram/raw/functions/messages/get_archived_stickers.py +94 -0
- pyrogram/raw/functions/messages/get_attach_menu_bot.py +72 -0
- pyrogram/raw/functions/messages/get_attach_menu_bots.py +72 -0
- pyrogram/raw/functions/messages/get_attached_stickers.py +72 -0
- pyrogram/raw/functions/messages/get_available_reactions.py +72 -0
- pyrogram/raw/functions/messages/get_bot_app.py +80 -0
- pyrogram/raw/functions/messages/get_bot_callback_answer.py +107 -0
- pyrogram/raw/functions/messages/get_chat_invite_importers.py +122 -0
- pyrogram/raw/functions/messages/get_chats.py +72 -0
- pyrogram/raw/functions/messages/get_common_chats.py +88 -0
- pyrogram/raw/functions/messages/get_custom_emoji_documents.py +72 -0
- pyrogram/raw/functions/messages/get_default_history_ttl.py +67 -0
- pyrogram/raw/functions/messages/get_dh_config.py +80 -0
- pyrogram/raw/functions/messages/get_dialog_filters.py +67 -0
- pyrogram/raw/functions/messages/get_dialog_unread_marks.py +67 -0
- pyrogram/raw/functions/messages/get_dialogs.py +121 -0
- pyrogram/raw/functions/messages/get_discussion_message.py +80 -0
- pyrogram/raw/functions/messages/get_document_by_hash.py +88 -0
- pyrogram/raw/functions/messages/get_emoji_groups.py +72 -0
- pyrogram/raw/functions/messages/get_emoji_keywords.py +72 -0
- pyrogram/raw/functions/messages/get_emoji_keywords_difference.py +80 -0
- pyrogram/raw/functions/messages/get_emoji_keywords_languages.py +72 -0
- pyrogram/raw/functions/messages/get_emoji_profile_photo_groups.py +72 -0
- pyrogram/raw/functions/messages/get_emoji_status_groups.py +72 -0
- pyrogram/raw/functions/messages/get_emoji_stickers.py +72 -0
- pyrogram/raw/functions/messages/get_emoji_url.py +72 -0
- pyrogram/raw/functions/messages/get_exported_chat_invite.py +80 -0
- pyrogram/raw/functions/messages/get_exported_chat_invites.py +114 -0
- pyrogram/raw/functions/messages/get_extended_media.py +80 -0
- pyrogram/raw/functions/messages/get_faved_stickers.py +72 -0
- pyrogram/raw/functions/messages/get_featured_emoji_stickers.py +72 -0
- pyrogram/raw/functions/messages/get_featured_stickers.py +72 -0
- pyrogram/raw/functions/messages/get_full_chat.py +72 -0
- pyrogram/raw/functions/messages/get_game_high_scores.py +88 -0
- pyrogram/raw/functions/messages/get_history.py +128 -0
- pyrogram/raw/functions/messages/get_inline_bot_results.py +108 -0
- pyrogram/raw/functions/messages/get_inline_game_high_scores.py +80 -0
- pyrogram/raw/functions/messages/get_mask_stickers.py +72 -0
- pyrogram/raw/functions/messages/get_message_edit_data.py +80 -0
- pyrogram/raw/functions/messages/get_message_reactions_list.py +109 -0
- pyrogram/raw/functions/messages/get_message_read_participants.py +80 -0
- pyrogram/raw/functions/messages/get_messages.py +72 -0
- pyrogram/raw/functions/messages/get_messages_reactions.py +80 -0
- pyrogram/raw/functions/messages/get_messages_views.py +88 -0
- pyrogram/raw/functions/messages/get_old_featured_stickers.py +88 -0
- pyrogram/raw/functions/messages/get_onlines.py +72 -0
- pyrogram/raw/functions/messages/get_peer_dialogs.py +72 -0
- pyrogram/raw/functions/messages/get_peer_settings.py +72 -0
- pyrogram/raw/functions/messages/get_pinned_dialogs.py +72 -0
- pyrogram/raw/functions/messages/get_poll_results.py +80 -0
- pyrogram/raw/functions/messages/get_poll_votes.py +108 -0
- pyrogram/raw/functions/messages/get_recent_locations.py +88 -0
- pyrogram/raw/functions/messages/get_recent_reactions.py +80 -0
- pyrogram/raw/functions/messages/get_recent_stickers.py +80 -0
- pyrogram/raw/functions/messages/get_replies.py +136 -0
- pyrogram/raw/functions/messages/get_saved_gifs.py +72 -0
- pyrogram/raw/functions/messages/get_scheduled_history.py +80 -0
- pyrogram/raw/functions/messages/get_scheduled_messages.py +80 -0
- pyrogram/raw/functions/messages/get_search_counters.py +91 -0
- pyrogram/raw/functions/messages/get_search_results_calendar.py +96 -0
- pyrogram/raw/functions/messages/get_search_results_positions.py +96 -0
- pyrogram/raw/functions/messages/get_split_ranges.py +67 -0
- pyrogram/raw/functions/messages/get_sticker_set.py +80 -0
- pyrogram/raw/functions/messages/get_stickers.py +80 -0
- pyrogram/raw/functions/messages/get_suggested_dialog_filters.py +67 -0
- pyrogram/raw/functions/messages/get_top_reactions.py +80 -0
- pyrogram/raw/functions/messages/get_unread_mentions.py +123 -0
- pyrogram/raw/functions/messages/get_unread_reactions.py +123 -0
- pyrogram/raw/functions/messages/get_web_page.py +80 -0
- pyrogram/raw/functions/messages/get_web_page_preview.py +84 -0
- pyrogram/raw/functions/messages/hide_all_chat_join_requests.py +89 -0
- pyrogram/raw/functions/messages/hide_chat_join_request.py +88 -0
- pyrogram/raw/functions/messages/hide_peer_settings_bar.py +72 -0
- pyrogram/raw/functions/messages/import_chat_invite.py +72 -0
- pyrogram/raw/functions/messages/init_history_import.py +88 -0
- pyrogram/raw/functions/messages/install_sticker_set.py +80 -0
- pyrogram/raw/functions/messages/mark_dialog_unread.py +80 -0
- pyrogram/raw/functions/messages/migrate_chat.py +72 -0
- pyrogram/raw/functions/messages/prolong_web_view.py +124 -0
- pyrogram/raw/functions/messages/rate_transcribed_audio.py +96 -0
- pyrogram/raw/functions/messages/read_discussion.py +88 -0
- pyrogram/raw/functions/messages/read_encrypted_history.py +80 -0
- pyrogram/raw/functions/messages/read_featured_stickers.py +72 -0
- pyrogram/raw/functions/messages/read_history.py +80 -0
- pyrogram/raw/functions/messages/read_mentions.py +83 -0
- pyrogram/raw/functions/messages/read_message_contents.py +72 -0
- pyrogram/raw/functions/messages/read_reactions.py +83 -0
- pyrogram/raw/functions/messages/received_messages.py +72 -0
- pyrogram/raw/functions/messages/received_queue.py +72 -0
- pyrogram/raw/functions/messages/reorder_pinned_dialogs.py +88 -0
- pyrogram/raw/functions/messages/reorder_sticker_sets.py +86 -0
- pyrogram/raw/functions/messages/report.py +96 -0
- pyrogram/raw/functions/messages/report_encrypted_spam.py +72 -0
- pyrogram/raw/functions/messages/report_reaction.py +88 -0
- pyrogram/raw/functions/messages/report_spam.py +72 -0
- pyrogram/raw/functions/messages/request_app_web_view.py +115 -0
- pyrogram/raw/functions/messages/request_encryption.py +88 -0
- pyrogram/raw/functions/messages/request_simple_web_view.py +106 -0
- pyrogram/raw/functions/messages/request_url_auth.py +103 -0
- pyrogram/raw/functions/messages/request_web_view.py +158 -0
- pyrogram/raw/functions/messages/save_default_send_as.py +80 -0
- pyrogram/raw/functions/messages/save_draft.py +116 -0
- pyrogram/raw/functions/messages/save_gif.py +80 -0
- pyrogram/raw/functions/messages/save_recent_sticker.py +88 -0
- pyrogram/raw/functions/messages/search.py +173 -0
- pyrogram/raw/functions/messages/search_custom_emoji.py +80 -0
- pyrogram/raw/functions/messages/search_global.py +139 -0
- pyrogram/raw/functions/messages/search_sent_media.py +88 -0
- pyrogram/raw/functions/messages/search_sticker_sets.py +88 -0
- pyrogram/raw/functions/messages/send_bot_requested_peer.py +96 -0
- pyrogram/raw/functions/messages/send_encrypted.py +96 -0
- pyrogram/raw/functions/messages/send_encrypted_file.py +104 -0
- pyrogram/raw/functions/messages/send_encrypted_service.py +88 -0
- pyrogram/raw/functions/messages/send_inline_bot_result.py +159 -0
- pyrogram/raw/functions/messages/send_media.py +185 -0
- pyrogram/raw/functions/messages/send_message.py +183 -0
- pyrogram/raw/functions/messages/send_multi_media.py +149 -0
- pyrogram/raw/functions/messages/send_reaction.py +104 -0
- pyrogram/raw/functions/messages/send_scheduled_messages.py +80 -0
- pyrogram/raw/functions/messages/send_screenshot_notification.py +88 -0
- pyrogram/raw/functions/messages/send_vote.py +88 -0
- pyrogram/raw/functions/messages/send_web_view_data.py +96 -0
- pyrogram/raw/functions/messages/send_web_view_result_message.py +80 -0
- pyrogram/raw/functions/messages/set_bot_callback_answer.py +106 -0
- pyrogram/raw/functions/messages/set_bot_precheckout_results.py +89 -0
- pyrogram/raw/functions/messages/set_bot_shipping_results.py +93 -0
- pyrogram/raw/functions/messages/set_chat_available_reactions.py +80 -0
- pyrogram/raw/functions/messages/set_chat_theme.py +80 -0
- pyrogram/raw/functions/messages/set_chat_wall_paper.py +103 -0
- pyrogram/raw/functions/messages/set_default_history_ttl.py +72 -0
- pyrogram/raw/functions/messages/set_default_reaction.py +72 -0
- pyrogram/raw/functions/messages/set_encrypted_typing.py +80 -0
- pyrogram/raw/functions/messages/set_game_score.py +110 -0
- pyrogram/raw/functions/messages/set_history_ttl.py +80 -0
- pyrogram/raw/functions/messages/set_inline_bot_results.py +131 -0
- pyrogram/raw/functions/messages/set_inline_game_score.py +102 -0
- pyrogram/raw/functions/messages/set_typing.py +91 -0
- pyrogram/raw/functions/messages/start_bot.py +96 -0
- pyrogram/raw/functions/messages/start_history_import.py +80 -0
- pyrogram/raw/functions/messages/toggle_bot_in_attach_menu.py +88 -0
- pyrogram/raw/functions/messages/toggle_dialog_pin.py +80 -0
- pyrogram/raw/functions/messages/toggle_no_forwards.py +80 -0
- pyrogram/raw/functions/messages/toggle_peer_translations.py +80 -0
- pyrogram/raw/functions/messages/toggle_sticker_sets.py +92 -0
- pyrogram/raw/functions/messages/transcribe_audio.py +80 -0
- pyrogram/raw/functions/messages/translate_text.py +104 -0
- pyrogram/raw/functions/messages/uninstall_sticker_set.py +72 -0
- pyrogram/raw/functions/messages/unpin_all_messages.py +83 -0
- pyrogram/raw/functions/messages/update_dialog_filter.py +84 -0
- pyrogram/raw/functions/messages/update_dialog_filters_order.py +72 -0
- pyrogram/raw/functions/messages/update_pinned_message.py +100 -0
- pyrogram/raw/functions/messages/upload_encrypted_file.py +80 -0
- pyrogram/raw/functions/messages/upload_imported_media.py +96 -0
- pyrogram/raw/functions/messages/upload_media.py +80 -0
- pyrogram/raw/functions/payments/__init__.py +35 -0
- pyrogram/raw/functions/payments/assign_app_store_transaction.py +80 -0
- pyrogram/raw/functions/payments/assign_play_market_transaction.py +80 -0
- pyrogram/raw/functions/payments/can_purchase_premium.py +72 -0
- pyrogram/raw/functions/payments/clear_saved_info.py +78 -0
- pyrogram/raw/functions/payments/export_invoice.py +72 -0
- pyrogram/raw/functions/payments/get_bank_card_data.py +72 -0
- pyrogram/raw/functions/payments/get_payment_form.py +84 -0
- pyrogram/raw/functions/payments/get_payment_receipt.py +80 -0
- pyrogram/raw/functions/payments/get_saved_info.py +67 -0
- pyrogram/raw/functions/payments/send_payment_form.py +117 -0
- pyrogram/raw/functions/payments/validate_requested_info.py +88 -0
- pyrogram/raw/functions/phone/__init__.py +55 -0
- pyrogram/raw/functions/phone/accept_call.py +88 -0
- pyrogram/raw/functions/phone/check_group_call.py +80 -0
- pyrogram/raw/functions/phone/confirm_call.py +96 -0
- pyrogram/raw/functions/phone/create_group_call.py +106 -0
- pyrogram/raw/functions/phone/discard_call.py +104 -0
- pyrogram/raw/functions/phone/discard_group_call.py +72 -0
- pyrogram/raw/functions/phone/edit_group_call_participant.py +136 -0
- pyrogram/raw/functions/phone/edit_group_call_title.py +80 -0
- pyrogram/raw/functions/phone/export_group_call_invite.py +80 -0
- pyrogram/raw/functions/phone/get_call_config.py +67 -0
- pyrogram/raw/functions/phone/get_group_call.py +80 -0
- pyrogram/raw/functions/phone/get_group_call_join_as.py +72 -0
- pyrogram/raw/functions/phone/get_group_call_stream_channels.py +72 -0
- pyrogram/raw/functions/phone/get_group_call_stream_rtmp_url.py +80 -0
- pyrogram/raw/functions/phone/get_group_participants.py +104 -0
- pyrogram/raw/functions/phone/invite_to_group_call.py +80 -0
- pyrogram/raw/functions/phone/join_group_call.py +111 -0
- pyrogram/raw/functions/phone/join_group_call_presentation.py +80 -0
- pyrogram/raw/functions/phone/leave_group_call.py +80 -0
- pyrogram/raw/functions/phone/leave_group_call_presentation.py +72 -0
- pyrogram/raw/functions/phone/received_call.py +72 -0
- pyrogram/raw/functions/phone/request_call.py +104 -0
- pyrogram/raw/functions/phone/save_call_debug.py +80 -0
- pyrogram/raw/functions/phone/save_call_log.py +80 -0
- pyrogram/raw/functions/phone/save_default_group_call_join_as.py +80 -0
- pyrogram/raw/functions/phone/send_signaling_data.py +80 -0
- pyrogram/raw/functions/phone/set_call_rating.py +96 -0
- pyrogram/raw/functions/phone/start_scheduled_group_call.py +72 -0
- pyrogram/raw/functions/phone/toggle_group_call_record.py +104 -0
- pyrogram/raw/functions/phone/toggle_group_call_settings.py +89 -0
- pyrogram/raw/functions/phone/toggle_group_call_start_subscription.py +80 -0
- pyrogram/raw/functions/photos/__init__.py +29 -0
- pyrogram/raw/functions/photos/delete_photos.py +72 -0
- pyrogram/raw/functions/photos/get_user_photos.py +96 -0
- pyrogram/raw/functions/photos/update_profile_photo.py +90 -0
- pyrogram/raw/functions/photos/upload_contact_profile_photo.py +125 -0
- pyrogram/raw/functions/photos/upload_profile_photo.py +121 -0
- pyrogram/raw/functions/ping.py +72 -0
- pyrogram/raw/functions/ping_delay_disconnect.py +80 -0
- pyrogram/raw/functions/req_dh_params.py +112 -0
- pyrogram/raw/functions/req_pq.py +72 -0
- pyrogram/raw/functions/req_pq_multi.py +72 -0
- pyrogram/raw/functions/rpc_drop_answer.py +72 -0
- pyrogram/raw/functions/set_client_dh_params.py +88 -0
- pyrogram/raw/functions/stats/__init__.py +29 -0
- pyrogram/raw/functions/stats/get_broadcast_stats.py +80 -0
- pyrogram/raw/functions/stats/get_megagroup_stats.py +80 -0
- pyrogram/raw/functions/stats/get_message_public_forwards.py +112 -0
- pyrogram/raw/functions/stats/get_message_stats.py +88 -0
- pyrogram/raw/functions/stats/load_async_graph.py +83 -0
- pyrogram/raw/functions/stickers/__init__.py +34 -0
- pyrogram/raw/functions/stickers/add_sticker_to_set.py +80 -0
- pyrogram/raw/functions/stickers/change_sticker.py +102 -0
- pyrogram/raw/functions/stickers/change_sticker_position.py +80 -0
- pyrogram/raw/functions/stickers/check_short_name.py +72 -0
- pyrogram/raw/functions/stickers/create_sticker_set.py +147 -0
- pyrogram/raw/functions/stickers/delete_sticker_set.py +72 -0
- pyrogram/raw/functions/stickers/remove_sticker_from_set.py +72 -0
- pyrogram/raw/functions/stickers/rename_sticker_set.py +80 -0
- pyrogram/raw/functions/stickers/set_sticker_set_thumb.py +93 -0
- pyrogram/raw/functions/stickers/suggest_short_name.py +72 -0
- pyrogram/raw/functions/updates/__init__.py +27 -0
- pyrogram/raw/functions/updates/get_channel_difference.py +104 -0
- pyrogram/raw/functions/updates/get_difference.py +99 -0
- pyrogram/raw/functions/updates/get_state.py +67 -0
- pyrogram/raw/functions/upload/__init__.py +32 -0
- pyrogram/raw/functions/upload/get_cdn_file.py +88 -0
- pyrogram/raw/functions/upload/get_cdn_file_hashes.py +80 -0
- pyrogram/raw/functions/upload/get_file.py +102 -0
- pyrogram/raw/functions/upload/get_file_hashes.py +80 -0
- pyrogram/raw/functions/upload/get_web_file.py +88 -0
- pyrogram/raw/functions/upload/reupload_cdn_file.py +80 -0
- pyrogram/raw/functions/upload/save_big_file_part.py +96 -0
- pyrogram/raw/functions/upload/save_file_part.py +88 -0
- pyrogram/raw/functions/users/__init__.py +27 -0
- pyrogram/raw/functions/users/get_full_user.py +72 -0
- pyrogram/raw/functions/users/get_users.py +72 -0
- pyrogram/raw/functions/users/set_secure_value_errors.py +80 -0
- pyrogram/raw/types/__init__.py +959 -0
- pyrogram/raw/types/access_point_rule.py +88 -0
- pyrogram/raw/types/account/__init__.py +52 -0
- pyrogram/raw/types/account/authorization_form.py +116 -0
- pyrogram/raw/types/account/authorizations.py +89 -0
- pyrogram/raw/types/account/auto_download_settings.py +97 -0
- pyrogram/raw/types/account/auto_save_settings.py +121 -0
- pyrogram/raw/types/account/content_settings.py +87 -0
- pyrogram/raw/types/account/email_verified.py +81 -0
- pyrogram/raw/types/account/email_verified_login.py +89 -0
- pyrogram/raw/types/account/emoji_statuses.py +90 -0
- pyrogram/raw/types/account/emoji_statuses_not_modified.py +77 -0
- pyrogram/raw/types/account/password.py +181 -0
- pyrogram/raw/types/account/password_input_settings.py +113 -0
- pyrogram/raw/types/account/password_settings.py +94 -0
- pyrogram/raw/types/account/privacy_rules.py +98 -0
- pyrogram/raw/types/account/reset_password_failed_wait.py +81 -0
- pyrogram/raw/types/account/reset_password_ok.py +76 -0
- pyrogram/raw/types/account/reset_password_requested_wait.py +81 -0
- pyrogram/raw/types/account/saved_ringtone.py +76 -0
- pyrogram/raw/types/account/saved_ringtone_converted.py +81 -0
- pyrogram/raw/types/account/saved_ringtones.py +89 -0
- pyrogram/raw/types/account/saved_ringtones_not_modified.py +76 -0
- pyrogram/raw/types/account/sent_email_code.py +89 -0
- pyrogram/raw/types/account/takeout.py +81 -0
- pyrogram/raw/types/account/themes.py +90 -0
- pyrogram/raw/types/account/themes_not_modified.py +77 -0
- pyrogram/raw/types/account/tmp_password.py +89 -0
- pyrogram/raw/types/account/wall_papers.py +89 -0
- pyrogram/raw/types/account/wall_papers_not_modified.py +76 -0
- pyrogram/raw/types/account/web_authorizations.py +89 -0
- pyrogram/raw/types/account_days_ttl.py +81 -0
- pyrogram/raw/types/app_web_view_result_url.py +81 -0
- pyrogram/raw/types/attach_menu_bot.py +116 -0
- pyrogram/raw/types/attach_menu_bot_icon.py +92 -0
- pyrogram/raw/types/attach_menu_bot_icon_color.py +80 -0
- pyrogram/raw/types/attach_menu_bots.py +97 -0
- pyrogram/raw/types/attach_menu_bots_bot.py +89 -0
- pyrogram/raw/types/attach_menu_bots_not_modified.py +76 -0
- pyrogram/raw/types/attach_menu_peer_type_bot_pm.py +67 -0
- pyrogram/raw/types/attach_menu_peer_type_broadcast.py +67 -0
- pyrogram/raw/types/attach_menu_peer_type_chat.py +67 -0
- pyrogram/raw/types/attach_menu_peer_type_pm.py +67 -0
- pyrogram/raw/types/attach_menu_peer_type_same_bot_pm.py +67 -0
- pyrogram/raw/types/auth/__init__.py +48 -0
- pyrogram/raw/types/auth/authorization.py +122 -0
- pyrogram/raw/types/auth/authorization_sign_up_required.py +91 -0
- pyrogram/raw/types/auth/code_type_call.py +67 -0
- pyrogram/raw/types/auth/code_type_flash_call.py +67 -0
- pyrogram/raw/types/auth/code_type_fragment_sms.py +67 -0
- pyrogram/raw/types/auth/code_type_missed_call.py +67 -0
- pyrogram/raw/types/auth/code_type_sms.py +67 -0
- pyrogram/raw/types/auth/exported_authorization.py +89 -0
- pyrogram/raw/types/auth/logged_out.py +84 -0
- pyrogram/raw/types/auth/login_token.py +90 -0
- pyrogram/raw/types/auth/login_token_migrate_to.py +90 -0
- pyrogram/raw/types/auth/login_token_success.py +82 -0
- pyrogram/raw/types/auth/password_recovery.py +81 -0
- pyrogram/raw/types/auth/sent_code.py +115 -0
- pyrogram/raw/types/auth/sent_code_success.py +86 -0
- pyrogram/raw/types/auth/sent_code_type_app.py +72 -0
- pyrogram/raw/types/auth/sent_code_type_call.py +72 -0
- pyrogram/raw/types/auth/sent_code_type_email_code.py +112 -0
- pyrogram/raw/types/auth/sent_code_type_firebase_sms.py +101 -0
- pyrogram/raw/types/auth/sent_code_type_flash_call.py +72 -0
- pyrogram/raw/types/auth/sent_code_type_fragment_sms.py +80 -0
- pyrogram/raw/types/auth/sent_code_type_missed_call.py +80 -0
- pyrogram/raw/types/auth/sent_code_type_set_up_email_required.py +78 -0
- pyrogram/raw/types/auth/sent_code_type_sms.py +72 -0
- pyrogram/raw/types/authorization.py +201 -0
- pyrogram/raw/types/auto_download_settings.py +122 -0
- pyrogram/raw/types/auto_save_exception.py +80 -0
- pyrogram/raw/types/auto_save_settings.py +87 -0
- pyrogram/raw/types/available_reaction.py +154 -0
- pyrogram/raw/types/bad_msg_notification.py +88 -0
- pyrogram/raw/types/bad_server_salt.py +96 -0
- pyrogram/raw/types/bank_card_open_url.py +80 -0
- pyrogram/raw/types/base_theme_arctic.py +67 -0
- pyrogram/raw/types/base_theme_classic.py +67 -0
- pyrogram/raw/types/base_theme_day.py +67 -0
- pyrogram/raw/types/base_theme_night.py +67 -0
- pyrogram/raw/types/base_theme_tinted.py +67 -0
- pyrogram/raw/types/bind_auth_key_inner.py +104 -0
- pyrogram/raw/types/bot_app.py +132 -0
- pyrogram/raw/types/bot_app_not_modified.py +67 -0
- pyrogram/raw/types/bot_command.py +89 -0
- pyrogram/raw/types/bot_command_scope_chat_admins.py +67 -0
- pyrogram/raw/types/bot_command_scope_chats.py +67 -0
- pyrogram/raw/types/bot_command_scope_default.py +67 -0
- pyrogram/raw/types/bot_command_scope_peer.py +72 -0
- pyrogram/raw/types/bot_command_scope_peer_admins.py +72 -0
- pyrogram/raw/types/bot_command_scope_peer_user.py +80 -0
- pyrogram/raw/types/bot_command_scope_users.py +67 -0
- pyrogram/raw/types/bot_info.py +124 -0
- pyrogram/raw/types/bot_inline_media_result.py +128 -0
- pyrogram/raw/types/bot_inline_message_media_auto.py +94 -0
- pyrogram/raw/types/bot_inline_message_media_contact.py +108 -0
- pyrogram/raw/types/bot_inline_message_media_geo.py +111 -0
- pyrogram/raw/types/bot_inline_message_media_invoice.py +130 -0
- pyrogram/raw/types/bot_inline_message_media_venue.py +124 -0
- pyrogram/raw/types/bot_inline_message_text.py +100 -0
- pyrogram/raw/types/bot_inline_result.py +137 -0
- pyrogram/raw/types/bot_menu_button.py +89 -0
- pyrogram/raw/types/bot_menu_button_commands.py +76 -0
- pyrogram/raw/types/bot_menu_button_default.py +76 -0
- pyrogram/raw/types/bots/__init__.py +25 -0
- pyrogram/raw/types/bots/bot_info.py +97 -0
- pyrogram/raw/types/cdn_config.py +81 -0
- pyrogram/raw/types/cdn_public_key.py +80 -0
- pyrogram/raw/types/channel.py +299 -0
- pyrogram/raw/types/channel_admin_log_event.py +96 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_about.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_available_reactions.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_history_ttl.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_linked_chat.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_location.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_photo.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_sticker_set.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_title.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_username.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_change_usernames.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_create_topic.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_default_banned_rights.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_delete_message.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_delete_topic.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_discard_group_call.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_edit_message.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_edit_topic.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_exported_invite_delete.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_exported_invite_edit.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_exported_invite_revoke.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_invite.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_join.py +67 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_invite.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_request.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_leave.py +67 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_mute.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_admin.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_ban.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_unmute.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_participant_volume.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_pin_topic.py +86 -0
- pyrogram/raw/types/channel_admin_log_event_action_send_message.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_start_group_call.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_stop_poll.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_anti_spam.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_forum.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_group_call_setting.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_invites.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_no_forwards.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_pre_history_hidden.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_signatures.py +72 -0
- pyrogram/raw/types/channel_admin_log_event_action_toggle_slow_mode.py +80 -0
- pyrogram/raw/types/channel_admin_log_event_action_update_pinned.py +72 -0
- pyrogram/raw/types/channel_admin_log_events_filter.py +174 -0
- pyrogram/raw/types/channel_forbidden.py +111 -0
- pyrogram/raw/types/channel_full.py +457 -0
- pyrogram/raw/types/channel_location.py +80 -0
- pyrogram/raw/types/channel_location_empty.py +67 -0
- pyrogram/raw/types/channel_messages_filter.py +80 -0
- pyrogram/raw/types/channel_messages_filter_empty.py +67 -0
- pyrogram/raw/types/channel_participant.py +80 -0
- pyrogram/raw/types/channel_participant_admin.py +128 -0
- pyrogram/raw/types/channel_participant_banned.py +104 -0
- pyrogram/raw/types/channel_participant_creator.py +91 -0
- pyrogram/raw/types/channel_participant_left.py +72 -0
- pyrogram/raw/types/channel_participant_self.py +96 -0
- pyrogram/raw/types/channel_participants_admins.py +67 -0
- pyrogram/raw/types/channel_participants_banned.py +72 -0
- pyrogram/raw/types/channel_participants_bots.py +67 -0
- pyrogram/raw/types/channel_participants_contacts.py +72 -0
- pyrogram/raw/types/channel_participants_kicked.py +72 -0
- pyrogram/raw/types/channel_participants_mentions.py +84 -0
- pyrogram/raw/types/channel_participants_recent.py +67 -0
- pyrogram/raw/types/channel_participants_search.py +72 -0
- pyrogram/raw/types/channels/__init__.py +29 -0
- pyrogram/raw/types/channels/admin_log_results.py +97 -0
- pyrogram/raw/types/channels/channel_participant.py +97 -0
- pyrogram/raw/types/channels/channel_participants.py +105 -0
- pyrogram/raw/types/channels/channel_participants_not_modified.py +76 -0
- pyrogram/raw/types/channels/send_as_peers.py +97 -0
- pyrogram/raw/types/chat.py +180 -0
- pyrogram/raw/types/chat_admin_rights.py +138 -0
- pyrogram/raw/types/chat_admin_with_invites.py +88 -0
- pyrogram/raw/types/chat_banned_rights.py +194 -0
- pyrogram/raw/types/chat_empty.py +72 -0
- pyrogram/raw/types/chat_forbidden.py +80 -0
- pyrogram/raw/types/chat_full.py +231 -0
- pyrogram/raw/types/chat_invite.py +148 -0
- pyrogram/raw/types/chat_invite_already.py +81 -0
- pyrogram/raw/types/chat_invite_exported.py +171 -0
- pyrogram/raw/types/chat_invite_importer.py +112 -0
- pyrogram/raw/types/chat_invite_peek.py +89 -0
- pyrogram/raw/types/chat_invite_public_join_requests.py +76 -0
- pyrogram/raw/types/chat_onlines.py +81 -0
- pyrogram/raw/types/chat_participant.py +88 -0
- pyrogram/raw/types/chat_participant_admin.py +88 -0
- pyrogram/raw/types/chat_participant_creator.py +72 -0
- pyrogram/raw/types/chat_participants.py +88 -0
- pyrogram/raw/types/chat_participants_forbidden.py +84 -0
- pyrogram/raw/types/chat_photo.py +97 -0
- pyrogram/raw/types/chat_photo_empty.py +67 -0
- pyrogram/raw/types/chat_reactions_all.py +72 -0
- pyrogram/raw/types/chat_reactions_none.py +67 -0
- pyrogram/raw/types/chat_reactions_some.py +72 -0
- pyrogram/raw/types/chatlists/__init__.py +29 -0
- pyrogram/raw/types/chatlists/chatlist_invite.py +116 -0
- pyrogram/raw/types/chatlists/chatlist_invite_already.py +113 -0
- pyrogram/raw/types/chatlists/chatlist_updates.py +97 -0
- pyrogram/raw/types/chatlists/exported_chatlist_invite.py +89 -0
- pyrogram/raw/types/chatlists/exported_invites.py +97 -0
- pyrogram/raw/types/client_dh_inner_data.py +96 -0
- pyrogram/raw/types/code_settings.py +124 -0
- pyrogram/raw/types/config.py +453 -0
- pyrogram/raw/types/contact.py +80 -0
- pyrogram/raw/types/contact_status.py +89 -0
- pyrogram/raw/types/contacts/__init__.py +34 -0
- pyrogram/raw/types/contacts/blocked.py +97 -0
- pyrogram/raw/types/contacts/blocked_slice.py +105 -0
- pyrogram/raw/types/contacts/contacts.py +97 -0
- pyrogram/raw/types/contacts/contacts_not_modified.py +76 -0
- pyrogram/raw/types/contacts/found.py +105 -0
- pyrogram/raw/types/contacts/imported_contacts.py +105 -0
- pyrogram/raw/types/contacts/resolved_peer.py +98 -0
- pyrogram/raw/types/contacts/top_peers.py +97 -0
- pyrogram/raw/types/contacts/top_peers_disabled.py +76 -0
- pyrogram/raw/types/contacts/top_peers_not_modified.py +76 -0
- pyrogram/raw/types/data_json.py +82 -0
- pyrogram/raw/types/dc_option.py +135 -0
- pyrogram/raw/types/default_history_ttl.py +81 -0
- pyrogram/raw/types/destroy_auth_key_fail.py +76 -0
- pyrogram/raw/types/destroy_auth_key_none.py +76 -0
- pyrogram/raw/types/destroy_auth_key_ok.py +76 -0
- pyrogram/raw/types/destroy_session_none.py +81 -0
- pyrogram/raw/types/destroy_session_ok.py +81 -0
- pyrogram/raw/types/dh_gen_fail.py +97 -0
- pyrogram/raw/types/dh_gen_ok.py +97 -0
- pyrogram/raw/types/dh_gen_retry.py +97 -0
- pyrogram/raw/types/dialog.py +179 -0
- pyrogram/raw/types/dialog_filter.py +172 -0
- pyrogram/raw/types/dialog_filter_chatlist.py +122 -0
- pyrogram/raw/types/dialog_filter_default.py +76 -0
- pyrogram/raw/types/dialog_filter_suggested.py +89 -0
- pyrogram/raw/types/dialog_folder.py +128 -0
- pyrogram/raw/types/dialog_peer.py +81 -0
- pyrogram/raw/types/dialog_peer_folder.py +81 -0
- pyrogram/raw/types/document.py +162 -0
- pyrogram/raw/types/document_attribute_animated.py +67 -0
- pyrogram/raw/types/document_attribute_audio.py +107 -0
- pyrogram/raw/types/document_attribute_custom_emoji.py +94 -0
- pyrogram/raw/types/document_attribute_filename.py +72 -0
- pyrogram/raw/types/document_attribute_has_stickers.py +67 -0
- pyrogram/raw/types/document_attribute_image_size.py +80 -0
- pyrogram/raw/types/document_attribute_sticker.py +98 -0
- pyrogram/raw/types/document_attribute_video.py +102 -0
- pyrogram/raw/types/document_empty.py +84 -0
- pyrogram/raw/types/draft_message.py +107 -0
- pyrogram/raw/types/draft_message_empty.py +75 -0
- pyrogram/raw/types/email_verification_apple.py +72 -0
- pyrogram/raw/types/email_verification_code.py +72 -0
- pyrogram/raw/types/email_verification_google.py +72 -0
- pyrogram/raw/types/email_verify_purpose_login_change.py +67 -0
- pyrogram/raw/types/email_verify_purpose_login_setup.py +80 -0
- pyrogram/raw/types/email_verify_purpose_passport.py +67 -0
- pyrogram/raw/types/emoji_group.py +88 -0
- pyrogram/raw/types/emoji_keyword.py +80 -0
- pyrogram/raw/types/emoji_keyword_deleted.py +80 -0
- pyrogram/raw/types/emoji_keywords_difference.py +106 -0
- pyrogram/raw/types/emoji_language.py +81 -0
- pyrogram/raw/types/emoji_list.py +91 -0
- pyrogram/raw/types/emoji_list_not_modified.py +78 -0
- pyrogram/raw/types/emoji_status.py +72 -0
- pyrogram/raw/types/emoji_status_empty.py +67 -0
- pyrogram/raw/types/emoji_status_until.py +80 -0
- pyrogram/raw/types/emoji_url.py +81 -0
- pyrogram/raw/types/encrypted_chat.py +130 -0
- pyrogram/raw/types/encrypted_chat_discarded.py +90 -0
- pyrogram/raw/types/encrypted_chat_empty.py +82 -0
- pyrogram/raw/types/encrypted_chat_requested.py +133 -0
- pyrogram/raw/types/encrypted_chat_waiting.py +114 -0
- pyrogram/raw/types/encrypted_file.py +113 -0
- pyrogram/raw/types/encrypted_file_empty.py +76 -0
- pyrogram/raw/types/encrypted_message.py +104 -0
- pyrogram/raw/types/encrypted_message_service.py +96 -0
- pyrogram/raw/types/exported_chatlist_invite.py +100 -0
- pyrogram/raw/types/exported_contact_token.py +89 -0
- pyrogram/raw/types/exported_message_link.py +89 -0
- pyrogram/raw/types/file_hash.py +99 -0
- pyrogram/raw/types/folder.py +110 -0
- pyrogram/raw/types/folder_peer.py +80 -0
- pyrogram/raw/types/forum_topic.py +211 -0
- pyrogram/raw/types/forum_topic_deleted.py +72 -0
- pyrogram/raw/types/game.py +124 -0
- pyrogram/raw/types/geo_point.py +99 -0
- pyrogram/raw/types/geo_point_empty.py +67 -0
- pyrogram/raw/types/global_privacy_settings.py +85 -0
- pyrogram/raw/types/group_call.py +199 -0
- pyrogram/raw/types/group_call_discarded.py +88 -0
- pyrogram/raw/types/group_call_participant.py +206 -0
- pyrogram/raw/types/group_call_participant_video.py +97 -0
- pyrogram/raw/types/group_call_participant_video_source_group.py +80 -0
- pyrogram/raw/types/group_call_stream_channel.py +88 -0
- pyrogram/raw/types/help/__init__.py +49 -0
- pyrogram/raw/types/help/app_config.py +89 -0
- pyrogram/raw/types/help/app_config_not_modified.py +76 -0
- pyrogram/raw/types/help/app_update.py +142 -0
- pyrogram/raw/types/help/config_simple.py +88 -0
- pyrogram/raw/types/help/countries_list.py +89 -0
- pyrogram/raw/types/help/countries_list_not_modified.py +76 -0
- pyrogram/raw/types/help/country.py +105 -0
- pyrogram/raw/types/help/country_code.py +94 -0
- pyrogram/raw/types/help/deep_link_info.py +99 -0
- pyrogram/raw/types/help/deep_link_info_empty.py +76 -0
- pyrogram/raw/types/help/invite_text.py +81 -0
- pyrogram/raw/types/help/no_app_update.py +76 -0
- pyrogram/raw/types/help/passport_config.py +89 -0
- pyrogram/raw/types/help/passport_config_not_modified.py +76 -0
- pyrogram/raw/types/help/premium_promo.py +121 -0
- pyrogram/raw/types/help/promo_data.py +131 -0
- pyrogram/raw/types/help/promo_data_empty.py +81 -0
- pyrogram/raw/types/help/recent_me_urls.py +97 -0
- pyrogram/raw/types/help/support.py +89 -0
- pyrogram/raw/types/help/support_name.py +81 -0
- pyrogram/raw/types/help/terms_of_service.py +105 -0
- pyrogram/raw/types/help/terms_of_service_update.py +89 -0
- pyrogram/raw/types/help/terms_of_service_update_empty.py +81 -0
- pyrogram/raw/types/help/user_info.py +106 -0
- pyrogram/raw/types/help/user_info_empty.py +77 -0
- pyrogram/raw/types/high_score.py +88 -0
- pyrogram/raw/types/http_wait.py +88 -0
- pyrogram/raw/types/imported_contact.py +80 -0
- pyrogram/raw/types/inline_bot_switch_pm.py +80 -0
- pyrogram/raw/types/inline_bot_web_view.py +80 -0
- pyrogram/raw/types/inline_query_peer_type_bot_pm.py +67 -0
- pyrogram/raw/types/inline_query_peer_type_broadcast.py +67 -0
- pyrogram/raw/types/inline_query_peer_type_chat.py +67 -0
- pyrogram/raw/types/inline_query_peer_type_megagroup.py +67 -0
- pyrogram/raw/types/inline_query_peer_type_pm.py +67 -0
- pyrogram/raw/types/inline_query_peer_type_same_bot_pm.py +67 -0
- pyrogram/raw/types/input_app_event.py +96 -0
- pyrogram/raw/types/input_bot_app_id.py +80 -0
- pyrogram/raw/types/input_bot_app_short_name.py +80 -0
- pyrogram/raw/types/input_bot_inline_message_game.py +76 -0
- pyrogram/raw/types/input_bot_inline_message_id.py +88 -0
- pyrogram/raw/types/input_bot_inline_message_id64.py +96 -0
- pyrogram/raw/types/input_bot_inline_message_media_auto.py +94 -0
- pyrogram/raw/types/input_bot_inline_message_media_contact.py +108 -0
- pyrogram/raw/types/input_bot_inline_message_media_geo.py +111 -0
- pyrogram/raw/types/input_bot_inline_message_media_invoice.py +134 -0
- pyrogram/raw/types/input_bot_inline_message_media_venue.py +124 -0
- pyrogram/raw/types/input_bot_inline_message_text.py +100 -0
- pyrogram/raw/types/input_bot_inline_result.py +137 -0
- pyrogram/raw/types/input_bot_inline_result_document.py +116 -0
- pyrogram/raw/types/input_bot_inline_result_game.py +88 -0
- pyrogram/raw/types/input_bot_inline_result_photo.py +96 -0
- pyrogram/raw/types/input_channel.py +80 -0
- pyrogram/raw/types/input_channel_empty.py +67 -0
- pyrogram/raw/types/input_channel_from_message.py +88 -0
- pyrogram/raw/types/input_chat_photo.py +72 -0
- pyrogram/raw/types/input_chat_photo_empty.py +67 -0
- pyrogram/raw/types/input_chat_uploaded_photo.py +105 -0
- pyrogram/raw/types/input_chatlist_dialog_filter.py +72 -0
- pyrogram/raw/types/input_check_password_empty.py +67 -0
- pyrogram/raw/types/input_check_password_srp.py +88 -0
- pyrogram/raw/types/input_client_proxy.py +80 -0
- pyrogram/raw/types/input_dialog_peer.py +72 -0
- pyrogram/raw/types/input_dialog_peer_folder.py +72 -0
- pyrogram/raw/types/input_document.py +88 -0
- pyrogram/raw/types/input_document_empty.py +67 -0
- pyrogram/raw/types/input_document_file_location.py +96 -0
- pyrogram/raw/types/input_encrypted_chat.py +80 -0
- pyrogram/raw/types/input_encrypted_file.py +80 -0
- pyrogram/raw/types/input_encrypted_file_big_uploaded.py +88 -0
- pyrogram/raw/types/input_encrypted_file_empty.py +67 -0
- pyrogram/raw/types/input_encrypted_file_location.py +80 -0
- pyrogram/raw/types/input_encrypted_file_uploaded.py +96 -0
- pyrogram/raw/types/input_file.py +96 -0
- pyrogram/raw/types/input_file_big.py +88 -0
- pyrogram/raw/types/input_file_location.py +96 -0
- pyrogram/raw/types/input_folder_peer.py +80 -0
- pyrogram/raw/types/input_game_id.py +80 -0
- pyrogram/raw/types/input_game_short_name.py +80 -0
- pyrogram/raw/types/input_geo_point.py +91 -0
- pyrogram/raw/types/input_geo_point_empty.py +67 -0
- pyrogram/raw/types/input_group_call.py +80 -0
- pyrogram/raw/types/input_group_call_stream.py +108 -0
- pyrogram/raw/types/input_invoice_message.py +80 -0
- pyrogram/raw/types/input_invoice_slug.py +72 -0
- pyrogram/raw/types/input_keyboard_button_url_auth.py +105 -0
- pyrogram/raw/types/input_keyboard_button_user_profile.py +80 -0
- pyrogram/raw/types/input_media_contact.py +96 -0
- pyrogram/raw/types/input_media_dice.py +72 -0
- pyrogram/raw/types/input_media_document.py +98 -0
- pyrogram/raw/types/input_media_document_external.py +89 -0
- pyrogram/raw/types/input_media_empty.py +67 -0
- pyrogram/raw/types/input_media_game.py +72 -0
- pyrogram/raw/types/input_media_geo_live.py +107 -0
- pyrogram/raw/types/input_media_geo_point.py +72 -0
- pyrogram/raw/types/input_media_invoice.py +143 -0
- pyrogram/raw/types/input_media_photo.py +89 -0
- pyrogram/raw/types/input_media_photo_external.py +89 -0
- pyrogram/raw/types/input_media_poll.py +103 -0
- pyrogram/raw/types/input_media_uploaded_document.py +137 -0
- pyrogram/raw/types/input_media_uploaded_photo.py +99 -0
- pyrogram/raw/types/input_media_venue.py +112 -0
- pyrogram/raw/types/input_message_callback_query.py +80 -0
- pyrogram/raw/types/input_message_entity_mention_name.py +88 -0
- pyrogram/raw/types/input_message_id.py +72 -0
- pyrogram/raw/types/input_message_pinned.py +67 -0
- pyrogram/raw/types/input_message_reply_to.py +72 -0
- pyrogram/raw/types/input_messages_filter_chat_photos.py +67 -0
- pyrogram/raw/types/input_messages_filter_contacts.py +67 -0
- pyrogram/raw/types/input_messages_filter_document.py +67 -0
- pyrogram/raw/types/input_messages_filter_empty.py +67 -0
- pyrogram/raw/types/input_messages_filter_geo.py +67 -0
- pyrogram/raw/types/input_messages_filter_gif.py +67 -0
- pyrogram/raw/types/input_messages_filter_music.py +67 -0
- pyrogram/raw/types/input_messages_filter_my_mentions.py +67 -0
- pyrogram/raw/types/input_messages_filter_phone_calls.py +72 -0
- pyrogram/raw/types/input_messages_filter_photo_video.py +67 -0
- pyrogram/raw/types/input_messages_filter_photos.py +67 -0
- pyrogram/raw/types/input_messages_filter_pinned.py +67 -0
- pyrogram/raw/types/input_messages_filter_round_video.py +67 -0
- pyrogram/raw/types/input_messages_filter_round_voice.py +67 -0
- pyrogram/raw/types/input_messages_filter_url.py +67 -0
- pyrogram/raw/types/input_messages_filter_video.py +67 -0
- pyrogram/raw/types/input_messages_filter_voice.py +67 -0
- pyrogram/raw/types/input_notify_broadcasts.py +67 -0
- pyrogram/raw/types/input_notify_chats.py +67 -0
- pyrogram/raw/types/input_notify_forum_topic.py +80 -0
- pyrogram/raw/types/input_notify_peer.py +72 -0
- pyrogram/raw/types/input_notify_users.py +67 -0
- pyrogram/raw/types/input_payment_credentials.py +80 -0
- pyrogram/raw/types/input_payment_credentials_apple_pay.py +72 -0
- pyrogram/raw/types/input_payment_credentials_google_pay.py +72 -0
- pyrogram/raw/types/input_payment_credentials_saved.py +80 -0
- pyrogram/raw/types/input_peer_channel.py +80 -0
- pyrogram/raw/types/input_peer_channel_from_message.py +88 -0
- pyrogram/raw/types/input_peer_chat.py +72 -0
- pyrogram/raw/types/input_peer_empty.py +67 -0
- pyrogram/raw/types/input_peer_notify_settings.py +103 -0
- pyrogram/raw/types/input_peer_photo_file_location.py +88 -0
- pyrogram/raw/types/input_peer_self.py +67 -0
- pyrogram/raw/types/input_peer_user.py +80 -0
- pyrogram/raw/types/input_peer_user_from_message.py +88 -0
- pyrogram/raw/types/input_phone_call.py +80 -0
- pyrogram/raw/types/input_phone_contact.py +96 -0
- pyrogram/raw/types/input_photo.py +88 -0
- pyrogram/raw/types/input_photo_empty.py +67 -0
- pyrogram/raw/types/input_photo_file_location.py +96 -0
- pyrogram/raw/types/input_photo_legacy_file_location.py +112 -0
- pyrogram/raw/types/input_privacy_key_added_by_phone.py +67 -0
- pyrogram/raw/types/input_privacy_key_chat_invite.py +67 -0
- pyrogram/raw/types/input_privacy_key_forwards.py +67 -0
- pyrogram/raw/types/input_privacy_key_phone_call.py +67 -0
- pyrogram/raw/types/input_privacy_key_phone_number.py +67 -0
- pyrogram/raw/types/input_privacy_key_phone_p2_p.py +67 -0
- pyrogram/raw/types/input_privacy_key_profile_photo.py +67 -0
- pyrogram/raw/types/input_privacy_key_status_timestamp.py +67 -0
- pyrogram/raw/types/input_privacy_key_voice_messages.py +67 -0
- pyrogram/raw/types/input_privacy_value_allow_all.py +67 -0
- pyrogram/raw/types/input_privacy_value_allow_chat_participants.py +72 -0
- pyrogram/raw/types/input_privacy_value_allow_contacts.py +67 -0
- pyrogram/raw/types/input_privacy_value_allow_users.py +72 -0
- pyrogram/raw/types/input_privacy_value_disallow_all.py +67 -0
- pyrogram/raw/types/input_privacy_value_disallow_chat_participants.py +72 -0
- pyrogram/raw/types/input_privacy_value_disallow_contacts.py +67 -0
- pyrogram/raw/types/input_privacy_value_disallow_users.py +72 -0
- pyrogram/raw/types/input_report_reason_child_abuse.py +67 -0
- pyrogram/raw/types/input_report_reason_copyright.py +67 -0
- pyrogram/raw/types/input_report_reason_fake.py +67 -0
- pyrogram/raw/types/input_report_reason_geo_irrelevant.py +67 -0
- pyrogram/raw/types/input_report_reason_illegal_drugs.py +67 -0
- pyrogram/raw/types/input_report_reason_other.py +67 -0
- pyrogram/raw/types/input_report_reason_personal_details.py +67 -0
- pyrogram/raw/types/input_report_reason_pornography.py +67 -0
- pyrogram/raw/types/input_report_reason_spam.py +67 -0
- pyrogram/raw/types/input_report_reason_violence.py +67 -0
- pyrogram/raw/types/input_secure_file.py +80 -0
- pyrogram/raw/types/input_secure_file_location.py +80 -0
- pyrogram/raw/types/input_secure_file_uploaded.py +104 -0
- pyrogram/raw/types/input_secure_value.py +144 -0
- pyrogram/raw/types/input_single_media.py +100 -0
- pyrogram/raw/types/input_sticker_set_animated_emoji.py +67 -0
- pyrogram/raw/types/input_sticker_set_animated_emoji_animations.py +67 -0
- pyrogram/raw/types/input_sticker_set_dice.py +72 -0
- pyrogram/raw/types/input_sticker_set_emoji_default_statuses.py +67 -0
- pyrogram/raw/types/input_sticker_set_emoji_default_topic_icons.py +67 -0
- pyrogram/raw/types/input_sticker_set_emoji_generic_animations.py +67 -0
- pyrogram/raw/types/input_sticker_set_empty.py +67 -0
- pyrogram/raw/types/input_sticker_set_id.py +80 -0
- pyrogram/raw/types/input_sticker_set_item.py +101 -0
- pyrogram/raw/types/input_sticker_set_premium_gifts.py +67 -0
- pyrogram/raw/types/input_sticker_set_short_name.py +72 -0
- pyrogram/raw/types/input_sticker_set_thumb.py +80 -0
- pyrogram/raw/types/input_stickered_media_document.py +72 -0
- pyrogram/raw/types/input_stickered_media_photo.py +72 -0
- pyrogram/raw/types/input_store_payment_gift_premium.py +88 -0
- pyrogram/raw/types/input_store_payment_premium_subscription.py +78 -0
- pyrogram/raw/types/input_takeout_file_location.py +67 -0
- pyrogram/raw/types/input_theme.py +80 -0
- pyrogram/raw/types/input_theme_settings.py +127 -0
- pyrogram/raw/types/input_theme_slug.py +72 -0
- pyrogram/raw/types/input_user.py +80 -0
- pyrogram/raw/types/input_user_empty.py +67 -0
- pyrogram/raw/types/input_user_from_message.py +88 -0
- pyrogram/raw/types/input_user_self.py +67 -0
- pyrogram/raw/types/input_wall_paper.py +80 -0
- pyrogram/raw/types/input_wall_paper_no_file.py +72 -0
- pyrogram/raw/types/input_wall_paper_slug.py +72 -0
- pyrogram/raw/types/input_web_document.py +96 -0
- pyrogram/raw/types/input_web_file_audio_album_thumb_location.py +100 -0
- pyrogram/raw/types/input_web_file_geo_point_location.py +112 -0
- pyrogram/raw/types/input_web_file_location.py +80 -0
- pyrogram/raw/types/invoice.py +164 -0
- pyrogram/raw/types/ip_port.py +80 -0
- pyrogram/raw/types/ip_port_secret.py +88 -0
- pyrogram/raw/types/json_array.py +72 -0
- pyrogram/raw/types/json_bool.py +72 -0
- pyrogram/raw/types/json_null.py +67 -0
- pyrogram/raw/types/json_number.py +72 -0
- pyrogram/raw/types/json_object.py +72 -0
- pyrogram/raw/types/json_object_value.py +80 -0
- pyrogram/raw/types/json_string.py +72 -0
- pyrogram/raw/types/keyboard_button.py +72 -0
- pyrogram/raw/types/keyboard_button_buy.py +72 -0
- pyrogram/raw/types/keyboard_button_callback.py +88 -0
- pyrogram/raw/types/keyboard_button_game.py +72 -0
- pyrogram/raw/types/keyboard_button_request_geo_location.py +72 -0
- pyrogram/raw/types/keyboard_button_request_peer.py +88 -0
- pyrogram/raw/types/keyboard_button_request_phone.py +72 -0
- pyrogram/raw/types/keyboard_button_request_poll.py +83 -0
- pyrogram/raw/types/keyboard_button_row.py +72 -0
- pyrogram/raw/types/keyboard_button_simple_web_view.py +80 -0
- pyrogram/raw/types/keyboard_button_switch_inline.py +98 -0
- pyrogram/raw/types/keyboard_button_url.py +80 -0
- pyrogram/raw/types/keyboard_button_url_auth.py +99 -0
- pyrogram/raw/types/keyboard_button_user_profile.py +80 -0
- pyrogram/raw/types/keyboard_button_web_view.py +80 -0
- pyrogram/raw/types/labeled_price.py +80 -0
- pyrogram/raw/types/lang_pack_difference.py +106 -0
- pyrogram/raw/types/lang_pack_language.py +159 -0
- pyrogram/raw/types/lang_pack_string.py +89 -0
- pyrogram/raw/types/lang_pack_string_deleted.py +81 -0
- pyrogram/raw/types/lang_pack_string_pluralized.py +136 -0
- pyrogram/raw/types/mask_coords.py +96 -0
- pyrogram/raw/types/message.py +311 -0
- pyrogram/raw/types/message_action_bot_allowed.py +91 -0
- pyrogram/raw/types/message_action_channel_create.py +72 -0
- pyrogram/raw/types/message_action_channel_migrate_from.py +80 -0
- pyrogram/raw/types/message_action_chat_add_user.py +72 -0
- pyrogram/raw/types/message_action_chat_create.py +80 -0
- pyrogram/raw/types/message_action_chat_delete_photo.py +67 -0
- pyrogram/raw/types/message_action_chat_delete_user.py +72 -0
- pyrogram/raw/types/message_action_chat_edit_photo.py +72 -0
- pyrogram/raw/types/message_action_chat_edit_title.py +72 -0
- pyrogram/raw/types/message_action_chat_joined_by_link.py +72 -0
- pyrogram/raw/types/message_action_chat_joined_by_request.py +67 -0
- pyrogram/raw/types/message_action_chat_migrate_to.py +72 -0
- pyrogram/raw/types/message_action_contact_sign_up.py +67 -0
- pyrogram/raw/types/message_action_custom_action.py +72 -0
- pyrogram/raw/types/message_action_empty.py +67 -0
- pyrogram/raw/types/message_action_game_score.py +80 -0
- pyrogram/raw/types/message_action_geo_proximity_reached.py +88 -0
- pyrogram/raw/types/message_action_gift_premium.py +108 -0
- pyrogram/raw/types/message_action_group_call.py +83 -0
- pyrogram/raw/types/message_action_group_call_scheduled.py +80 -0
- pyrogram/raw/types/message_action_history_clear.py +67 -0
- pyrogram/raw/types/message_action_invite_to_group_call.py +80 -0
- pyrogram/raw/types/message_action_payment_sent.py +103 -0
- pyrogram/raw/types/message_action_payment_sent_me.py +129 -0
- pyrogram/raw/types/message_action_phone_call.py +99 -0
- pyrogram/raw/types/message_action_pin_message.py +67 -0
- pyrogram/raw/types/message_action_requested_peer.py +80 -0
- pyrogram/raw/types/message_action_screenshot_taken.py +67 -0
- pyrogram/raw/types/message_action_secure_values_sent.py +72 -0
- pyrogram/raw/types/message_action_secure_values_sent_me.py +80 -0
- pyrogram/raw/types/message_action_set_chat_theme.py +72 -0
- pyrogram/raw/types/message_action_set_chat_wall_paper.py +72 -0
- pyrogram/raw/types/message_action_set_messages_ttl.py +83 -0
- pyrogram/raw/types/message_action_set_same_chat_wall_paper.py +72 -0
- pyrogram/raw/types/message_action_suggest_profile_photo.py +72 -0
- pyrogram/raw/types/message_action_topic_create.py +91 -0
- pyrogram/raw/types/message_action_topic_edit.py +102 -0
- pyrogram/raw/types/message_action_web_view_data_sent.py +72 -0
- pyrogram/raw/types/message_action_web_view_data_sent_me.py +80 -0
- pyrogram/raw/types/message_empty.py +84 -0
- pyrogram/raw/types/message_entity_bank_card.py +80 -0
- pyrogram/raw/types/message_entity_blockquote.py +80 -0
- pyrogram/raw/types/message_entity_bold.py +80 -0
- pyrogram/raw/types/message_entity_bot_command.py +80 -0
- pyrogram/raw/types/message_entity_cashtag.py +80 -0
- pyrogram/raw/types/message_entity_code.py +80 -0
- pyrogram/raw/types/message_entity_custom_emoji.py +88 -0
- pyrogram/raw/types/message_entity_email.py +80 -0
- pyrogram/raw/types/message_entity_hashtag.py +80 -0
- pyrogram/raw/types/message_entity_italic.py +80 -0
- pyrogram/raw/types/message_entity_mention.py +80 -0
- pyrogram/raw/types/message_entity_mention_name.py +88 -0
- pyrogram/raw/types/message_entity_phone.py +80 -0
- pyrogram/raw/types/message_entity_pre.py +88 -0
- pyrogram/raw/types/message_entity_spoiler.py +80 -0
- pyrogram/raw/types/message_entity_strike.py +80 -0
- pyrogram/raw/types/message_entity_text_url.py +88 -0
- pyrogram/raw/types/message_entity_underline.py +80 -0
- pyrogram/raw/types/message_entity_unknown.py +80 -0
- pyrogram/raw/types/message_entity_url.py +80 -0
- pyrogram/raw/types/message_extended_media.py +72 -0
- pyrogram/raw/types/message_extended_media_preview.py +103 -0
- pyrogram/raw/types/message_fwd_header.py +145 -0
- pyrogram/raw/types/message_interaction_counters.py +88 -0
- pyrogram/raw/types/message_media_contact.py +115 -0
- pyrogram/raw/types/message_media_dice.py +91 -0
- pyrogram/raw/types/message_media_document.py +108 -0
- pyrogram/raw/types/message_media_empty.py +78 -0
- pyrogram/raw/types/message_media_game.py +83 -0
- pyrogram/raw/types/message_media_geo.py +83 -0
- pyrogram/raw/types/message_media_geo_live.py +111 -0
- pyrogram/raw/types/message_media_invoice.py +158 -0
- pyrogram/raw/types/message_media_photo.py +102 -0
- pyrogram/raw/types/message_media_poll.py +91 -0
- pyrogram/raw/types/message_media_unsupported.py +78 -0
- pyrogram/raw/types/message_media_venue.py +123 -0
- pyrogram/raw/types/message_media_web_page.py +83 -0
- pyrogram/raw/types/message_peer_reaction.py +102 -0
- pyrogram/raw/types/message_range.py +89 -0
- pyrogram/raw/types/message_reactions.py +96 -0
- pyrogram/raw/types/message_replies.py +125 -0
- pyrogram/raw/types/message_reply_header.py +105 -0
- pyrogram/raw/types/message_service.py +163 -0
- pyrogram/raw/types/message_user_vote.py +88 -0
- pyrogram/raw/types/message_user_vote_input_option.py +80 -0
- pyrogram/raw/types/message_user_vote_multiple.py +88 -0
- pyrogram/raw/types/message_views.py +94 -0
- pyrogram/raw/types/messages/__init__.py +94 -0
- pyrogram/raw/types/messages/affected_found_messages.py +105 -0
- pyrogram/raw/types/messages/affected_history.py +102 -0
- pyrogram/raw/types/messages/affected_messages.py +92 -0
- pyrogram/raw/types/messages/all_stickers.py +91 -0
- pyrogram/raw/types/messages/all_stickers_not_modified.py +78 -0
- pyrogram/raw/types/messages/archived_stickers.py +89 -0
- pyrogram/raw/types/messages/available_reactions.py +89 -0
- pyrogram/raw/types/messages/available_reactions_not_modified.py +76 -0
- pyrogram/raw/types/messages/bot_app.py +95 -0
- pyrogram/raw/types/messages/bot_callback_answer.py +119 -0
- pyrogram/raw/types/messages/bot_results.py +142 -0
- pyrogram/raw/types/messages/channel_messages.py +150 -0
- pyrogram/raw/types/messages/chat_admins_with_invites.py +89 -0
- pyrogram/raw/types/messages/chat_full.py +98 -0
- pyrogram/raw/types/messages/chat_invite_importers.py +97 -0
- pyrogram/raw/types/messages/chats.py +87 -0
- pyrogram/raw/types/messages/chats_slice.py +95 -0
- pyrogram/raw/types/messages/checked_history_import_peer.py +81 -0
- pyrogram/raw/types/messages/dh_config.py +105 -0
- pyrogram/raw/types/messages/dh_config_not_modified.py +81 -0
- pyrogram/raw/types/messages/dialogs.py +105 -0
- pyrogram/raw/types/messages/dialogs_not_modified.py +81 -0
- pyrogram/raw/types/messages/dialogs_slice.py +113 -0
- pyrogram/raw/types/messages/discussion_message.py +134 -0
- pyrogram/raw/types/messages/emoji_groups.py +91 -0
- pyrogram/raw/types/messages/emoji_groups_not_modified.py +78 -0
- pyrogram/raw/types/messages/exported_chat_invite.py +90 -0
- pyrogram/raw/types/messages/exported_chat_invite_replaced.py +98 -0
- pyrogram/raw/types/messages/exported_chat_invites.py +97 -0
- pyrogram/raw/types/messages/faved_stickers.py +97 -0
- pyrogram/raw/types/messages/faved_stickers_not_modified.py +76 -0
- pyrogram/raw/types/messages/featured_stickers.py +115 -0
- pyrogram/raw/types/messages/featured_stickers_not_modified.py +83 -0
- pyrogram/raw/types/messages/forum_topics.py +130 -0
- pyrogram/raw/types/messages/found_sticker_sets.py +89 -0
- pyrogram/raw/types/messages/found_sticker_sets_not_modified.py +76 -0
- pyrogram/raw/types/messages/high_scores.py +90 -0
- pyrogram/raw/types/messages/history_import.py +81 -0
- pyrogram/raw/types/messages/history_import_parsed.py +96 -0
- pyrogram/raw/types/messages/inactive_chats.py +97 -0
- pyrogram/raw/types/messages/message_edit_data.py +81 -0
- pyrogram/raw/types/messages/message_reactions_list.py +116 -0
- pyrogram/raw/types/messages/message_views.py +97 -0
- pyrogram/raw/types/messages/messages.py +109 -0
- pyrogram/raw/types/messages/messages_not_modified.py +93 -0
- pyrogram/raw/types/messages/messages_slice.py +143 -0
- pyrogram/raw/types/messages/peer_dialogs.py +114 -0
- pyrogram/raw/types/messages/peer_settings.py +97 -0
- pyrogram/raw/types/messages/reactions.py +90 -0
- pyrogram/raw/types/messages/reactions_not_modified.py +77 -0
- pyrogram/raw/types/messages/recent_stickers.py +105 -0
- pyrogram/raw/types/messages/recent_stickers_not_modified.py +76 -0
- pyrogram/raw/types/messages/saved_gifs.py +89 -0
- pyrogram/raw/types/messages/saved_gifs_not_modified.py +76 -0
- pyrogram/raw/types/messages/search_counter.py +97 -0
- pyrogram/raw/types/messages/search_results_calendar.py +146 -0
- pyrogram/raw/types/messages/search_results_positions.py +89 -0
- pyrogram/raw/types/messages/sent_encrypted_file.py +91 -0
- pyrogram/raw/types/messages/sent_encrypted_message.py +83 -0
- pyrogram/raw/types/messages/sponsored_messages.py +108 -0
- pyrogram/raw/types/messages/sponsored_messages_empty.py +76 -0
- pyrogram/raw/types/messages/sticker_set.py +112 -0
- pyrogram/raw/types/messages/sticker_set_install_result_archive.py +81 -0
- pyrogram/raw/types/messages/sticker_set_install_result_success.py +76 -0
- pyrogram/raw/types/messages/sticker_set_not_modified.py +83 -0
- pyrogram/raw/types/messages/stickers.py +89 -0
- pyrogram/raw/types/messages/stickers_not_modified.py +76 -0
- pyrogram/raw/types/messages/transcribed_audio.py +97 -0
- pyrogram/raw/types/messages/translate_result.py +81 -0
- pyrogram/raw/types/messages/votes_list.py +108 -0
- pyrogram/raw/types/msg_detailed_info.py +96 -0
- pyrogram/raw/types/msg_new_detailed_info.py +88 -0
- pyrogram/raw/types/msg_resend_ans_req.py +72 -0
- pyrogram/raw/types/msg_resend_req.py +72 -0
- pyrogram/raw/types/msgs_ack.py +72 -0
- pyrogram/raw/types/msgs_all_info.py +80 -0
- pyrogram/raw/types/msgs_state_info.py +80 -0
- pyrogram/raw/types/msgs_state_req.py +72 -0
- pyrogram/raw/types/nearest_dc.py +97 -0
- pyrogram/raw/types/new_session_created.py +88 -0
- pyrogram/raw/types/notification_sound_default.py +67 -0
- pyrogram/raw/types/notification_sound_local.py +80 -0
- pyrogram/raw/types/notification_sound_none.py +67 -0
- pyrogram/raw/types/notification_sound_ringtone.py +72 -0
- pyrogram/raw/types/notify_broadcasts.py +67 -0
- pyrogram/raw/types/notify_chats.py +67 -0
- pyrogram/raw/types/notify_forum_topic.py +80 -0
- pyrogram/raw/types/notify_peer.py +72 -0
- pyrogram/raw/types/notify_users.py +67 -0
- pyrogram/raw/types/page.py +125 -0
- pyrogram/raw/types/page_block_anchor.py +72 -0
- pyrogram/raw/types/page_block_audio.py +80 -0
- pyrogram/raw/types/page_block_author_date.py +80 -0
- pyrogram/raw/types/page_block_blockquote.py +80 -0
- pyrogram/raw/types/page_block_channel.py +72 -0
- pyrogram/raw/types/page_block_collage.py +80 -0
- pyrogram/raw/types/page_block_cover.py +72 -0
- pyrogram/raw/types/page_block_details.py +88 -0
- pyrogram/raw/types/page_block_divider.py +67 -0
- pyrogram/raw/types/page_block_embed.py +131 -0
- pyrogram/raw/types/page_block_embed_post.py +120 -0
- pyrogram/raw/types/page_block_footer.py +72 -0
- pyrogram/raw/types/page_block_header.py +72 -0
- pyrogram/raw/types/page_block_kicker.py +72 -0
- pyrogram/raw/types/page_block_list.py +72 -0
- pyrogram/raw/types/page_block_map.py +104 -0
- pyrogram/raw/types/page_block_ordered_list.py +72 -0
- pyrogram/raw/types/page_block_paragraph.py +72 -0
- pyrogram/raw/types/page_block_photo.py +100 -0
- pyrogram/raw/types/page_block_preformatted.py +80 -0
- pyrogram/raw/types/page_block_pullquote.py +80 -0
- pyrogram/raw/types/page_block_related_articles.py +80 -0
- pyrogram/raw/types/page_block_slideshow.py +80 -0
- pyrogram/raw/types/page_block_subheader.py +72 -0
- pyrogram/raw/types/page_block_subtitle.py +72 -0
- pyrogram/raw/types/page_block_table.py +94 -0
- pyrogram/raw/types/page_block_title.py +72 -0
- pyrogram/raw/types/page_block_unsupported.py +67 -0
- pyrogram/raw/types/page_block_video.py +94 -0
- pyrogram/raw/types/page_caption.py +80 -0
- pyrogram/raw/types/page_list_item_blocks.py +72 -0
- pyrogram/raw/types/page_list_item_text.py +72 -0
- pyrogram/raw/types/page_list_ordered_item_blocks.py +80 -0
- pyrogram/raw/types/page_list_ordered_item_text.py +80 -0
- pyrogram/raw/types/page_related_article.py +127 -0
- pyrogram/raw/types/page_table_cell.py +124 -0
- pyrogram/raw/types/page_table_row.py +72 -0
- pyrogram/raw/types/password_kdf_algo_sha256_sha256_pbkdf2_hmacsha512iter100000_sha256_mod_pow.py +96 -0
- pyrogram/raw/types/password_kdf_algo_unknown.py +67 -0
- pyrogram/raw/types/payment_charge.py +80 -0
- pyrogram/raw/types/payment_form_method.py +80 -0
- pyrogram/raw/types/payment_requested_info.py +103 -0
- pyrogram/raw/types/payment_saved_credentials_card.py +80 -0
- pyrogram/raw/types/payments/__init__.py +32 -0
- pyrogram/raw/types/payments/bank_card_data.py +89 -0
- pyrogram/raw/types/payments/exported_invoice.py +81 -0
- pyrogram/raw/types/payments/payment_form.py +210 -0
- pyrogram/raw/types/payments/payment_receipt.py +194 -0
- pyrogram/raw/types/payments/payment_result.py +81 -0
- pyrogram/raw/types/payments/payment_verification_needed.py +81 -0
- pyrogram/raw/types/payments/saved_info.py +91 -0
- pyrogram/raw/types/payments/validated_requested_info.py +94 -0
- pyrogram/raw/types/peer_blocked.py +80 -0
- pyrogram/raw/types/peer_channel.py +81 -0
- pyrogram/raw/types/peer_chat.py +81 -0
- pyrogram/raw/types/peer_located.py +88 -0
- pyrogram/raw/types/peer_notify_settings.py +132 -0
- pyrogram/raw/types/peer_self_located.py +72 -0
- pyrogram/raw/types/peer_settings.py +147 -0
- pyrogram/raw/types/peer_user.py +81 -0
- pyrogram/raw/types/phone/__init__.py +31 -0
- pyrogram/raw/types/phone/exported_group_call_invite.py +81 -0
- pyrogram/raw/types/phone/group_call.py +113 -0
- pyrogram/raw/types/phone/group_call_stream_channels.py +81 -0
- pyrogram/raw/types/phone/group_call_stream_rtmp_url.py +89 -0
- pyrogram/raw/types/phone/group_participants.py +121 -0
- pyrogram/raw/types/phone/join_as_peers.py +97 -0
- pyrogram/raw/types/phone/phone_call.py +91 -0
- pyrogram/raw/types/phone_call.py +158 -0
- pyrogram/raw/types/phone_call_accepted.py +128 -0
- pyrogram/raw/types/phone_call_discard_reason_busy.py +67 -0
- pyrogram/raw/types/phone_call_discard_reason_disconnect.py +67 -0
- pyrogram/raw/types/phone_call_discard_reason_hangup.py +67 -0
- pyrogram/raw/types/phone_call_discard_reason_missed.py +67 -0
- pyrogram/raw/types/phone_call_discarded.py +111 -0
- pyrogram/raw/types/phone_call_empty.py +72 -0
- pyrogram/raw/types/phone_call_protocol.py +102 -0
- pyrogram/raw/types/phone_call_requested.py +128 -0
- pyrogram/raw/types/phone_call_waiting.py +129 -0
- pyrogram/raw/types/phone_connection.py +112 -0
- pyrogram/raw/types/phone_connection_webrtc.py +126 -0
- pyrogram/raw/types/photo.py +130 -0
- pyrogram/raw/types/photo_cached_size.py +96 -0
- pyrogram/raw/types/photo_empty.py +72 -0
- pyrogram/raw/types/photo_path_size.py +80 -0
- pyrogram/raw/types/photo_size.py +96 -0
- pyrogram/raw/types/photo_size_empty.py +72 -0
- pyrogram/raw/types/photo_size_progressive.py +96 -0
- pyrogram/raw/types/photo_stripped_size.py +80 -0
- pyrogram/raw/types/photos/__init__.py +27 -0
- pyrogram/raw/types/photos/photo.py +91 -0
- pyrogram/raw/types/photos/photos.py +89 -0
- pyrogram/raw/types/photos/photos_slice.py +97 -0
- pyrogram/raw/types/poll.py +132 -0
- pyrogram/raw/types/poll_answer.py +80 -0
- pyrogram/raw/types/poll_answer_voters.py +94 -0
- pyrogram/raw/types/poll_results.py +120 -0
- pyrogram/raw/types/pong.py +90 -0
- pyrogram/raw/types/popular_contact.py +80 -0
- pyrogram/raw/types/post_address.py +112 -0
- pyrogram/raw/types/pq_inner_data.py +112 -0
- pyrogram/raw/types/pq_inner_data_dc.py +120 -0
- pyrogram/raw/types/pq_inner_data_temp.py +120 -0
- pyrogram/raw/types/pq_inner_data_temp_dc.py +128 -0
- pyrogram/raw/types/premium_gift_option.py +107 -0
- pyrogram/raw/types/premium_subscription_option.py +128 -0
- pyrogram/raw/types/privacy_key_added_by_phone.py +67 -0
- pyrogram/raw/types/privacy_key_chat_invite.py +67 -0
- pyrogram/raw/types/privacy_key_forwards.py +67 -0
- pyrogram/raw/types/privacy_key_phone_call.py +67 -0
- pyrogram/raw/types/privacy_key_phone_number.py +67 -0
- pyrogram/raw/types/privacy_key_phone_p2_p.py +67 -0
- pyrogram/raw/types/privacy_key_profile_photo.py +67 -0
- pyrogram/raw/types/privacy_key_status_timestamp.py +67 -0
- pyrogram/raw/types/privacy_key_voice_messages.py +67 -0
- pyrogram/raw/types/privacy_value_allow_all.py +67 -0
- pyrogram/raw/types/privacy_value_allow_chat_participants.py +72 -0
- pyrogram/raw/types/privacy_value_allow_contacts.py +67 -0
- pyrogram/raw/types/privacy_value_allow_users.py +72 -0
- pyrogram/raw/types/privacy_value_disallow_all.py +67 -0
- pyrogram/raw/types/privacy_value_disallow_chat_participants.py +72 -0
- pyrogram/raw/types/privacy_value_disallow_contacts.py +67 -0
- pyrogram/raw/types/privacy_value_disallow_users.py +72 -0
- pyrogram/raw/types/reaction_count.py +91 -0
- pyrogram/raw/types/reaction_custom_emoji.py +72 -0
- pyrogram/raw/types/reaction_emoji.py +72 -0
- pyrogram/raw/types/reaction_empty.py +67 -0
- pyrogram/raw/types/read_participant_date.py +89 -0
- pyrogram/raw/types/received_notify_message.py +89 -0
- pyrogram/raw/types/recent_me_url_chat.py +80 -0
- pyrogram/raw/types/recent_me_url_chat_invite.py +80 -0
- pyrogram/raw/types/recent_me_url_sticker_set.py +80 -0
- pyrogram/raw/types/recent_me_url_unknown.py +72 -0
- pyrogram/raw/types/recent_me_url_user.py +80 -0
- pyrogram/raw/types/reply_inline_markup.py +72 -0
- pyrogram/raw/types/reply_keyboard_force_reply.py +87 -0
- pyrogram/raw/types/reply_keyboard_hide.py +72 -0
- pyrogram/raw/types/reply_keyboard_markup.py +107 -0
- pyrogram/raw/types/request_peer_type_broadcast.py +101 -0
- pyrogram/raw/types/request_peer_type_chat.py +116 -0
- pyrogram/raw/types/request_peer_type_user.py +84 -0
- pyrogram/raw/types/res_pq.py +106 -0
- pyrogram/raw/types/restriction_reason.py +88 -0
- pyrogram/raw/types/rpc_answer_dropped.py +97 -0
- pyrogram/raw/types/rpc_answer_dropped_running.py +76 -0
- pyrogram/raw/types/rpc_answer_unknown.py +76 -0
- pyrogram/raw/types/rpc_error.py +80 -0
- pyrogram/raw/types/rpc_result.py +80 -0
- pyrogram/raw/types/saved_phone_contact.py +105 -0
- pyrogram/raw/types/search_result_position.py +88 -0
- pyrogram/raw/types/search_results_calendar_period.py +96 -0
- pyrogram/raw/types/secure_credentials_encrypted.py +88 -0
- pyrogram/raw/types/secure_data.py +88 -0
- pyrogram/raw/types/secure_file.py +120 -0
- pyrogram/raw/types/secure_file_empty.py +67 -0
- pyrogram/raw/types/secure_password_kdf_algo_pbkdf2_hmacsha512iter100000.py +72 -0
- pyrogram/raw/types/secure_password_kdf_algo_sha512.py +72 -0
- pyrogram/raw/types/secure_password_kdf_algo_unknown.py +67 -0
- pyrogram/raw/types/secure_plain_email.py +72 -0
- pyrogram/raw/types/secure_plain_phone.py +72 -0
- pyrogram/raw/types/secure_required_type.py +92 -0
- pyrogram/raw/types/secure_required_type_one_of.py +72 -0
- pyrogram/raw/types/secure_secret_settings.py +88 -0
- pyrogram/raw/types/secure_value.py +163 -0
- pyrogram/raw/types/secure_value_error.py +88 -0
- pyrogram/raw/types/secure_value_error_data.py +96 -0
- pyrogram/raw/types/secure_value_error_file.py +88 -0
- pyrogram/raw/types/secure_value_error_files.py +88 -0
- pyrogram/raw/types/secure_value_error_front_side.py +88 -0
- pyrogram/raw/types/secure_value_error_reverse_side.py +88 -0
- pyrogram/raw/types/secure_value_error_selfie.py +88 -0
- pyrogram/raw/types/secure_value_error_translation_file.py +88 -0
- pyrogram/raw/types/secure_value_error_translation_files.py +88 -0
- pyrogram/raw/types/secure_value_hash.py +80 -0
- pyrogram/raw/types/secure_value_type_address.py +67 -0
- pyrogram/raw/types/secure_value_type_bank_statement.py +67 -0
- pyrogram/raw/types/secure_value_type_driver_license.py +67 -0
- pyrogram/raw/types/secure_value_type_email.py +67 -0
- pyrogram/raw/types/secure_value_type_identity_card.py +67 -0
- pyrogram/raw/types/secure_value_type_internal_passport.py +67 -0
- pyrogram/raw/types/secure_value_type_passport.py +67 -0
- pyrogram/raw/types/secure_value_type_passport_registration.py +67 -0
- pyrogram/raw/types/secure_value_type_personal_details.py +67 -0
- pyrogram/raw/types/secure_value_type_phone.py +67 -0
- pyrogram/raw/types/secure_value_type_rental_agreement.py +67 -0
- pyrogram/raw/types/secure_value_type_temporary_registration.py +67 -0
- pyrogram/raw/types/secure_value_type_utility_bill.py +67 -0
- pyrogram/raw/types/send_as_peer.py +80 -0
- pyrogram/raw/types/send_message_cancel_action.py +67 -0
- pyrogram/raw/types/send_message_choose_contact_action.py +67 -0
- pyrogram/raw/types/send_message_choose_sticker_action.py +67 -0
- pyrogram/raw/types/send_message_emoji_interaction.py +88 -0
- pyrogram/raw/types/send_message_emoji_interaction_seen.py +72 -0
- pyrogram/raw/types/send_message_game_play_action.py +67 -0
- pyrogram/raw/types/send_message_geo_location_action.py +67 -0
- pyrogram/raw/types/send_message_history_import_action.py +72 -0
- pyrogram/raw/types/send_message_record_audio_action.py +67 -0
- pyrogram/raw/types/send_message_record_round_action.py +67 -0
- pyrogram/raw/types/send_message_record_video_action.py +67 -0
- pyrogram/raw/types/send_message_typing_action.py +67 -0
- pyrogram/raw/types/send_message_upload_audio_action.py +72 -0
- pyrogram/raw/types/send_message_upload_document_action.py +72 -0
- pyrogram/raw/types/send_message_upload_photo_action.py +72 -0
- pyrogram/raw/types/send_message_upload_round_action.py +72 -0
- pyrogram/raw/types/send_message_upload_video_action.py +72 -0
- pyrogram/raw/types/server_dh_inner_data.py +112 -0
- pyrogram/raw/types/server_dh_params_fail.py +97 -0
- pyrogram/raw/types/server_dh_params_ok.py +97 -0
- pyrogram/raw/types/shipping_option.py +88 -0
- pyrogram/raw/types/simple_web_view_result_url.py +81 -0
- pyrogram/raw/types/speaking_in_group_call_action.py +67 -0
- pyrogram/raw/types/sponsored_message.py +169 -0
- pyrogram/raw/types/stats/__init__.py +27 -0
- pyrogram/raw/types/stats/broadcast_stats.py +193 -0
- pyrogram/raw/types/stats/megagroup_stats.py +209 -0
- pyrogram/raw/types/stats/message_stats.py +81 -0
- pyrogram/raw/types/stats_abs_value_and_prev.py +80 -0
- pyrogram/raw/types/stats_date_range_days.py +80 -0
- pyrogram/raw/types/stats_graph.py +92 -0
- pyrogram/raw/types/stats_graph_async.py +81 -0
- pyrogram/raw/types/stats_graph_error.py +81 -0
- pyrogram/raw/types/stats_group_top_admin.py +96 -0
- pyrogram/raw/types/stats_group_top_inviter.py +80 -0
- pyrogram/raw/types/stats_group_top_poster.py +88 -0
- pyrogram/raw/types/stats_percent_value.py +80 -0
- pyrogram/raw/types/stats_url.py +72 -0
- pyrogram/raw/types/sticker_keyword.py +80 -0
- pyrogram/raw/types/sticker_pack.py +80 -0
- pyrogram/raw/types/sticker_set.py +196 -0
- pyrogram/raw/types/sticker_set_covered.py +89 -0
- pyrogram/raw/types/sticker_set_full_covered.py +105 -0
- pyrogram/raw/types/sticker_set_multi_covered.py +89 -0
- pyrogram/raw/types/sticker_set_no_covered.py +81 -0
- pyrogram/raw/types/stickers/__init__.py +25 -0
- pyrogram/raw/types/stickers/suggested_short_name.py +81 -0
- pyrogram/raw/types/storage/__init__.py +34 -0
- pyrogram/raw/types/storage/file_gif.py +67 -0
- pyrogram/raw/types/storage/file_jpeg.py +67 -0
- pyrogram/raw/types/storage/file_mov.py +67 -0
- pyrogram/raw/types/storage/file_mp3.py +67 -0
- pyrogram/raw/types/storage/file_mp4.py +67 -0
- pyrogram/raw/types/storage/file_partial.py +67 -0
- pyrogram/raw/types/storage/file_pdf.py +67 -0
- pyrogram/raw/types/storage/file_png.py +67 -0
- pyrogram/raw/types/storage/file_unknown.py +67 -0
- pyrogram/raw/types/storage/file_webp.py +67 -0
- pyrogram/raw/types/text_anchor.py +80 -0
- pyrogram/raw/types/text_bold.py +72 -0
- pyrogram/raw/types/text_concat.py +72 -0
- pyrogram/raw/types/text_email.py +80 -0
- pyrogram/raw/types/text_empty.py +67 -0
- pyrogram/raw/types/text_fixed.py +72 -0
- pyrogram/raw/types/text_image.py +88 -0
- pyrogram/raw/types/text_italic.py +72 -0
- pyrogram/raw/types/text_marked.py +72 -0
- pyrogram/raw/types/text_phone.py +80 -0
- pyrogram/raw/types/text_plain.py +72 -0
- pyrogram/raw/types/text_strike.py +72 -0
- pyrogram/raw/types/text_subscript.py +72 -0
- pyrogram/raw/types/text_superscript.py +72 -0
- pyrogram/raw/types/text_underline.py +72 -0
- pyrogram/raw/types/text_url.py +88 -0
- pyrogram/raw/types/text_with_entities.py +80 -0
- pyrogram/raw/types/theme.py +165 -0
- pyrogram/raw/types/theme_settings.py +117 -0
- pyrogram/raw/types/top_peer.py +80 -0
- pyrogram/raw/types/top_peer_category_bots_inline.py +67 -0
- pyrogram/raw/types/top_peer_category_bots_pm.py +67 -0
- pyrogram/raw/types/top_peer_category_channels.py +67 -0
- pyrogram/raw/types/top_peer_category_correspondents.py +67 -0
- pyrogram/raw/types/top_peer_category_forward_chats.py +67 -0
- pyrogram/raw/types/top_peer_category_forward_users.py +67 -0
- pyrogram/raw/types/top_peer_category_groups.py +67 -0
- pyrogram/raw/types/top_peer_category_peers.py +88 -0
- pyrogram/raw/types/top_peer_category_phone_calls.py +67 -0
- pyrogram/raw/types/update_attach_menu_bots.py +67 -0
- pyrogram/raw/types/update_auto_save_settings.py +67 -0
- pyrogram/raw/types/update_bot_callback_query.py +124 -0
- pyrogram/raw/types/update_bot_chat_invite_requester.py +112 -0
- pyrogram/raw/types/update_bot_commands.py +88 -0
- pyrogram/raw/types/update_bot_inline_query.py +118 -0
- pyrogram/raw/types/update_bot_inline_send.py +110 -0
- pyrogram/raw/types/update_bot_menu_button.py +80 -0
- pyrogram/raw/types/update_bot_precheckout_query.py +125 -0
- pyrogram/raw/types/update_bot_shipping_query.py +96 -0
- pyrogram/raw/types/update_bot_stopped.py +96 -0
- pyrogram/raw/types/update_bot_webhook_json.py +72 -0
- pyrogram/raw/types/update_bot_webhook_json_query.py +88 -0
- pyrogram/raw/types/update_channel.py +72 -0
- pyrogram/raw/types/update_channel_available_messages.py +80 -0
- pyrogram/raw/types/update_channel_message_forwards.py +88 -0
- pyrogram/raw/types/update_channel_message_views.py +88 -0
- pyrogram/raw/types/update_channel_participant.py +142 -0
- pyrogram/raw/types/update_channel_pinned_topic.py +88 -0
- pyrogram/raw/types/update_channel_pinned_topics.py +84 -0
- pyrogram/raw/types/update_channel_read_messages_contents.py +91 -0
- pyrogram/raw/types/update_channel_too_long.py +83 -0
- pyrogram/raw/types/update_channel_user_typing.py +99 -0
- pyrogram/raw/types/update_channel_web_page.py +96 -0
- pyrogram/raw/types/update_chat.py +72 -0
- pyrogram/raw/types/update_chat_default_banned_rights.py +88 -0
- pyrogram/raw/types/update_chat_participant.py +136 -0
- pyrogram/raw/types/update_chat_participant_add.py +104 -0
- pyrogram/raw/types/update_chat_participant_admin.py +96 -0
- pyrogram/raw/types/update_chat_participant_delete.py +88 -0
- pyrogram/raw/types/update_chat_participants.py +72 -0
- pyrogram/raw/types/update_chat_user_typing.py +88 -0
- pyrogram/raw/types/update_config.py +67 -0
- pyrogram/raw/types/update_contacts_reset.py +67 -0
- pyrogram/raw/types/update_dc_options.py +72 -0
- pyrogram/raw/types/update_delete_channel_messages.py +96 -0
- pyrogram/raw/types/update_delete_messages.py +88 -0
- pyrogram/raw/types/update_delete_scheduled_messages.py +80 -0
- pyrogram/raw/types/update_dialog_filter.py +84 -0
- pyrogram/raw/types/update_dialog_filter_order.py +72 -0
- pyrogram/raw/types/update_dialog_filters.py +67 -0
- pyrogram/raw/types/update_dialog_pinned.py +89 -0
- pyrogram/raw/types/update_dialog_unread_mark.py +80 -0
- pyrogram/raw/types/update_draft_message.py +91 -0
- pyrogram/raw/types/update_edit_channel_message.py +88 -0
- pyrogram/raw/types/update_edit_message.py +88 -0
- pyrogram/raw/types/update_encrypted_chat_typing.py +72 -0
- pyrogram/raw/types/update_encrypted_messages_read.py +88 -0
- pyrogram/raw/types/update_encryption.py +80 -0
- pyrogram/raw/types/update_faved_stickers.py +67 -0
- pyrogram/raw/types/update_folder_peers.py +88 -0
- pyrogram/raw/types/update_geo_live_viewed.py +80 -0
- pyrogram/raw/types/update_group_call.py +80 -0
- pyrogram/raw/types/update_group_call_connection.py +80 -0
- pyrogram/raw/types/update_group_call_participants.py +88 -0
- pyrogram/raw/types/update_group_invite_privacy_forbidden.py +72 -0
- pyrogram/raw/types/update_inline_bot_callback_query.py +116 -0
- pyrogram/raw/types/update_lang_pack.py +72 -0
- pyrogram/raw/types/update_lang_pack_too_long.py +72 -0
- pyrogram/raw/types/update_login_token.py +67 -0
- pyrogram/raw/types/update_message_extended_media.py +88 -0
- pyrogram/raw/types/update_message_id.py +80 -0
- pyrogram/raw/types/update_message_poll.py +92 -0
- pyrogram/raw/types/update_message_poll_vote.py +96 -0
- pyrogram/raw/types/update_message_reactions.py +99 -0
- pyrogram/raw/types/update_move_sticker_set_to_top.py +86 -0
- pyrogram/raw/types/update_new_channel_message.py +88 -0
- pyrogram/raw/types/update_new_encrypted_message.py +80 -0
- pyrogram/raw/types/update_new_message.py +88 -0
- pyrogram/raw/types/update_new_scheduled_message.py +72 -0
- pyrogram/raw/types/update_new_sticker_set.py +72 -0
- pyrogram/raw/types/update_notify_settings.py +80 -0
- pyrogram/raw/types/update_peer_blocked.py +80 -0
- pyrogram/raw/types/update_peer_history_ttl.py +83 -0
- pyrogram/raw/types/update_peer_located.py +72 -0
- pyrogram/raw/types/update_peer_settings.py +80 -0
- pyrogram/raw/types/update_pending_join_requests.py +88 -0
- pyrogram/raw/types/update_phone_call.py +72 -0
- pyrogram/raw/types/update_phone_call_signaling_data.py +80 -0
- pyrogram/raw/types/update_pinned_channel_messages.py +104 -0
- pyrogram/raw/types/update_pinned_dialogs.py +85 -0
- pyrogram/raw/types/update_pinned_messages.py +104 -0
- pyrogram/raw/types/update_privacy.py +80 -0
- pyrogram/raw/types/update_pts_changed.py +67 -0
- pyrogram/raw/types/update_read_channel_discussion_inbox.py +108 -0
- pyrogram/raw/types/update_read_channel_discussion_outbox.py +88 -0
- pyrogram/raw/types/update_read_channel_inbox.py +107 -0
- pyrogram/raw/types/update_read_channel_outbox.py +80 -0
- pyrogram/raw/types/update_read_featured_emoji_stickers.py +67 -0
- pyrogram/raw/types/update_read_featured_stickers.py +67 -0
- pyrogram/raw/types/update_read_history_inbox.py +115 -0
- pyrogram/raw/types/update_read_history_outbox.py +96 -0
- pyrogram/raw/types/update_read_messages_contents.py +88 -0
- pyrogram/raw/types/update_recent_emoji_statuses.py +67 -0
- pyrogram/raw/types/update_recent_reactions.py +67 -0
- pyrogram/raw/types/update_recent_stickers.py +67 -0
- pyrogram/raw/types/update_saved_gifs.py +67 -0
- pyrogram/raw/types/update_saved_ringtones.py +67 -0
- pyrogram/raw/types/update_service_notification.py +113 -0
- pyrogram/raw/types/update_short.py +175 -0
- pyrogram/raw/types/update_short_chat_message.py +289 -0
- pyrogram/raw/types/update_short_message.py +281 -0
- pyrogram/raw/types/update_short_sent_message.py +228 -0
- pyrogram/raw/types/update_sticker_sets.py +78 -0
- pyrogram/raw/types/update_sticker_sets_order.py +86 -0
- pyrogram/raw/types/update_theme.py +72 -0
- pyrogram/raw/types/update_transcribed_audio.py +104 -0
- pyrogram/raw/types/update_user.py +72 -0
- pyrogram/raw/types/update_user_emoji_status.py +80 -0
- pyrogram/raw/types/update_user_name.py +96 -0
- pyrogram/raw/types/update_user_phone.py +80 -0
- pyrogram/raw/types/update_user_status.py +80 -0
- pyrogram/raw/types/update_user_typing.py +80 -0
- pyrogram/raw/types/update_web_page.py +88 -0
- pyrogram/raw/types/update_web_view_result_sent.py +72 -0
- pyrogram/raw/types/updates/__init__.py +32 -0
- pyrogram/raw/types/updates/channel_difference.py +130 -0
- pyrogram/raw/types/updates/channel_difference_empty.py +98 -0
- pyrogram/raw/types/updates/channel_difference_too_long.py +122 -0
- pyrogram/raw/types/updates/difference.py +121 -0
- pyrogram/raw/types/updates/difference_empty.py +89 -0
- pyrogram/raw/types/updates/difference_slice.py +121 -0
- pyrogram/raw/types/updates/difference_too_long.py +81 -0
- pyrogram/raw/types/updates/state.py +113 -0
- pyrogram/raw/types/updates_combined.py +207 -0
- pyrogram/raw/types/updates_t.py +199 -0
- pyrogram/raw/types/updates_too_long.py +162 -0
- pyrogram/raw/types/upload/__init__.py +29 -0
- pyrogram/raw/types/upload/cdn_file.py +81 -0
- pyrogram/raw/types/upload/cdn_file_reupload_needed.py +81 -0
- pyrogram/raw/types/upload/file.py +97 -0
- pyrogram/raw/types/upload/file_cdn_redirect.py +113 -0
- pyrogram/raw/types/upload/web_file.py +113 -0
- pyrogram/raw/types/url_auth_result_accepted.py +82 -0
- pyrogram/raw/types/url_auth_result_default.py +77 -0
- pyrogram/raw/types/url_auth_result_request.py +98 -0
- pyrogram/raw/types/user.py +327 -0
- pyrogram/raw/types/user_empty.py +85 -0
- pyrogram/raw/types/user_full.py +280 -0
- pyrogram/raw/types/user_profile_photo.py +103 -0
- pyrogram/raw/types/user_profile_photo_empty.py +67 -0
- pyrogram/raw/types/user_status_empty.py +67 -0
- pyrogram/raw/types/user_status_last_month.py +67 -0
- pyrogram/raw/types/user_status_last_week.py +67 -0
- pyrogram/raw/types/user_status_offline.py +72 -0
- pyrogram/raw/types/user_status_online.py +72 -0
- pyrogram/raw/types/user_status_recently.py +67 -0
- pyrogram/raw/types/username.py +86 -0
- pyrogram/raw/types/users/__init__.py +25 -0
- pyrogram/raw/types/users/user_full.py +97 -0
- pyrogram/raw/types/video_size.py +107 -0
- pyrogram/raw/types/video_size_emoji_markup.py +80 -0
- pyrogram/raw/types/video_size_sticker_markup.py +88 -0
- pyrogram/raw/types/wall_paper.py +143 -0
- pyrogram/raw/types/wall_paper_no_file.py +107 -0
- pyrogram/raw/types/wall_paper_settings.py +132 -0
- pyrogram/raw/types/web_authorization.py +136 -0
- pyrogram/raw/types/web_document.py +104 -0
- pyrogram/raw/types/web_document_no_proxy.py +96 -0
- pyrogram/raw/types/web_page.py +237 -0
- pyrogram/raw/types/web_page_attribute_theme.py +86 -0
- pyrogram/raw/types/web_page_empty.py +81 -0
- pyrogram/raw/types/web_page_not_modified.py +84 -0
- pyrogram/raw/types/web_page_pending.py +89 -0
- pyrogram/raw/types/web_view_message_sent.py +85 -0
- pyrogram/raw/types/web_view_result_url.py +89 -0
- pyrogram/session/__init__.py +20 -0
- pyrogram/session/auth.py +281 -0
- pyrogram/session/internals/__init__.py +21 -0
- pyrogram/session/internals/data_center.py +83 -0
- pyrogram/session/internals/msg_factory.py +38 -0
- pyrogram/session/internals/msg_id.py +35 -0
- pyrogram/session/internals/seq_no.py +30 -0
- pyrogram/session/session.py +412 -0
- pyrogram/storage/__init__.py +21 -0
- pyrogram/storage/file_storage.py +69 -0
- pyrogram/storage/memory_storage.py +73 -0
- pyrogram/storage/sqlite_storage.py +222 -0
- pyrogram/storage/storage.py +91 -0
- pyrogram/sync.py +113 -0
- pyrogram/types/__init__.py +28 -0
- pyrogram/types/authorization/__init__.py +22 -0
- pyrogram/types/authorization/sent_code.py +62 -0
- pyrogram/types/authorization/terms_of_service.py +56 -0
- pyrogram/types/bots_and_keyboards/__init__.py +71 -0
- pyrogram/types/bots_and_keyboards/bot_command.py +53 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope.py +73 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope_all_chat_administrators.py +32 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope_all_group_chats.py +32 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope_all_private_chats.py +32 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope_chat.py +43 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope_chat_administrators.py +43 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope_chat_member.py +48 -0
- pyrogram/types/bots_and_keyboards/bot_command_scope_default.py +33 -0
- pyrogram/types/bots_and_keyboards/callback_game.py +29 -0
- pyrogram/types/bots_and_keyboards/callback_query.py +313 -0
- pyrogram/types/bots_and_keyboards/force_reply.py +66 -0
- pyrogram/types/bots_and_keyboards/game_high_score.py +70 -0
- pyrogram/types/bots_and_keyboards/inline_keyboard_button.py +224 -0
- pyrogram/types/bots_and_keyboards/inline_keyboard_markup.py +76 -0
- pyrogram/types/bots_and_keyboards/keyboard_button.py +95 -0
- pyrogram/types/bots_and_keyboards/login_url.py +90 -0
- pyrogram/types/bots_and_keyboards/menu_button.py +44 -0
- pyrogram/types/bots_and_keyboards/menu_button_commands.py +32 -0
- pyrogram/types/bots_and_keyboards/menu_button_default.py +32 -0
- pyrogram/types/bots_and_keyboards/menu_button_web_app.py +51 -0
- pyrogram/types/bots_and_keyboards/reply_keyboard_markup.py +112 -0
- pyrogram/types/bots_and_keyboards/reply_keyboard_remove.py +58 -0
- pyrogram/types/bots_and_keyboards/sent_web_app_message.py +42 -0
- pyrogram/types/bots_and_keyboards/web_app_info.py +37 -0
- pyrogram/types/inline_mode/__init__.py +47 -0
- pyrogram/types/inline_mode/chosen_inline_result.py +99 -0
- pyrogram/types/inline_mode/inline_query.py +181 -0
- pyrogram/types/inline_mode/inline_query_result.py +63 -0
- pyrogram/types/inline_mode/inline_query_result_animation.py +155 -0
- pyrogram/types/inline_mode/inline_query_result_article.py +99 -0
- pyrogram/types/inline_mode/inline_query_result_audio.py +120 -0
- pyrogram/types/inline_mode/inline_query_result_cached_animation.py +108 -0
- pyrogram/types/inline_mode/inline_query_result_cached_audio.py +101 -0
- pyrogram/types/inline_mode/inline_query_result_cached_document.py +113 -0
- pyrogram/types/inline_mode/inline_query_result_cached_photo.py +111 -0
- pyrogram/types/inline_mode/inline_query_result_cached_sticker.py +78 -0
- pyrogram/types/inline_mode/inline_query_result_cached_video.py +114 -0
- pyrogram/types/inline_mode/inline_query_result_cached_voice.py +108 -0
- pyrogram/types/inline_mode/inline_query_result_contact.py +114 -0
- pyrogram/types/inline_mode/inline_query_result_document.py +145 -0
- pyrogram/types/inline_mode/inline_query_result_location.py +122 -0
- pyrogram/types/inline_mode/inline_query_result_photo.py +147 -0
- pyrogram/types/inline_mode/inline_query_result_venue.py +131 -0
- pyrogram/types/inline_mode/inline_query_result_video.py +151 -0
- pyrogram/types/inline_mode/inline_query_result_voice.py +114 -0
- pyrogram/types/input_media/__init__.py +30 -0
- pyrogram/types/input_media/input_media.py +49 -0
- pyrogram/types/input_media/input_media_animation.py +85 -0
- pyrogram/types/input_media/input_media_audio.py +82 -0
- pyrogram/types/input_media/input_media_document.py +65 -0
- pyrogram/types/input_media/input_media_photo.py +63 -0
- pyrogram/types/input_media/input_media_video.py +91 -0
- pyrogram/types/input_media/input_phone_contact.py +51 -0
- pyrogram/types/input_message_content/__init__.py +24 -0
- pyrogram/types/input_message_content/input_message_content.py +40 -0
- pyrogram/types/input_message_content/input_text_message_content.py +68 -0
- pyrogram/types/list.py +30 -0
- pyrogram/types/messages_and_media/__init__.py +47 -0
- pyrogram/types/messages_and_media/animation.py +121 -0
- pyrogram/types/messages_and_media/audio.py +121 -0
- pyrogram/types/messages_and_media/contact.py +71 -0
- pyrogram/types/messages_and_media/dice.py +47 -0
- pyrogram/types/messages_and_media/document.py +98 -0
- pyrogram/types/messages_and_media/game.py +99 -0
- pyrogram/types/messages_and_media/location.py +55 -0
- pyrogram/types/messages_and_media/message.py +3590 -0
- pyrogram/types/messages_and_media/message_entity.py +124 -0
- pyrogram/types/messages_and_media/message_reactions.py +56 -0
- pyrogram/types/messages_and_media/photo.py +130 -0
- pyrogram/types/messages_and_media/poll.py +203 -0
- pyrogram/types/messages_and_media/poll_option.py +50 -0
- pyrogram/types/messages_and_media/reaction.py +86 -0
- pyrogram/types/messages_and_media/sticker.py +206 -0
- pyrogram/types/messages_and_media/stripped_thumbnail.py +47 -0
- pyrogram/types/messages_and_media/thumbnail.py +111 -0
- pyrogram/types/messages_and_media/venue.py +74 -0
- pyrogram/types/messages_and_media/video.py +134 -0
- pyrogram/types/messages_and_media/video_note.py +108 -0
- pyrogram/types/messages_and_media/voice.py +96 -0
- pyrogram/types/messages_and_media/web_app_data.py +51 -0
- pyrogram/types/messages_and_media/web_page.py +187 -0
- pyrogram/types/object.py +121 -0
- pyrogram/types/update.py +27 -0
- pyrogram/types/user_and_chats/__init__.py +67 -0
- pyrogram/types/user_and_chats/chat.py +963 -0
- pyrogram/types/user_and_chats/chat_admin_with_invite_links.py +63 -0
- pyrogram/types/user_and_chats/chat_event.py +489 -0
- pyrogram/types/user_and_chats/chat_event_filter.py +175 -0
- pyrogram/types/user_and_chats/chat_invite_link.py +130 -0
- pyrogram/types/user_and_chats/chat_join_request.py +139 -0
- pyrogram/types/user_and_chats/chat_joiner.py +82 -0
- pyrogram/types/user_and_chats/chat_member.py +227 -0
- pyrogram/types/user_and_chats/chat_member_updated.py +102 -0
- pyrogram/types/user_and_chats/chat_permissions.py +98 -0
- pyrogram/types/user_and_chats/chat_photo.py +107 -0
- pyrogram/types/user_and_chats/chat_preview.py +79 -0
- pyrogram/types/user_and_chats/chat_privileges.py +112 -0
- pyrogram/types/user_and_chats/chat_reactions.py +69 -0
- pyrogram/types/user_and_chats/dialog.py +79 -0
- pyrogram/types/user_and_chats/emoji_status.py +77 -0
- pyrogram/types/user_and_chats/invite_link_importer.py +61 -0
- pyrogram/types/user_and_chats/restriction.py +50 -0
- pyrogram/types/user_and_chats/user.py +399 -0
- pyrogram/types/user_and_chats/video_chat_ended.py +41 -0
- pyrogram/types/user_and_chats/video_chat_members_invited.py +50 -0
- pyrogram/types/user_and_chats/video_chat_scheduled.py +43 -0
- pyrogram/types/user_and_chats/video_chat_started.py +29 -0
- pyrogram/utils.py +371 -0
- pyromt-2.0.106.dist-info/METADATA +127 -0
- pyromt-2.0.106.dist-info/RECORD +2563 -0
- pyromt-2.0.106.dist-info/WHEEL +5 -0
- pyromt-2.0.106.dist-info/licenses/COPYING +674 -0
- pyromt-2.0.106.dist-info/licenses/COPYING.lesser +165 -0
- pyromt-2.0.106.dist-info/licenses/NOTICE +17 -0
- pyromt-2.0.106.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3590 @@
|
|
|
1
|
+
# Pyrogram - Telegram MTProto API Client Library for Python
|
|
2
|
+
# Copyright (C) 2017-present Dan <https://github.com/delivrance>
|
|
3
|
+
#
|
|
4
|
+
# This file is part of Pyrogram.
|
|
5
|
+
#
|
|
6
|
+
# Pyrogram is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU Lesser General Public License as published
|
|
8
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# Pyrogram is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU Lesser General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
|
|
19
|
+
import logging
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from functools import partial
|
|
22
|
+
from typing import List, Match, Union, BinaryIO, Optional, Callable
|
|
23
|
+
|
|
24
|
+
import pyrogram
|
|
25
|
+
from pyrogram import raw, enums
|
|
26
|
+
from pyrogram import types
|
|
27
|
+
from pyrogram import utils
|
|
28
|
+
from pyrogram.errors import MessageIdsEmpty, PeerIdInvalid
|
|
29
|
+
from pyrogram.parser import utils as parser_utils, Parser
|
|
30
|
+
from ..object import Object
|
|
31
|
+
from ..update import Update
|
|
32
|
+
|
|
33
|
+
log = logging.getLogger(__name__)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Str(str):
|
|
37
|
+
def __init__(self, *args):
|
|
38
|
+
super().__init__()
|
|
39
|
+
|
|
40
|
+
self.entities = None
|
|
41
|
+
|
|
42
|
+
def init(self, entities):
|
|
43
|
+
self.entities = entities
|
|
44
|
+
|
|
45
|
+
return self
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def markdown(self):
|
|
49
|
+
return Parser.unparse(self, self.entities, False)
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def html(self):
|
|
53
|
+
return Parser.unparse(self, self.entities, True)
|
|
54
|
+
|
|
55
|
+
def __getitem__(self, item):
|
|
56
|
+
return parser_utils.remove_surrogates(parser_utils.add_surrogates(self)[item])
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class Message(Object, Update):
|
|
60
|
+
"""A message.
|
|
61
|
+
|
|
62
|
+
Parameters:
|
|
63
|
+
id (``int``):
|
|
64
|
+
Unique message identifier inside this chat.
|
|
65
|
+
|
|
66
|
+
from_user (:obj:`~pyrogram.types.User`, *optional*):
|
|
67
|
+
Sender, empty for messages sent to channels.
|
|
68
|
+
|
|
69
|
+
sender_chat (:obj:`~pyrogram.types.Chat`, *optional*):
|
|
70
|
+
Sender of the message, sent on behalf of a chat.
|
|
71
|
+
The channel itself for channel messages.
|
|
72
|
+
The supergroup itself for messages from anonymous group administrators.
|
|
73
|
+
The linked channel for messages automatically forwarded to the discussion group.
|
|
74
|
+
|
|
75
|
+
date (:py:obj:`~datetime.datetime`, *optional*):
|
|
76
|
+
Date the message was sent.
|
|
77
|
+
|
|
78
|
+
chat (:obj:`~pyrogram.types.Chat`, *optional*):
|
|
79
|
+
Conversation the message belongs to.
|
|
80
|
+
|
|
81
|
+
forward_from (:obj:`~pyrogram.types.User`, *optional*):
|
|
82
|
+
For forwarded messages, sender of the original message.
|
|
83
|
+
|
|
84
|
+
forward_sender_name (``str``, *optional*):
|
|
85
|
+
For messages forwarded from users who have hidden their accounts, name of the user.
|
|
86
|
+
|
|
87
|
+
forward_from_chat (:obj:`~pyrogram.types.Chat`, *optional*):
|
|
88
|
+
For messages forwarded from channels, information about the original channel. For messages forwarded from anonymous group administrators, information about the original supergroup.
|
|
89
|
+
|
|
90
|
+
forward_from_message_id (``int``, *optional*):
|
|
91
|
+
For messages forwarded from channels, identifier of the original message in the channel.
|
|
92
|
+
|
|
93
|
+
forward_signature (``str``, *optional*):
|
|
94
|
+
For messages forwarded from channels, signature of the post author if present.
|
|
95
|
+
|
|
96
|
+
forward_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
97
|
+
For forwarded messages, date the original message was sent.
|
|
98
|
+
|
|
99
|
+
reply_to_message_id (``int``, *optional*):
|
|
100
|
+
The id of the message which this message directly replied to.
|
|
101
|
+
|
|
102
|
+
reply_to_top_message_id (``int``, *optional*):
|
|
103
|
+
The id of the first message which started this message thread.
|
|
104
|
+
|
|
105
|
+
reply_to_message (:obj:`~pyrogram.types.Message`, *optional*):
|
|
106
|
+
For replies, the original message. Note that the Message object in this field will not contain
|
|
107
|
+
further reply_to_message fields even if it itself is a reply.
|
|
108
|
+
|
|
109
|
+
mentioned (``bool``, *optional*):
|
|
110
|
+
The message contains a mention.
|
|
111
|
+
|
|
112
|
+
empty (``bool``, *optional*):
|
|
113
|
+
The message is empty.
|
|
114
|
+
A message can be empty in case it was deleted or you tried to retrieve a message that doesn't exist yet.
|
|
115
|
+
|
|
116
|
+
service (:obj:`~pyrogram.enums.MessageServiceType`, *optional*):
|
|
117
|
+
The message is a service message.
|
|
118
|
+
This field will contain the enumeration type of the service message.
|
|
119
|
+
You can use ``service = getattr(message, message.service.value)`` to access the service message.
|
|
120
|
+
|
|
121
|
+
media (:obj:`~pyrogram.enums.MessageMediaType`, *optional*):
|
|
122
|
+
The message is a media message.
|
|
123
|
+
This field will contain the enumeration type of the media message.
|
|
124
|
+
You can use ``media = getattr(message, message.media.value)`` to access the media message.
|
|
125
|
+
|
|
126
|
+
edit_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
127
|
+
Date the message was last edited.
|
|
128
|
+
|
|
129
|
+
media_group_id (``str``, *optional*):
|
|
130
|
+
The unique identifier of a media message group this message belongs to.
|
|
131
|
+
|
|
132
|
+
author_signature (``str``, *optional*):
|
|
133
|
+
Signature of the post author for messages in channels, or the custom title of an anonymous group
|
|
134
|
+
administrator.
|
|
135
|
+
|
|
136
|
+
has_protected_content (``bool``, *optional*):
|
|
137
|
+
True, if the message can't be forwarded.
|
|
138
|
+
|
|
139
|
+
has_media_spoiler (``bool``, *optional*):
|
|
140
|
+
True, if the message media is covered by a spoiler animation.
|
|
141
|
+
|
|
142
|
+
text (``str``, *optional*):
|
|
143
|
+
For text messages, the actual UTF-8 text of the message, 0-4096 characters.
|
|
144
|
+
If the message contains entities (bold, italic, ...) you can access *text.markdown* or
|
|
145
|
+
*text.html* to get the marked up message text. In case there is no entity, the fields
|
|
146
|
+
will contain the same text as *text*.
|
|
147
|
+
|
|
148
|
+
entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
|
|
149
|
+
For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.
|
|
150
|
+
|
|
151
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
|
|
152
|
+
For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear
|
|
153
|
+
in the caption.
|
|
154
|
+
|
|
155
|
+
audio (:obj:`~pyrogram.types.Audio`, *optional*):
|
|
156
|
+
Message is an audio file, information about the file.
|
|
157
|
+
|
|
158
|
+
document (:obj:`~pyrogram.types.Document`, *optional*):
|
|
159
|
+
Message is a general file, information about the file.
|
|
160
|
+
|
|
161
|
+
photo (:obj:`~pyrogram.types.Photo`, *optional*):
|
|
162
|
+
Message is a photo, information about the photo.
|
|
163
|
+
|
|
164
|
+
sticker (:obj:`~pyrogram.types.Sticker`, *optional*):
|
|
165
|
+
Message is a sticker, information about the sticker.
|
|
166
|
+
|
|
167
|
+
animation (:obj:`~pyrogram.types.Animation`, *optional*):
|
|
168
|
+
Message is an animation, information about the animation.
|
|
169
|
+
|
|
170
|
+
game (:obj:`~pyrogram.types.Game`, *optional*):
|
|
171
|
+
Message is a game, information about the game.
|
|
172
|
+
|
|
173
|
+
video (:obj:`~pyrogram.types.Video`, *optional*):
|
|
174
|
+
Message is a video, information about the video.
|
|
175
|
+
|
|
176
|
+
voice (:obj:`~pyrogram.types.Voice`, *optional*):
|
|
177
|
+
Message is a voice message, information about the file.
|
|
178
|
+
|
|
179
|
+
video_note (:obj:`~pyrogram.types.VideoNote`, *optional*):
|
|
180
|
+
Message is a video note, information about the video message.
|
|
181
|
+
|
|
182
|
+
caption (``str``, *optional*):
|
|
183
|
+
Caption for the audio, document, photo, video or voice, 0-1024 characters.
|
|
184
|
+
If the message contains caption entities (bold, italic, ...) you can access *caption.markdown* or
|
|
185
|
+
*caption.html* to get the marked up caption text. In case there is no caption entity, the fields
|
|
186
|
+
will contain the same text as *caption*.
|
|
187
|
+
|
|
188
|
+
contact (:obj:`~pyrogram.types.Contact`, *optional*):
|
|
189
|
+
Message is a shared contact, information about the contact.
|
|
190
|
+
|
|
191
|
+
location (:obj:`~pyrogram.types.Location`, *optional*):
|
|
192
|
+
Message is a shared location, information about the location.
|
|
193
|
+
|
|
194
|
+
venue (:obj:`~pyrogram.types.Venue`, *optional*):
|
|
195
|
+
Message is a venue, information about the venue.
|
|
196
|
+
|
|
197
|
+
web_page (:obj:`~pyrogram.types.WebPage`, *optional*):
|
|
198
|
+
Message was sent with a webpage preview.
|
|
199
|
+
|
|
200
|
+
poll (:obj:`~pyrogram.types.Poll`, *optional*):
|
|
201
|
+
Message is a native poll, information about the poll.
|
|
202
|
+
|
|
203
|
+
dice (:obj:`~pyrogram.types.Dice`, *optional*):
|
|
204
|
+
A dice containing a value that is randomly generated by Telegram.
|
|
205
|
+
|
|
206
|
+
new_chat_members (List of :obj:`~pyrogram.types.User`, *optional*):
|
|
207
|
+
New members that were added to the group or supergroup and information about them
|
|
208
|
+
(the bot itself may be one of these members).
|
|
209
|
+
|
|
210
|
+
left_chat_member (:obj:`~pyrogram.types.User`, *optional*):
|
|
211
|
+
A member was removed from the group, information about them (this member may be the bot itself).
|
|
212
|
+
|
|
213
|
+
new_chat_title (``str``, *optional*):
|
|
214
|
+
A chat title was changed to this value.
|
|
215
|
+
|
|
216
|
+
new_chat_photo (:obj:`~pyrogram.types.Photo`, *optional*):
|
|
217
|
+
A chat photo was change to this value.
|
|
218
|
+
|
|
219
|
+
delete_chat_photo (``bool``, *optional*):
|
|
220
|
+
Service message: the chat photo was deleted.
|
|
221
|
+
|
|
222
|
+
group_chat_created (``bool``, *optional*):
|
|
223
|
+
Service message: the group has been created.
|
|
224
|
+
|
|
225
|
+
supergroup_chat_created (``bool``, *optional*):
|
|
226
|
+
Service message: the supergroup has been created.
|
|
227
|
+
This field can't be received in a message coming through updates, because bot can't be a member of a
|
|
228
|
+
supergroup when it is created. It can only be found in reply_to_message if someone replies to a very
|
|
229
|
+
first message in a directly created supergroup.
|
|
230
|
+
|
|
231
|
+
channel_chat_created (``bool``, *optional*):
|
|
232
|
+
Service message: the channel has been created.
|
|
233
|
+
This field can't be received in a message coming through updates, because bot can't be a member of a
|
|
234
|
+
channel when it is created. It can only be found in reply_to_message if someone replies to a very
|
|
235
|
+
first message in a channel.
|
|
236
|
+
|
|
237
|
+
migrate_to_chat_id (``int``, *optional*):
|
|
238
|
+
The group has been migrated to a supergroup with the specified identifier.
|
|
239
|
+
This number may be greater than 32 bits and some programming languages may have difficulty/silent defects
|
|
240
|
+
in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float
|
|
241
|
+
type are safe for storing this identifier.
|
|
242
|
+
|
|
243
|
+
migrate_from_chat_id (``int``, *optional*):
|
|
244
|
+
The supergroup has been migrated from a group with the specified identifier.
|
|
245
|
+
This number may be greater than 32 bits and some programming languages may have difficulty/silent defects
|
|
246
|
+
in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float
|
|
247
|
+
type are safe for storing this identifier.
|
|
248
|
+
|
|
249
|
+
pinned_message (:obj:`~pyrogram.types.Message`, *optional*):
|
|
250
|
+
Specified message was pinned.
|
|
251
|
+
Note that the Message object in this field will not contain further reply_to_message fields even if it
|
|
252
|
+
is itself a reply.
|
|
253
|
+
|
|
254
|
+
game_high_score (:obj:`~pyrogram.types.GameHighScore`, *optional*):
|
|
255
|
+
The game score for a user.
|
|
256
|
+
The reply_to_message field will contain the game Message.
|
|
257
|
+
|
|
258
|
+
views (``int``, *optional*):
|
|
259
|
+
Channel post views.
|
|
260
|
+
|
|
261
|
+
forwards (``int``, *optional*):
|
|
262
|
+
Channel post forwards.
|
|
263
|
+
|
|
264
|
+
via_bot (:obj:`~pyrogram.types.User`):
|
|
265
|
+
The information of the bot that generated the message from an inline query of a user.
|
|
266
|
+
|
|
267
|
+
outgoing (``bool``, *optional*):
|
|
268
|
+
Whether the message is incoming or outgoing.
|
|
269
|
+
Messages received from other chats are incoming (*outgoing* is False).
|
|
270
|
+
Messages sent from yourself to other chats are outgoing (*outgoing* is True).
|
|
271
|
+
An exception is made for your own personal chat; messages sent there will be incoming.
|
|
272
|
+
|
|
273
|
+
matches (List of regex Matches, *optional*):
|
|
274
|
+
A list containing all `Match Objects <https://docs.python.org/3/library/re.html#match-objects>`_ that match
|
|
275
|
+
the text of this message. Only applicable when using :obj:`Filters.regex <pyrogram.Filters.regex>`.
|
|
276
|
+
|
|
277
|
+
command (List of ``str``, *optional*):
|
|
278
|
+
A list containing the command and its arguments, if any.
|
|
279
|
+
E.g.: "/start 1 2 3" would produce ["start", "1", "2", "3"].
|
|
280
|
+
Only applicable when using :obj:`~pyrogram.filters.command`.
|
|
281
|
+
|
|
282
|
+
video_chat_scheduled (:obj:`~pyrogram.types.VideoChatScheduled`, *optional*):
|
|
283
|
+
Service message: voice chat scheduled.
|
|
284
|
+
|
|
285
|
+
video_chat_started (:obj:`~pyrogram.types.VideoChatStarted`, *optional*):
|
|
286
|
+
Service message: the voice chat started.
|
|
287
|
+
|
|
288
|
+
video_chat_ended (:obj:`~pyrogram.types.VideoChatEnded`, *optional*):
|
|
289
|
+
Service message: the voice chat has ended.
|
|
290
|
+
|
|
291
|
+
video_chat_members_invited (:obj:`~pyrogram.types.VoiceChatParticipantsInvited`, *optional*):
|
|
292
|
+
Service message: new members were invited to the voice chat.
|
|
293
|
+
|
|
294
|
+
web_app_data (:obj:`~pyrogram.types.WebAppData`, *optional*):
|
|
295
|
+
Service message: web app data sent to the bot.
|
|
296
|
+
|
|
297
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
298
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
299
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
300
|
+
|
|
301
|
+
reactions (List of :obj:`~pyrogram.types.Reaction`):
|
|
302
|
+
List of the reactions to this message.
|
|
303
|
+
|
|
304
|
+
link (``str``, *property*):
|
|
305
|
+
Generate a link to this message, only for groups and channels.
|
|
306
|
+
"""
|
|
307
|
+
|
|
308
|
+
# TODO: Add game missing field. Also invoice, successful_payment, connected_website
|
|
309
|
+
|
|
310
|
+
def __init__(
|
|
311
|
+
self,
|
|
312
|
+
*,
|
|
313
|
+
client: "pyrogram.Client" = None,
|
|
314
|
+
id: int,
|
|
315
|
+
from_user: "types.User" = None,
|
|
316
|
+
sender_chat: "types.Chat" = None,
|
|
317
|
+
date: datetime = None,
|
|
318
|
+
chat: "types.Chat" = None,
|
|
319
|
+
forward_from: "types.User" = None,
|
|
320
|
+
forward_sender_name: str = None,
|
|
321
|
+
forward_from_chat: "types.Chat" = None,
|
|
322
|
+
forward_from_message_id: int = None,
|
|
323
|
+
forward_signature: str = None,
|
|
324
|
+
forward_date: datetime = None,
|
|
325
|
+
reply_to_message_id: int = None,
|
|
326
|
+
reply_to_top_message_id: int = None,
|
|
327
|
+
reply_to_message: "Message" = None,
|
|
328
|
+
mentioned: bool = None,
|
|
329
|
+
empty: bool = None,
|
|
330
|
+
service: "enums.MessageServiceType" = None,
|
|
331
|
+
scheduled: bool = None,
|
|
332
|
+
from_scheduled: bool = None,
|
|
333
|
+
media: "enums.MessageMediaType" = None,
|
|
334
|
+
edit_date: datetime = None,
|
|
335
|
+
media_group_id: str = None,
|
|
336
|
+
author_signature: str = None,
|
|
337
|
+
has_protected_content: bool = None,
|
|
338
|
+
has_media_spoiler: bool = None,
|
|
339
|
+
text: Str = None,
|
|
340
|
+
entities: List["types.MessageEntity"] = None,
|
|
341
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
342
|
+
audio: "types.Audio" = None,
|
|
343
|
+
document: "types.Document" = None,
|
|
344
|
+
photo: "types.Photo" = None,
|
|
345
|
+
sticker: "types.Sticker" = None,
|
|
346
|
+
animation: "types.Animation" = None,
|
|
347
|
+
game: "types.Game" = None,
|
|
348
|
+
video: "types.Video" = None,
|
|
349
|
+
voice: "types.Voice" = None,
|
|
350
|
+
video_note: "types.VideoNote" = None,
|
|
351
|
+
caption: Str = None,
|
|
352
|
+
contact: "types.Contact" = None,
|
|
353
|
+
location: "types.Location" = None,
|
|
354
|
+
venue: "types.Venue" = None,
|
|
355
|
+
web_page: "types.WebPage" = None,
|
|
356
|
+
poll: "types.Poll" = None,
|
|
357
|
+
dice: "types.Dice" = None,
|
|
358
|
+
new_chat_members: List["types.User"] = None,
|
|
359
|
+
left_chat_member: "types.User" = None,
|
|
360
|
+
new_chat_title: str = None,
|
|
361
|
+
new_chat_photo: "types.Photo" = None,
|
|
362
|
+
delete_chat_photo: bool = None,
|
|
363
|
+
group_chat_created: bool = None,
|
|
364
|
+
supergroup_chat_created: bool = None,
|
|
365
|
+
channel_chat_created: bool = None,
|
|
366
|
+
migrate_to_chat_id: int = None,
|
|
367
|
+
migrate_from_chat_id: int = None,
|
|
368
|
+
pinned_message: "Message" = None,
|
|
369
|
+
game_high_score: int = None,
|
|
370
|
+
views: int = None,
|
|
371
|
+
forwards: int = None,
|
|
372
|
+
via_bot: "types.User" = None,
|
|
373
|
+
outgoing: bool = None,
|
|
374
|
+
matches: List[Match] = None,
|
|
375
|
+
command: List[str] = None,
|
|
376
|
+
video_chat_scheduled: "types.VideoChatScheduled" = None,
|
|
377
|
+
video_chat_started: "types.VideoChatStarted" = None,
|
|
378
|
+
video_chat_ended: "types.VideoChatEnded" = None,
|
|
379
|
+
video_chat_members_invited: "types.VideoChatMembersInvited" = None,
|
|
380
|
+
web_app_data: "types.WebAppData" = None,
|
|
381
|
+
reply_markup: Union[
|
|
382
|
+
"types.InlineKeyboardMarkup",
|
|
383
|
+
"types.ReplyKeyboardMarkup",
|
|
384
|
+
"types.ReplyKeyboardRemove",
|
|
385
|
+
"types.ForceReply"
|
|
386
|
+
] = None,
|
|
387
|
+
reactions: List["types.Reaction"] = None
|
|
388
|
+
):
|
|
389
|
+
super().__init__(client)
|
|
390
|
+
|
|
391
|
+
self.id = id
|
|
392
|
+
self.from_user = from_user
|
|
393
|
+
self.sender_chat = sender_chat
|
|
394
|
+
self.date = date
|
|
395
|
+
self.chat = chat
|
|
396
|
+
self.forward_from = forward_from
|
|
397
|
+
self.forward_sender_name = forward_sender_name
|
|
398
|
+
self.forward_from_chat = forward_from_chat
|
|
399
|
+
self.forward_from_message_id = forward_from_message_id
|
|
400
|
+
self.forward_signature = forward_signature
|
|
401
|
+
self.forward_date = forward_date
|
|
402
|
+
self.reply_to_message_id = reply_to_message_id
|
|
403
|
+
self.reply_to_top_message_id = reply_to_top_message_id
|
|
404
|
+
self.reply_to_message = reply_to_message
|
|
405
|
+
self.mentioned = mentioned
|
|
406
|
+
self.empty = empty
|
|
407
|
+
self.service = service
|
|
408
|
+
self.scheduled = scheduled
|
|
409
|
+
self.from_scheduled = from_scheduled
|
|
410
|
+
self.media = media
|
|
411
|
+
self.edit_date = edit_date
|
|
412
|
+
self.media_group_id = media_group_id
|
|
413
|
+
self.author_signature = author_signature
|
|
414
|
+
self.has_protected_content = has_protected_content
|
|
415
|
+
self.has_media_spoiler = has_media_spoiler
|
|
416
|
+
self.text = text
|
|
417
|
+
self.entities = entities
|
|
418
|
+
self.caption_entities = caption_entities
|
|
419
|
+
self.audio = audio
|
|
420
|
+
self.document = document
|
|
421
|
+
self.photo = photo
|
|
422
|
+
self.sticker = sticker
|
|
423
|
+
self.animation = animation
|
|
424
|
+
self.game = game
|
|
425
|
+
self.video = video
|
|
426
|
+
self.voice = voice
|
|
427
|
+
self.video_note = video_note
|
|
428
|
+
self.caption = caption
|
|
429
|
+
self.contact = contact
|
|
430
|
+
self.location = location
|
|
431
|
+
self.venue = venue
|
|
432
|
+
self.web_page = web_page
|
|
433
|
+
self.poll = poll
|
|
434
|
+
self.dice = dice
|
|
435
|
+
self.new_chat_members = new_chat_members
|
|
436
|
+
self.left_chat_member = left_chat_member
|
|
437
|
+
self.new_chat_title = new_chat_title
|
|
438
|
+
self.new_chat_photo = new_chat_photo
|
|
439
|
+
self.delete_chat_photo = delete_chat_photo
|
|
440
|
+
self.group_chat_created = group_chat_created
|
|
441
|
+
self.supergroup_chat_created = supergroup_chat_created
|
|
442
|
+
self.channel_chat_created = channel_chat_created
|
|
443
|
+
self.migrate_to_chat_id = migrate_to_chat_id
|
|
444
|
+
self.migrate_from_chat_id = migrate_from_chat_id
|
|
445
|
+
self.pinned_message = pinned_message
|
|
446
|
+
self.game_high_score = game_high_score
|
|
447
|
+
self.views = views
|
|
448
|
+
self.forwards = forwards
|
|
449
|
+
self.via_bot = via_bot
|
|
450
|
+
self.outgoing = outgoing
|
|
451
|
+
self.matches = matches
|
|
452
|
+
self.command = command
|
|
453
|
+
self.reply_markup = reply_markup
|
|
454
|
+
self.video_chat_scheduled = video_chat_scheduled
|
|
455
|
+
self.video_chat_started = video_chat_started
|
|
456
|
+
self.video_chat_ended = video_chat_ended
|
|
457
|
+
self.video_chat_members_invited = video_chat_members_invited
|
|
458
|
+
self.web_app_data = web_app_data
|
|
459
|
+
self.reactions = reactions
|
|
460
|
+
|
|
461
|
+
@staticmethod
|
|
462
|
+
async def _parse(
|
|
463
|
+
client: "pyrogram.Client",
|
|
464
|
+
message: raw.base.Message,
|
|
465
|
+
users: dict,
|
|
466
|
+
chats: dict,
|
|
467
|
+
is_scheduled: bool = False,
|
|
468
|
+
replies: int = 1
|
|
469
|
+
):
|
|
470
|
+
if isinstance(message, raw.types.MessageEmpty):
|
|
471
|
+
return Message(id=message.id, empty=True, client=client)
|
|
472
|
+
|
|
473
|
+
from_id = utils.get_raw_peer_id(message.from_id)
|
|
474
|
+
peer_id = utils.get_raw_peer_id(message.peer_id)
|
|
475
|
+
user_id = from_id or peer_id
|
|
476
|
+
|
|
477
|
+
if isinstance(message.from_id, raw.types.PeerUser) and isinstance(message.peer_id, raw.types.PeerUser):
|
|
478
|
+
if from_id not in users or peer_id not in users:
|
|
479
|
+
try:
|
|
480
|
+
r = await client.invoke(
|
|
481
|
+
raw.functions.users.GetUsers(
|
|
482
|
+
id=[
|
|
483
|
+
await client.resolve_peer(from_id),
|
|
484
|
+
await client.resolve_peer(peer_id)
|
|
485
|
+
]
|
|
486
|
+
)
|
|
487
|
+
)
|
|
488
|
+
except PeerIdInvalid:
|
|
489
|
+
pass
|
|
490
|
+
else:
|
|
491
|
+
users.update({i.id: i for i in r})
|
|
492
|
+
|
|
493
|
+
if isinstance(message, raw.types.MessageService):
|
|
494
|
+
action = message.action
|
|
495
|
+
|
|
496
|
+
new_chat_members = None
|
|
497
|
+
left_chat_member = None
|
|
498
|
+
new_chat_title = None
|
|
499
|
+
delete_chat_photo = None
|
|
500
|
+
migrate_to_chat_id = None
|
|
501
|
+
migrate_from_chat_id = None
|
|
502
|
+
group_chat_created = None
|
|
503
|
+
channel_chat_created = None
|
|
504
|
+
new_chat_photo = None
|
|
505
|
+
video_chat_scheduled = None
|
|
506
|
+
video_chat_started = None
|
|
507
|
+
video_chat_ended = None
|
|
508
|
+
video_chat_members_invited = None
|
|
509
|
+
web_app_data = None
|
|
510
|
+
|
|
511
|
+
service_type = None
|
|
512
|
+
|
|
513
|
+
if isinstance(action, raw.types.MessageActionChatAddUser):
|
|
514
|
+
new_chat_members = [types.User._parse(client, users[i]) for i in action.users]
|
|
515
|
+
service_type = enums.MessageServiceType.NEW_CHAT_MEMBERS
|
|
516
|
+
elif isinstance(action, raw.types.MessageActionChatJoinedByLink):
|
|
517
|
+
new_chat_members = [types.User._parse(client, users[utils.get_raw_peer_id(message.from_id)])]
|
|
518
|
+
service_type = enums.MessageServiceType.NEW_CHAT_MEMBERS
|
|
519
|
+
elif isinstance(action, raw.types.MessageActionChatDeleteUser):
|
|
520
|
+
left_chat_member = types.User._parse(client, users[action.user_id])
|
|
521
|
+
service_type = enums.MessageServiceType.LEFT_CHAT_MEMBERS
|
|
522
|
+
elif isinstance(action, raw.types.MessageActionChatEditTitle):
|
|
523
|
+
new_chat_title = action.title
|
|
524
|
+
service_type = enums.MessageServiceType.NEW_CHAT_TITLE
|
|
525
|
+
elif isinstance(action, raw.types.MessageActionChatDeletePhoto):
|
|
526
|
+
delete_chat_photo = True
|
|
527
|
+
service_type = enums.MessageServiceType.DELETE_CHAT_PHOTO
|
|
528
|
+
elif isinstance(action, raw.types.MessageActionChatMigrateTo):
|
|
529
|
+
migrate_to_chat_id = action.channel_id
|
|
530
|
+
service_type = enums.MessageServiceType.MIGRATE_TO_CHAT_ID
|
|
531
|
+
elif isinstance(action, raw.types.MessageActionChannelMigrateFrom):
|
|
532
|
+
migrate_from_chat_id = action.chat_id
|
|
533
|
+
service_type = enums.MessageServiceType.MIGRATE_FROM_CHAT_ID
|
|
534
|
+
elif isinstance(action, raw.types.MessageActionChatCreate):
|
|
535
|
+
group_chat_created = True
|
|
536
|
+
service_type = enums.MessageServiceType.GROUP_CHAT_CREATED
|
|
537
|
+
elif isinstance(action, raw.types.MessageActionChannelCreate):
|
|
538
|
+
channel_chat_created = True
|
|
539
|
+
service_type = enums.MessageServiceType.CHANNEL_CHAT_CREATED
|
|
540
|
+
elif isinstance(action, raw.types.MessageActionChatEditPhoto):
|
|
541
|
+
new_chat_photo = types.Photo._parse(client, action.photo)
|
|
542
|
+
service_type = enums.MessageServiceType.NEW_CHAT_PHOTO
|
|
543
|
+
elif isinstance(action, raw.types.MessageActionGroupCallScheduled):
|
|
544
|
+
video_chat_scheduled = types.VideoChatScheduled._parse(action)
|
|
545
|
+
service_type = enums.MessageServiceType.VIDEO_CHAT_SCHEDULED
|
|
546
|
+
elif isinstance(action, raw.types.MessageActionGroupCall):
|
|
547
|
+
if action.duration:
|
|
548
|
+
video_chat_ended = types.VideoChatEnded._parse(action)
|
|
549
|
+
service_type = enums.MessageServiceType.VIDEO_CHAT_ENDED
|
|
550
|
+
else:
|
|
551
|
+
video_chat_started = types.VideoChatStarted()
|
|
552
|
+
service_type = enums.MessageServiceType.VIDEO_CHAT_STARTED
|
|
553
|
+
elif isinstance(action, raw.types.MessageActionInviteToGroupCall):
|
|
554
|
+
video_chat_members_invited = types.VideoChatMembersInvited._parse(client, action, users)
|
|
555
|
+
service_type = enums.MessageServiceType.VIDEO_CHAT_MEMBERS_INVITED
|
|
556
|
+
elif isinstance(action, raw.types.MessageActionWebViewDataSentMe):
|
|
557
|
+
web_app_data = types.WebAppData._parse(action)
|
|
558
|
+
service_type = enums.MessageServiceType.WEB_APP_DATA
|
|
559
|
+
|
|
560
|
+
from_user = types.User._parse(client, users.get(user_id, None))
|
|
561
|
+
sender_chat = types.Chat._parse(client, message, users, chats, is_chat=False) if not from_user else None
|
|
562
|
+
|
|
563
|
+
parsed_message = Message(
|
|
564
|
+
id=message.id,
|
|
565
|
+
date=utils.timestamp_to_datetime(message.date),
|
|
566
|
+
chat=types.Chat._parse(client, message, users, chats, is_chat=True),
|
|
567
|
+
from_user=from_user,
|
|
568
|
+
sender_chat=sender_chat,
|
|
569
|
+
service=service_type,
|
|
570
|
+
new_chat_members=new_chat_members,
|
|
571
|
+
left_chat_member=left_chat_member,
|
|
572
|
+
new_chat_title=new_chat_title,
|
|
573
|
+
new_chat_photo=new_chat_photo,
|
|
574
|
+
delete_chat_photo=delete_chat_photo,
|
|
575
|
+
migrate_to_chat_id=utils.get_channel_id(migrate_to_chat_id) if migrate_to_chat_id else None,
|
|
576
|
+
migrate_from_chat_id=-migrate_from_chat_id if migrate_from_chat_id else None,
|
|
577
|
+
group_chat_created=group_chat_created,
|
|
578
|
+
channel_chat_created=channel_chat_created,
|
|
579
|
+
video_chat_scheduled=video_chat_scheduled,
|
|
580
|
+
video_chat_started=video_chat_started,
|
|
581
|
+
video_chat_ended=video_chat_ended,
|
|
582
|
+
video_chat_members_invited=video_chat_members_invited,
|
|
583
|
+
web_app_data=web_app_data,
|
|
584
|
+
client=client
|
|
585
|
+
# TODO: supergroup_chat_created
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
if isinstance(action, raw.types.MessageActionPinMessage):
|
|
589
|
+
try:
|
|
590
|
+
parsed_message.pinned_message = await client.get_messages(
|
|
591
|
+
parsed_message.chat.id,
|
|
592
|
+
reply_to_message_ids=message.id,
|
|
593
|
+
replies=0
|
|
594
|
+
)
|
|
595
|
+
|
|
596
|
+
parsed_message.service = enums.MessageServiceType.PINNED_MESSAGE
|
|
597
|
+
except MessageIdsEmpty:
|
|
598
|
+
pass
|
|
599
|
+
|
|
600
|
+
if isinstance(action, raw.types.MessageActionGameScore):
|
|
601
|
+
parsed_message.game_high_score = types.GameHighScore._parse_action(client, message, users)
|
|
602
|
+
|
|
603
|
+
if message.reply_to and replies:
|
|
604
|
+
try:
|
|
605
|
+
parsed_message.reply_to_message = await client.get_messages(
|
|
606
|
+
parsed_message.chat.id,
|
|
607
|
+
reply_to_message_ids=message.id,
|
|
608
|
+
replies=0
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
parsed_message.service = enums.MessageServiceType.GAME_HIGH_SCORE
|
|
612
|
+
except MessageIdsEmpty:
|
|
613
|
+
pass
|
|
614
|
+
|
|
615
|
+
client.message_cache[(parsed_message.chat.id, parsed_message.id)] = parsed_message
|
|
616
|
+
|
|
617
|
+
return parsed_message
|
|
618
|
+
|
|
619
|
+
if isinstance(message, raw.types.Message):
|
|
620
|
+
entities = [types.MessageEntity._parse(client, entity, users) for entity in message.entities]
|
|
621
|
+
entities = types.List(filter(lambda x: x is not None, entities))
|
|
622
|
+
|
|
623
|
+
forward_from = None
|
|
624
|
+
forward_sender_name = None
|
|
625
|
+
forward_from_chat = None
|
|
626
|
+
forward_from_message_id = None
|
|
627
|
+
forward_signature = None
|
|
628
|
+
forward_date = None
|
|
629
|
+
|
|
630
|
+
forward_header = message.fwd_from # type: raw.types.MessageFwdHeader
|
|
631
|
+
|
|
632
|
+
if forward_header:
|
|
633
|
+
forward_date = utils.timestamp_to_datetime(forward_header.date)
|
|
634
|
+
|
|
635
|
+
if forward_header.from_id:
|
|
636
|
+
raw_peer_id = utils.get_raw_peer_id(forward_header.from_id)
|
|
637
|
+
peer_id = utils.get_peer_id(forward_header.from_id)
|
|
638
|
+
|
|
639
|
+
if peer_id > 0:
|
|
640
|
+
forward_from = types.User._parse(client, users[raw_peer_id])
|
|
641
|
+
else:
|
|
642
|
+
forward_from_chat = types.Chat._parse_channel_chat(client, chats[raw_peer_id])
|
|
643
|
+
forward_from_message_id = forward_header.channel_post
|
|
644
|
+
forward_signature = forward_header.post_author
|
|
645
|
+
elif forward_header.from_name:
|
|
646
|
+
forward_sender_name = forward_header.from_name
|
|
647
|
+
|
|
648
|
+
photo = None
|
|
649
|
+
location = None
|
|
650
|
+
contact = None
|
|
651
|
+
venue = None
|
|
652
|
+
game = None
|
|
653
|
+
audio = None
|
|
654
|
+
voice = None
|
|
655
|
+
animation = None
|
|
656
|
+
video = None
|
|
657
|
+
video_note = None
|
|
658
|
+
sticker = None
|
|
659
|
+
document = None
|
|
660
|
+
web_page = None
|
|
661
|
+
poll = None
|
|
662
|
+
dice = None
|
|
663
|
+
|
|
664
|
+
media = message.media
|
|
665
|
+
media_type = None
|
|
666
|
+
has_media_spoiler = None
|
|
667
|
+
|
|
668
|
+
if media:
|
|
669
|
+
if isinstance(media, raw.types.MessageMediaPhoto):
|
|
670
|
+
photo = types.Photo._parse(client, media.photo, media.ttl_seconds)
|
|
671
|
+
media_type = enums.MessageMediaType.PHOTO
|
|
672
|
+
has_media_spoiler = media.spoiler
|
|
673
|
+
elif isinstance(media, raw.types.MessageMediaGeo):
|
|
674
|
+
location = types.Location._parse(client, media.geo)
|
|
675
|
+
media_type = enums.MessageMediaType.LOCATION
|
|
676
|
+
elif isinstance(media, raw.types.MessageMediaContact):
|
|
677
|
+
contact = types.Contact._parse(client, media)
|
|
678
|
+
media_type = enums.MessageMediaType.CONTACT
|
|
679
|
+
elif isinstance(media, raw.types.MessageMediaVenue):
|
|
680
|
+
venue = types.Venue._parse(client, media)
|
|
681
|
+
media_type = enums.MessageMediaType.VENUE
|
|
682
|
+
elif isinstance(media, raw.types.MessageMediaGame):
|
|
683
|
+
game = types.Game._parse(client, message)
|
|
684
|
+
media_type = enums.MessageMediaType.GAME
|
|
685
|
+
elif isinstance(media, raw.types.MessageMediaDocument):
|
|
686
|
+
doc = media.document
|
|
687
|
+
|
|
688
|
+
if isinstance(doc, raw.types.Document):
|
|
689
|
+
attributes = {type(i): i for i in doc.attributes}
|
|
690
|
+
|
|
691
|
+
file_name = getattr(
|
|
692
|
+
attributes.get(
|
|
693
|
+
raw.types.DocumentAttributeFilename, None
|
|
694
|
+
), "file_name", None
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
if raw.types.DocumentAttributeAnimated in attributes:
|
|
698
|
+
video_attributes = attributes.get(raw.types.DocumentAttributeVideo, None)
|
|
699
|
+
animation = types.Animation._parse(client, doc, video_attributes, file_name)
|
|
700
|
+
media_type = enums.MessageMediaType.ANIMATION
|
|
701
|
+
has_media_spoiler = media.spoiler
|
|
702
|
+
elif raw.types.DocumentAttributeSticker in attributes:
|
|
703
|
+
sticker = await types.Sticker._parse(client, doc, attributes)
|
|
704
|
+
media_type = enums.MessageMediaType.STICKER
|
|
705
|
+
elif raw.types.DocumentAttributeVideo in attributes:
|
|
706
|
+
video_attributes = attributes[raw.types.DocumentAttributeVideo]
|
|
707
|
+
|
|
708
|
+
if video_attributes.round_message:
|
|
709
|
+
video_note = types.VideoNote._parse(client, doc, video_attributes)
|
|
710
|
+
media_type = enums.MessageMediaType.VIDEO_NOTE
|
|
711
|
+
else:
|
|
712
|
+
video = types.Video._parse(client, doc, video_attributes, file_name, media.ttl_seconds)
|
|
713
|
+
media_type = enums.MessageMediaType.VIDEO
|
|
714
|
+
has_media_spoiler = media.spoiler
|
|
715
|
+
elif raw.types.DocumentAttributeAudio in attributes:
|
|
716
|
+
audio_attributes = attributes[raw.types.DocumentAttributeAudio]
|
|
717
|
+
|
|
718
|
+
if audio_attributes.voice:
|
|
719
|
+
voice = types.Voice._parse(client, doc, audio_attributes)
|
|
720
|
+
media_type = enums.MessageMediaType.VOICE
|
|
721
|
+
else:
|
|
722
|
+
audio = types.Audio._parse(client, doc, audio_attributes, file_name)
|
|
723
|
+
media_type = enums.MessageMediaType.AUDIO
|
|
724
|
+
else:
|
|
725
|
+
document = types.Document._parse(client, doc, file_name)
|
|
726
|
+
media_type = enums.MessageMediaType.DOCUMENT
|
|
727
|
+
elif isinstance(media, raw.types.MessageMediaWebPage):
|
|
728
|
+
if isinstance(media.webpage, raw.types.WebPage):
|
|
729
|
+
web_page = types.WebPage._parse(client, media.webpage)
|
|
730
|
+
media_type = enums.MessageMediaType.WEB_PAGE
|
|
731
|
+
else:
|
|
732
|
+
media = None
|
|
733
|
+
elif isinstance(media, raw.types.MessageMediaPoll):
|
|
734
|
+
poll = types.Poll._parse(client, media)
|
|
735
|
+
media_type = enums.MessageMediaType.POLL
|
|
736
|
+
elif isinstance(media, raw.types.MessageMediaDice):
|
|
737
|
+
dice = types.Dice._parse(client, media)
|
|
738
|
+
media_type = enums.MessageMediaType.DICE
|
|
739
|
+
else:
|
|
740
|
+
media = None
|
|
741
|
+
|
|
742
|
+
reply_markup = message.reply_markup
|
|
743
|
+
|
|
744
|
+
if reply_markup:
|
|
745
|
+
if isinstance(reply_markup, raw.types.ReplyKeyboardForceReply):
|
|
746
|
+
reply_markup = types.ForceReply.read(reply_markup)
|
|
747
|
+
elif isinstance(reply_markup, raw.types.ReplyKeyboardMarkup):
|
|
748
|
+
reply_markup = types.ReplyKeyboardMarkup.read(reply_markup)
|
|
749
|
+
elif isinstance(reply_markup, raw.types.ReplyInlineMarkup):
|
|
750
|
+
reply_markup = types.InlineKeyboardMarkup.read(reply_markup)
|
|
751
|
+
elif isinstance(reply_markup, raw.types.ReplyKeyboardHide):
|
|
752
|
+
reply_markup = types.ReplyKeyboardRemove.read(reply_markup)
|
|
753
|
+
else:
|
|
754
|
+
reply_markup = None
|
|
755
|
+
|
|
756
|
+
from_user = types.User._parse(client, users.get(user_id, None))
|
|
757
|
+
sender_chat = types.Chat._parse(client, message, users, chats, is_chat=False) if not from_user else None
|
|
758
|
+
|
|
759
|
+
reactions = types.MessageReactions._parse(client, message.reactions)
|
|
760
|
+
|
|
761
|
+
parsed_message = Message(
|
|
762
|
+
id=message.id,
|
|
763
|
+
date=utils.timestamp_to_datetime(message.date),
|
|
764
|
+
chat=types.Chat._parse(client, message, users, chats, is_chat=True),
|
|
765
|
+
from_user=from_user,
|
|
766
|
+
sender_chat=sender_chat,
|
|
767
|
+
text=(
|
|
768
|
+
Str(message.message).init(entities) or None
|
|
769
|
+
if media is None or web_page is not None
|
|
770
|
+
else None
|
|
771
|
+
),
|
|
772
|
+
caption=(
|
|
773
|
+
Str(message.message).init(entities) or None
|
|
774
|
+
if media is not None and web_page is None
|
|
775
|
+
else None
|
|
776
|
+
),
|
|
777
|
+
entities=(
|
|
778
|
+
entities or None
|
|
779
|
+
if media is None or web_page is not None
|
|
780
|
+
else None
|
|
781
|
+
),
|
|
782
|
+
caption_entities=(
|
|
783
|
+
entities or None
|
|
784
|
+
if media is not None and web_page is None
|
|
785
|
+
else None
|
|
786
|
+
),
|
|
787
|
+
author_signature=message.post_author,
|
|
788
|
+
has_protected_content=message.noforwards,
|
|
789
|
+
has_media_spoiler=has_media_spoiler,
|
|
790
|
+
forward_from=forward_from,
|
|
791
|
+
forward_sender_name=forward_sender_name,
|
|
792
|
+
forward_from_chat=forward_from_chat,
|
|
793
|
+
forward_from_message_id=forward_from_message_id,
|
|
794
|
+
forward_signature=forward_signature,
|
|
795
|
+
forward_date=forward_date,
|
|
796
|
+
mentioned=message.mentioned,
|
|
797
|
+
scheduled=is_scheduled,
|
|
798
|
+
from_scheduled=message.from_scheduled,
|
|
799
|
+
media=media_type,
|
|
800
|
+
edit_date=utils.timestamp_to_datetime(message.edit_date),
|
|
801
|
+
media_group_id=message.grouped_id,
|
|
802
|
+
photo=photo,
|
|
803
|
+
location=location,
|
|
804
|
+
contact=contact,
|
|
805
|
+
venue=venue,
|
|
806
|
+
audio=audio,
|
|
807
|
+
voice=voice,
|
|
808
|
+
animation=animation,
|
|
809
|
+
game=game,
|
|
810
|
+
video=video,
|
|
811
|
+
video_note=video_note,
|
|
812
|
+
sticker=sticker,
|
|
813
|
+
document=document,
|
|
814
|
+
web_page=web_page,
|
|
815
|
+
poll=poll,
|
|
816
|
+
dice=dice,
|
|
817
|
+
views=message.views,
|
|
818
|
+
forwards=message.forwards,
|
|
819
|
+
via_bot=types.User._parse(client, users.get(message.via_bot_id, None)),
|
|
820
|
+
outgoing=message.out,
|
|
821
|
+
reply_markup=reply_markup,
|
|
822
|
+
reactions=reactions,
|
|
823
|
+
client=client
|
|
824
|
+
)
|
|
825
|
+
|
|
826
|
+
if message.reply_to:
|
|
827
|
+
parsed_message.reply_to_message_id = message.reply_to.reply_to_msg_id
|
|
828
|
+
parsed_message.reply_to_top_message_id = message.reply_to.reply_to_top_id
|
|
829
|
+
|
|
830
|
+
if replies:
|
|
831
|
+
try:
|
|
832
|
+
key = (parsed_message.chat.id, parsed_message.reply_to_message_id)
|
|
833
|
+
reply_to_message = client.message_cache[key]
|
|
834
|
+
|
|
835
|
+
if not reply_to_message:
|
|
836
|
+
reply_to_message = await client.get_messages(
|
|
837
|
+
parsed_message.chat.id,
|
|
838
|
+
reply_to_message_ids=message.id,
|
|
839
|
+
replies=replies - 1
|
|
840
|
+
)
|
|
841
|
+
|
|
842
|
+
parsed_message.reply_to_message = reply_to_message
|
|
843
|
+
except MessageIdsEmpty:
|
|
844
|
+
pass
|
|
845
|
+
|
|
846
|
+
if not parsed_message.poll: # Do not cache poll messages
|
|
847
|
+
client.message_cache[(parsed_message.chat.id, parsed_message.id)] = parsed_message
|
|
848
|
+
|
|
849
|
+
return parsed_message
|
|
850
|
+
|
|
851
|
+
@property
|
|
852
|
+
def link(self) -> str:
|
|
853
|
+
if (
|
|
854
|
+
self.chat.type in (enums.ChatType.GROUP, enums.ChatType.SUPERGROUP, enums.ChatType.CHANNEL)
|
|
855
|
+
and self.chat.username
|
|
856
|
+
):
|
|
857
|
+
return f"https://t.me/{self.chat.username}/{self.id}"
|
|
858
|
+
else:
|
|
859
|
+
return f"https://t.me/c/{utils.get_channel_id(self.chat.id)}/{self.id}"
|
|
860
|
+
|
|
861
|
+
async def get_media_group(self) -> List["types.Message"]:
|
|
862
|
+
"""Bound method *get_media_group* of :obj:`~pyrogram.types.Message`.
|
|
863
|
+
|
|
864
|
+
Use as a shortcut for:
|
|
865
|
+
|
|
866
|
+
.. code-block:: python
|
|
867
|
+
|
|
868
|
+
await client.get_media_group(
|
|
869
|
+
chat_id=message.chat.id,
|
|
870
|
+
message_id=message.id
|
|
871
|
+
)
|
|
872
|
+
|
|
873
|
+
Example:
|
|
874
|
+
.. code-block:: python
|
|
875
|
+
|
|
876
|
+
await message.get_media_group()
|
|
877
|
+
|
|
878
|
+
Returns:
|
|
879
|
+
List of :obj:`~pyrogram.types.Message`: On success, a list of messages of the media group is returned.
|
|
880
|
+
|
|
881
|
+
Raises:
|
|
882
|
+
ValueError: In case the passed message id doesn't belong to a media group.
|
|
883
|
+
"""
|
|
884
|
+
|
|
885
|
+
return await self._client.get_media_group(
|
|
886
|
+
chat_id=self.chat.id,
|
|
887
|
+
message_id=self.id
|
|
888
|
+
)
|
|
889
|
+
|
|
890
|
+
async def reply_text(
|
|
891
|
+
self,
|
|
892
|
+
text: str,
|
|
893
|
+
quote: bool = None,
|
|
894
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
895
|
+
entities: List["types.MessageEntity"] = None,
|
|
896
|
+
disable_web_page_preview: bool = None,
|
|
897
|
+
disable_notification: bool = None,
|
|
898
|
+
reply_to_message_id: int = None,
|
|
899
|
+
schedule_date: datetime = None,
|
|
900
|
+
protect_content: bool = None,
|
|
901
|
+
reply_markup=None
|
|
902
|
+
) -> "Message":
|
|
903
|
+
"""Bound method *reply_text* of :obj:`~pyrogram.types.Message`.
|
|
904
|
+
|
|
905
|
+
An alias exists as *reply*.
|
|
906
|
+
|
|
907
|
+
Use as a shortcut for:
|
|
908
|
+
|
|
909
|
+
.. code-block:: python
|
|
910
|
+
|
|
911
|
+
await client.send_message(
|
|
912
|
+
chat_id=message.chat.id,
|
|
913
|
+
text="hello",
|
|
914
|
+
reply_to_message_id=message.id
|
|
915
|
+
)
|
|
916
|
+
|
|
917
|
+
Example:
|
|
918
|
+
.. code-block:: python
|
|
919
|
+
|
|
920
|
+
await message.reply_text("hello", quote=True)
|
|
921
|
+
|
|
922
|
+
Parameters:
|
|
923
|
+
text (``str``):
|
|
924
|
+
Text of the message to be sent.
|
|
925
|
+
|
|
926
|
+
quote (``bool``, *optional*):
|
|
927
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
928
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
929
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
930
|
+
|
|
931
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
932
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
933
|
+
You can combine both syntaxes together.
|
|
934
|
+
|
|
935
|
+
entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
936
|
+
List of special entities that appear in message text, which can be specified instead of *parse_mode*.
|
|
937
|
+
|
|
938
|
+
disable_web_page_preview (``bool``, *optional*):
|
|
939
|
+
Disables link previews for links in this message.
|
|
940
|
+
|
|
941
|
+
disable_notification (``bool``, *optional*):
|
|
942
|
+
Sends the message silently.
|
|
943
|
+
Users will receive a notification with no sound.
|
|
944
|
+
|
|
945
|
+
reply_to_message_id (``int``, *optional*):
|
|
946
|
+
If the message is a reply, ID of the original message.
|
|
947
|
+
|
|
948
|
+
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
949
|
+
Date when the message will be automatically sent.
|
|
950
|
+
|
|
951
|
+
protect_content (``bool``, *optional*):
|
|
952
|
+
Protects the contents of the sent message from forwarding and saving.
|
|
953
|
+
|
|
954
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
955
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
956
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
957
|
+
|
|
958
|
+
Returns:
|
|
959
|
+
On success, the sent Message is returned.
|
|
960
|
+
|
|
961
|
+
Raises:
|
|
962
|
+
RPCError: In case of a Telegram RPC error.
|
|
963
|
+
"""
|
|
964
|
+
if quote is None:
|
|
965
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
966
|
+
|
|
967
|
+
if reply_to_message_id is None and quote:
|
|
968
|
+
reply_to_message_id = self.id
|
|
969
|
+
|
|
970
|
+
return await self._client.send_message(
|
|
971
|
+
chat_id=self.chat.id,
|
|
972
|
+
text=text,
|
|
973
|
+
parse_mode=parse_mode,
|
|
974
|
+
entities=entities,
|
|
975
|
+
disable_web_page_preview=disable_web_page_preview,
|
|
976
|
+
disable_notification=disable_notification,
|
|
977
|
+
reply_to_message_id=reply_to_message_id,
|
|
978
|
+
schedule_date=schedule_date,
|
|
979
|
+
protect_content=protect_content,
|
|
980
|
+
reply_markup=reply_markup
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
reply = reply_text
|
|
984
|
+
|
|
985
|
+
async def reply_animation(
|
|
986
|
+
self,
|
|
987
|
+
animation: Union[str, BinaryIO],
|
|
988
|
+
quote: bool = None,
|
|
989
|
+
caption: str = "",
|
|
990
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
991
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
992
|
+
has_spoiler: bool = None,
|
|
993
|
+
duration: int = 0,
|
|
994
|
+
width: int = 0,
|
|
995
|
+
height: int = 0,
|
|
996
|
+
thumb: str = None,
|
|
997
|
+
disable_notification: bool = None,
|
|
998
|
+
reply_markup: Union[
|
|
999
|
+
"types.InlineKeyboardMarkup",
|
|
1000
|
+
"types.ReplyKeyboardMarkup",
|
|
1001
|
+
"types.ReplyKeyboardRemove",
|
|
1002
|
+
"types.ForceReply"
|
|
1003
|
+
] = None,
|
|
1004
|
+
reply_to_message_id: int = None,
|
|
1005
|
+
progress: Callable = None,
|
|
1006
|
+
progress_args: tuple = ()
|
|
1007
|
+
) -> "Message":
|
|
1008
|
+
"""Bound method *reply_animation* :obj:`~pyrogram.types.Message`.
|
|
1009
|
+
|
|
1010
|
+
Use as a shortcut for:
|
|
1011
|
+
|
|
1012
|
+
.. code-block:: python
|
|
1013
|
+
|
|
1014
|
+
await client.send_animation(
|
|
1015
|
+
chat_id=message.chat.id,
|
|
1016
|
+
animation=animation
|
|
1017
|
+
)
|
|
1018
|
+
|
|
1019
|
+
Example:
|
|
1020
|
+
.. code-block:: python
|
|
1021
|
+
|
|
1022
|
+
await message.reply_animation(animation)
|
|
1023
|
+
|
|
1024
|
+
Parameters:
|
|
1025
|
+
animation (``str``):
|
|
1026
|
+
Animation to send.
|
|
1027
|
+
Pass a file_id as string to send an animation that exists on the Telegram servers,
|
|
1028
|
+
pass an HTTP URL as a string for Telegram to get an animation from the Internet, or
|
|
1029
|
+
pass a file path as string to upload a new animation that exists on your local machine.
|
|
1030
|
+
|
|
1031
|
+
quote (``bool``, *optional*):
|
|
1032
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1033
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1034
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1035
|
+
|
|
1036
|
+
caption (``str``, *optional*):
|
|
1037
|
+
Animation caption, 0-1024 characters.
|
|
1038
|
+
|
|
1039
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
1040
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
1041
|
+
You can combine both syntaxes together.
|
|
1042
|
+
|
|
1043
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
1044
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
1045
|
+
|
|
1046
|
+
has_spoiler (``bool``, *optional*):
|
|
1047
|
+
Pass True if the animation needs to be covered with a spoiler animation.
|
|
1048
|
+
|
|
1049
|
+
duration (``int``, *optional*):
|
|
1050
|
+
Duration of sent animation in seconds.
|
|
1051
|
+
|
|
1052
|
+
width (``int``, *optional*):
|
|
1053
|
+
Animation width.
|
|
1054
|
+
|
|
1055
|
+
height (``int``, *optional*):
|
|
1056
|
+
Animation height.
|
|
1057
|
+
|
|
1058
|
+
thumb (``str``, *optional*):
|
|
1059
|
+
Thumbnail of the animation file sent.
|
|
1060
|
+
The thumbnail should be in JPEG format and less than 200 KB in size.
|
|
1061
|
+
A thumbnail's width and height should not exceed 320 pixels.
|
|
1062
|
+
Thumbnails can't be reused and can be only uploaded as a new file.
|
|
1063
|
+
|
|
1064
|
+
disable_notification (``bool``, *optional*):
|
|
1065
|
+
Sends the message silently.
|
|
1066
|
+
Users will receive a notification with no sound.
|
|
1067
|
+
|
|
1068
|
+
reply_to_message_id (``int``, *optional*):
|
|
1069
|
+
If the message is a reply, ID of the original message.
|
|
1070
|
+
|
|
1071
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
1072
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
1073
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
1074
|
+
|
|
1075
|
+
progress (``Callable``, *optional*):
|
|
1076
|
+
Pass a callback function to view the file transmission progress.
|
|
1077
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
1078
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
1079
|
+
transmitted.
|
|
1080
|
+
|
|
1081
|
+
progress_args (``tuple``, *optional*):
|
|
1082
|
+
Extra custom arguments for the progress callback function.
|
|
1083
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
1084
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
1085
|
+
|
|
1086
|
+
Other Parameters:
|
|
1087
|
+
current (``int``):
|
|
1088
|
+
The amount of bytes transmitted so far.
|
|
1089
|
+
|
|
1090
|
+
total (``int``):
|
|
1091
|
+
The total size of the file.
|
|
1092
|
+
|
|
1093
|
+
*args (``tuple``, *optional*):
|
|
1094
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
1095
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
1096
|
+
|
|
1097
|
+
Returns:
|
|
1098
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1099
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
1100
|
+
instead.
|
|
1101
|
+
|
|
1102
|
+
Raises:
|
|
1103
|
+
RPCError: In case of a Telegram RPC error.
|
|
1104
|
+
"""
|
|
1105
|
+
if quote is None:
|
|
1106
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1107
|
+
|
|
1108
|
+
if reply_to_message_id is None and quote:
|
|
1109
|
+
reply_to_message_id = self.id
|
|
1110
|
+
|
|
1111
|
+
return await self._client.send_animation(
|
|
1112
|
+
chat_id=self.chat.id,
|
|
1113
|
+
animation=animation,
|
|
1114
|
+
caption=caption,
|
|
1115
|
+
parse_mode=parse_mode,
|
|
1116
|
+
caption_entities=caption_entities,
|
|
1117
|
+
has_spoiler=has_spoiler,
|
|
1118
|
+
duration=duration,
|
|
1119
|
+
width=width,
|
|
1120
|
+
height=height,
|
|
1121
|
+
thumb=thumb,
|
|
1122
|
+
disable_notification=disable_notification,
|
|
1123
|
+
reply_to_message_id=reply_to_message_id,
|
|
1124
|
+
reply_markup=reply_markup,
|
|
1125
|
+
progress=progress,
|
|
1126
|
+
progress_args=progress_args
|
|
1127
|
+
)
|
|
1128
|
+
|
|
1129
|
+
async def reply_audio(
|
|
1130
|
+
self,
|
|
1131
|
+
audio: Union[str, BinaryIO],
|
|
1132
|
+
quote: bool = None,
|
|
1133
|
+
caption: str = "",
|
|
1134
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
1135
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
1136
|
+
duration: int = 0,
|
|
1137
|
+
performer: str = None,
|
|
1138
|
+
title: str = None,
|
|
1139
|
+
thumb: str = None,
|
|
1140
|
+
disable_notification: bool = None,
|
|
1141
|
+
reply_to_message_id: int = None,
|
|
1142
|
+
reply_markup: Union[
|
|
1143
|
+
"types.InlineKeyboardMarkup",
|
|
1144
|
+
"types.ReplyKeyboardMarkup",
|
|
1145
|
+
"types.ReplyKeyboardRemove",
|
|
1146
|
+
"types.ForceReply"
|
|
1147
|
+
] = None,
|
|
1148
|
+
progress: Callable = None,
|
|
1149
|
+
progress_args: tuple = ()
|
|
1150
|
+
) -> "Message":
|
|
1151
|
+
"""Bound method *reply_audio* of :obj:`~pyrogram.types.Message`.
|
|
1152
|
+
|
|
1153
|
+
Use as a shortcut for:
|
|
1154
|
+
|
|
1155
|
+
.. code-block:: python
|
|
1156
|
+
|
|
1157
|
+
await client.send_audio(
|
|
1158
|
+
chat_id=message.chat.id,
|
|
1159
|
+
audio=audio
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
Example:
|
|
1163
|
+
.. code-block:: python
|
|
1164
|
+
|
|
1165
|
+
await message.reply_audio(audio)
|
|
1166
|
+
|
|
1167
|
+
Parameters:
|
|
1168
|
+
audio (``str``):
|
|
1169
|
+
Audio file to send.
|
|
1170
|
+
Pass a file_id as string to send an audio file that exists on the Telegram servers,
|
|
1171
|
+
pass an HTTP URL as a string for Telegram to get an audio file from the Internet, or
|
|
1172
|
+
pass a file path as string to upload a new audio file that exists on your local machine.
|
|
1173
|
+
|
|
1174
|
+
quote (``bool``, *optional*):
|
|
1175
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1176
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1177
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1178
|
+
|
|
1179
|
+
caption (``str``, *optional*):
|
|
1180
|
+
Audio caption, 0-1024 characters.
|
|
1181
|
+
|
|
1182
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
1183
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
1184
|
+
You can combine both syntaxes together.
|
|
1185
|
+
|
|
1186
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
1187
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
1188
|
+
|
|
1189
|
+
duration (``int``, *optional*):
|
|
1190
|
+
Duration of the audio in seconds.
|
|
1191
|
+
|
|
1192
|
+
performer (``str``, *optional*):
|
|
1193
|
+
Performer.
|
|
1194
|
+
|
|
1195
|
+
title (``str``, *optional*):
|
|
1196
|
+
Track name.
|
|
1197
|
+
|
|
1198
|
+
thumb (``str``, *optional*):
|
|
1199
|
+
Thumbnail of the music file album cover.
|
|
1200
|
+
The thumbnail should be in JPEG format and less than 200 KB in size.
|
|
1201
|
+
A thumbnail's width and height should not exceed 320 pixels.
|
|
1202
|
+
Thumbnails can't be reused and can be only uploaded as a new file.
|
|
1203
|
+
|
|
1204
|
+
disable_notification (``bool``, *optional*):
|
|
1205
|
+
Sends the message silently.
|
|
1206
|
+
Users will receive a notification with no sound.
|
|
1207
|
+
|
|
1208
|
+
reply_to_message_id (``int``, *optional*):
|
|
1209
|
+
If the message is a reply, ID of the original message.
|
|
1210
|
+
|
|
1211
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
1212
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
1213
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
1214
|
+
|
|
1215
|
+
progress (``Callable``, *optional*):
|
|
1216
|
+
Pass a callback function to view the file transmission progress.
|
|
1217
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
1218
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
1219
|
+
transmitted.
|
|
1220
|
+
|
|
1221
|
+
progress_args (``tuple``, *optional*):
|
|
1222
|
+
Extra custom arguments for the progress callback function.
|
|
1223
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
1224
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
1225
|
+
|
|
1226
|
+
Other Parameters:
|
|
1227
|
+
current (``int``):
|
|
1228
|
+
The amount of bytes transmitted so far.
|
|
1229
|
+
|
|
1230
|
+
total (``int``):
|
|
1231
|
+
The total size of the file.
|
|
1232
|
+
|
|
1233
|
+
*args (``tuple``, *optional*):
|
|
1234
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
1235
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
1236
|
+
|
|
1237
|
+
Returns:
|
|
1238
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1239
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
1240
|
+
instead.
|
|
1241
|
+
|
|
1242
|
+
Raises:
|
|
1243
|
+
RPCError: In case of a Telegram RPC error.
|
|
1244
|
+
"""
|
|
1245
|
+
if quote is None:
|
|
1246
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1247
|
+
|
|
1248
|
+
if reply_to_message_id is None and quote:
|
|
1249
|
+
reply_to_message_id = self.id
|
|
1250
|
+
|
|
1251
|
+
return await self._client.send_audio(
|
|
1252
|
+
chat_id=self.chat.id,
|
|
1253
|
+
audio=audio,
|
|
1254
|
+
caption=caption,
|
|
1255
|
+
parse_mode=parse_mode,
|
|
1256
|
+
caption_entities=caption_entities,
|
|
1257
|
+
duration=duration,
|
|
1258
|
+
performer=performer,
|
|
1259
|
+
title=title,
|
|
1260
|
+
thumb=thumb,
|
|
1261
|
+
disable_notification=disable_notification,
|
|
1262
|
+
reply_to_message_id=reply_to_message_id,
|
|
1263
|
+
reply_markup=reply_markup,
|
|
1264
|
+
progress=progress,
|
|
1265
|
+
progress_args=progress_args
|
|
1266
|
+
)
|
|
1267
|
+
|
|
1268
|
+
async def reply_cached_media(
|
|
1269
|
+
self,
|
|
1270
|
+
file_id: str,
|
|
1271
|
+
quote: bool = None,
|
|
1272
|
+
caption: str = "",
|
|
1273
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
1274
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
1275
|
+
disable_notification: bool = None,
|
|
1276
|
+
reply_to_message_id: int = None,
|
|
1277
|
+
reply_markup: Union[
|
|
1278
|
+
"types.InlineKeyboardMarkup",
|
|
1279
|
+
"types.ReplyKeyboardMarkup",
|
|
1280
|
+
"types.ReplyKeyboardRemove",
|
|
1281
|
+
"types.ForceReply"
|
|
1282
|
+
] = None
|
|
1283
|
+
) -> "Message":
|
|
1284
|
+
"""Bound method *reply_cached_media* of :obj:`~pyrogram.types.Message`.
|
|
1285
|
+
|
|
1286
|
+
Use as a shortcut for:
|
|
1287
|
+
|
|
1288
|
+
.. code-block:: python
|
|
1289
|
+
|
|
1290
|
+
await client.send_cached_media(
|
|
1291
|
+
chat_id=message.chat.id,
|
|
1292
|
+
file_id=file_id
|
|
1293
|
+
)
|
|
1294
|
+
|
|
1295
|
+
Example:
|
|
1296
|
+
.. code-block:: python
|
|
1297
|
+
|
|
1298
|
+
await message.reply_cached_media(file_id)
|
|
1299
|
+
|
|
1300
|
+
Parameters:
|
|
1301
|
+
file_id (``str``):
|
|
1302
|
+
Media to send.
|
|
1303
|
+
Pass a file_id as string to send a media that exists on the Telegram servers.
|
|
1304
|
+
|
|
1305
|
+
quote (``bool``, *optional*):
|
|
1306
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1307
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1308
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1309
|
+
|
|
1310
|
+
caption (``bool``, *optional*):
|
|
1311
|
+
Media caption, 0-1024 characters.
|
|
1312
|
+
|
|
1313
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
1314
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
1315
|
+
You can combine both syntaxes together.
|
|
1316
|
+
|
|
1317
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
1318
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
1319
|
+
|
|
1320
|
+
disable_notification (``bool``, *optional*):
|
|
1321
|
+
Sends the message silently.
|
|
1322
|
+
Users will receive a notification with no sound.
|
|
1323
|
+
|
|
1324
|
+
reply_to_message_id (``int``, *optional*):
|
|
1325
|
+
If the message is a reply, ID of the original message.
|
|
1326
|
+
|
|
1327
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
1328
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
1329
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
1330
|
+
|
|
1331
|
+
Returns:
|
|
1332
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1333
|
+
|
|
1334
|
+
Raises:
|
|
1335
|
+
RPCError: In case of a Telegram RPC error.
|
|
1336
|
+
"""
|
|
1337
|
+
if quote is None:
|
|
1338
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1339
|
+
|
|
1340
|
+
if reply_to_message_id is None and quote:
|
|
1341
|
+
reply_to_message_id = self.id
|
|
1342
|
+
|
|
1343
|
+
return await self._client.send_cached_media(
|
|
1344
|
+
chat_id=self.chat.id,
|
|
1345
|
+
file_id=file_id,
|
|
1346
|
+
caption=caption,
|
|
1347
|
+
parse_mode=parse_mode,
|
|
1348
|
+
caption_entities=caption_entities,
|
|
1349
|
+
disable_notification=disable_notification,
|
|
1350
|
+
reply_to_message_id=reply_to_message_id,
|
|
1351
|
+
reply_markup=reply_markup
|
|
1352
|
+
)
|
|
1353
|
+
|
|
1354
|
+
async def reply_chat_action(self, action: "enums.ChatAction") -> bool:
|
|
1355
|
+
"""Bound method *reply_chat_action* of :obj:`~pyrogram.types.Message`.
|
|
1356
|
+
|
|
1357
|
+
Use as a shortcut for:
|
|
1358
|
+
|
|
1359
|
+
.. code-block:: python
|
|
1360
|
+
|
|
1361
|
+
from pyrogram import enums
|
|
1362
|
+
|
|
1363
|
+
await client.send_chat_action(
|
|
1364
|
+
chat_id=message.chat.id,
|
|
1365
|
+
action=enums.ChatAction.TYPING
|
|
1366
|
+
)
|
|
1367
|
+
|
|
1368
|
+
Example:
|
|
1369
|
+
.. code-block:: python
|
|
1370
|
+
|
|
1371
|
+
from pyrogram import enums
|
|
1372
|
+
|
|
1373
|
+
await message.reply_chat_action(enums.ChatAction.TYPING)
|
|
1374
|
+
|
|
1375
|
+
Parameters:
|
|
1376
|
+
action (:obj:`~pyrogram.enums.ChatAction`):
|
|
1377
|
+
Type of action to broadcast.
|
|
1378
|
+
|
|
1379
|
+
Returns:
|
|
1380
|
+
``bool``: On success, True is returned.
|
|
1381
|
+
|
|
1382
|
+
Raises:
|
|
1383
|
+
RPCError: In case of a Telegram RPC error.
|
|
1384
|
+
ValueError: In case the provided string is not a valid chat action.
|
|
1385
|
+
"""
|
|
1386
|
+
return await self._client.send_chat_action(
|
|
1387
|
+
chat_id=self.chat.id,
|
|
1388
|
+
action=action
|
|
1389
|
+
)
|
|
1390
|
+
|
|
1391
|
+
async def reply_contact(
|
|
1392
|
+
self,
|
|
1393
|
+
phone_number: str,
|
|
1394
|
+
first_name: str,
|
|
1395
|
+
quote: bool = None,
|
|
1396
|
+
last_name: str = "",
|
|
1397
|
+
vcard: str = "",
|
|
1398
|
+
disable_notification: bool = None,
|
|
1399
|
+
reply_to_message_id: int = None,
|
|
1400
|
+
reply_markup: Union[
|
|
1401
|
+
"types.InlineKeyboardMarkup",
|
|
1402
|
+
"types.ReplyKeyboardMarkup",
|
|
1403
|
+
"types.ReplyKeyboardRemove",
|
|
1404
|
+
"types.ForceReply"
|
|
1405
|
+
] = None
|
|
1406
|
+
) -> "Message":
|
|
1407
|
+
"""Bound method *reply_contact* of :obj:`~pyrogram.types.Message`.
|
|
1408
|
+
|
|
1409
|
+
Use as a shortcut for:
|
|
1410
|
+
|
|
1411
|
+
.. code-block:: python
|
|
1412
|
+
|
|
1413
|
+
await client.send_contact(
|
|
1414
|
+
chat_id=message.chat.id,
|
|
1415
|
+
phone_number=phone_number,
|
|
1416
|
+
first_name=first_name
|
|
1417
|
+
)
|
|
1418
|
+
|
|
1419
|
+
Example:
|
|
1420
|
+
.. code-block:: python
|
|
1421
|
+
|
|
1422
|
+
await message.reply_contact("+1-123-456-7890", "Name")
|
|
1423
|
+
|
|
1424
|
+
Parameters:
|
|
1425
|
+
phone_number (``str``):
|
|
1426
|
+
Contact's phone number.
|
|
1427
|
+
|
|
1428
|
+
first_name (``str``):
|
|
1429
|
+
Contact's first name.
|
|
1430
|
+
|
|
1431
|
+
quote (``bool``, *optional*):
|
|
1432
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1433
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1434
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1435
|
+
|
|
1436
|
+
last_name (``str``, *optional*):
|
|
1437
|
+
Contact's last name.
|
|
1438
|
+
|
|
1439
|
+
vcard (``str``, *optional*):
|
|
1440
|
+
Additional data about the contact in the form of a vCard, 0-2048 bytes
|
|
1441
|
+
|
|
1442
|
+
disable_notification (``bool``, *optional*):
|
|
1443
|
+
Sends the message silently.
|
|
1444
|
+
Users will receive a notification with no sound.
|
|
1445
|
+
|
|
1446
|
+
reply_to_message_id (``int``, *optional*):
|
|
1447
|
+
If the message is a reply, ID of the original message.
|
|
1448
|
+
|
|
1449
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
1450
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
1451
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
1452
|
+
|
|
1453
|
+
Returns:
|
|
1454
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1455
|
+
|
|
1456
|
+
Raises:
|
|
1457
|
+
RPCError: In case of a Telegram RPC error.
|
|
1458
|
+
"""
|
|
1459
|
+
if quote is None:
|
|
1460
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1461
|
+
|
|
1462
|
+
if reply_to_message_id is None and quote:
|
|
1463
|
+
reply_to_message_id = self.id
|
|
1464
|
+
|
|
1465
|
+
return await self._client.send_contact(
|
|
1466
|
+
chat_id=self.chat.id,
|
|
1467
|
+
phone_number=phone_number,
|
|
1468
|
+
first_name=first_name,
|
|
1469
|
+
last_name=last_name,
|
|
1470
|
+
vcard=vcard,
|
|
1471
|
+
disable_notification=disable_notification,
|
|
1472
|
+
reply_to_message_id=reply_to_message_id,
|
|
1473
|
+
reply_markup=reply_markup
|
|
1474
|
+
)
|
|
1475
|
+
|
|
1476
|
+
async def reply_document(
|
|
1477
|
+
self,
|
|
1478
|
+
document: Union[str, BinaryIO],
|
|
1479
|
+
quote: bool = None,
|
|
1480
|
+
thumb: str = None,
|
|
1481
|
+
caption: str = "",
|
|
1482
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
1483
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
1484
|
+
file_name: str = None,
|
|
1485
|
+
force_document: bool = None,
|
|
1486
|
+
disable_notification: bool = None,
|
|
1487
|
+
reply_to_message_id: int = None,
|
|
1488
|
+
schedule_date: datetime = None,
|
|
1489
|
+
reply_markup: Union[
|
|
1490
|
+
"types.InlineKeyboardMarkup",
|
|
1491
|
+
"types.ReplyKeyboardMarkup",
|
|
1492
|
+
"types.ReplyKeyboardRemove",
|
|
1493
|
+
"types.ForceReply"
|
|
1494
|
+
] = None,
|
|
1495
|
+
progress: Callable = None,
|
|
1496
|
+
progress_args: tuple = ()
|
|
1497
|
+
) -> "Message":
|
|
1498
|
+
"""Bound method *reply_document* of :obj:`~pyrogram.types.Message`.
|
|
1499
|
+
|
|
1500
|
+
Use as a shortcut for:
|
|
1501
|
+
|
|
1502
|
+
.. code-block:: python
|
|
1503
|
+
|
|
1504
|
+
await client.send_document(
|
|
1505
|
+
chat_id=message.chat.id,
|
|
1506
|
+
document=document
|
|
1507
|
+
)
|
|
1508
|
+
|
|
1509
|
+
Example:
|
|
1510
|
+
.. code-block:: python
|
|
1511
|
+
|
|
1512
|
+
await message.reply_document(document)
|
|
1513
|
+
|
|
1514
|
+
Parameters:
|
|
1515
|
+
document (``str``):
|
|
1516
|
+
File to send.
|
|
1517
|
+
Pass a file_id as string to send a file that exists on the Telegram servers,
|
|
1518
|
+
pass an HTTP URL as a string for Telegram to get a file from the Internet, or
|
|
1519
|
+
pass a file path as string to upload a new file that exists on your local machine.
|
|
1520
|
+
|
|
1521
|
+
quote (``bool``, *optional*):
|
|
1522
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1523
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1524
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1525
|
+
|
|
1526
|
+
thumb (``str``, *optional*):
|
|
1527
|
+
Thumbnail of the file sent.
|
|
1528
|
+
The thumbnail should be in JPEG format and less than 200 KB in size.
|
|
1529
|
+
A thumbnail's width and height should not exceed 320 pixels.
|
|
1530
|
+
Thumbnails can't be reused and can be only uploaded as a new file.
|
|
1531
|
+
|
|
1532
|
+
caption (``str``, *optional*):
|
|
1533
|
+
Document caption, 0-1024 characters.
|
|
1534
|
+
|
|
1535
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
1536
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
1537
|
+
You can combine both syntaxes together.
|
|
1538
|
+
|
|
1539
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
1540
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
1541
|
+
|
|
1542
|
+
file_name (``str``, *optional*):
|
|
1543
|
+
File name of the document sent.
|
|
1544
|
+
Defaults to file's path basename.
|
|
1545
|
+
|
|
1546
|
+
force_document (``bool``, *optional*):
|
|
1547
|
+
Pass True to force sending files as document. Useful for video files that need to be sent as
|
|
1548
|
+
document messages instead of video messages.
|
|
1549
|
+
Defaults to False.
|
|
1550
|
+
|
|
1551
|
+
disable_notification (``bool``, *optional*):
|
|
1552
|
+
Sends the message silently.
|
|
1553
|
+
Users will receive a notification with no sound.
|
|
1554
|
+
|
|
1555
|
+
reply_to_message_id (``int``, *optional*):
|
|
1556
|
+
If the message is a reply, ID of the original message.
|
|
1557
|
+
|
|
1558
|
+
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
1559
|
+
Date when the message will be automatically sent.
|
|
1560
|
+
|
|
1561
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
1562
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
1563
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
1564
|
+
|
|
1565
|
+
progress (``Callable``, *optional*):
|
|
1566
|
+
Pass a callback function to view the file transmission progress.
|
|
1567
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
1568
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
1569
|
+
transmitted.
|
|
1570
|
+
|
|
1571
|
+
progress_args (``tuple``, *optional*):
|
|
1572
|
+
Extra custom arguments for the progress callback function.
|
|
1573
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
1574
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
1575
|
+
|
|
1576
|
+
Other Parameters:
|
|
1577
|
+
current (``int``):
|
|
1578
|
+
The amount of bytes transmitted so far.
|
|
1579
|
+
|
|
1580
|
+
total (``int``):
|
|
1581
|
+
The total size of the file.
|
|
1582
|
+
|
|
1583
|
+
*args (``tuple``, *optional*):
|
|
1584
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
1585
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
1586
|
+
|
|
1587
|
+
Returns:
|
|
1588
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1589
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
1590
|
+
instead.
|
|
1591
|
+
|
|
1592
|
+
Raises:
|
|
1593
|
+
RPCError: In case of a Telegram RPC error.
|
|
1594
|
+
"""
|
|
1595
|
+
if quote is None:
|
|
1596
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1597
|
+
|
|
1598
|
+
if reply_to_message_id is None and quote:
|
|
1599
|
+
reply_to_message_id = self.id
|
|
1600
|
+
|
|
1601
|
+
return await self._client.send_document(
|
|
1602
|
+
chat_id=self.chat.id,
|
|
1603
|
+
document=document,
|
|
1604
|
+
thumb=thumb,
|
|
1605
|
+
caption=caption,
|
|
1606
|
+
parse_mode=parse_mode,
|
|
1607
|
+
caption_entities=caption_entities,
|
|
1608
|
+
file_name=file_name,
|
|
1609
|
+
force_document=force_document,
|
|
1610
|
+
disable_notification=disable_notification,
|
|
1611
|
+
reply_to_message_id=reply_to_message_id,
|
|
1612
|
+
schedule_date=schedule_date,
|
|
1613
|
+
reply_markup=reply_markup,
|
|
1614
|
+
progress=progress,
|
|
1615
|
+
progress_args=progress_args
|
|
1616
|
+
)
|
|
1617
|
+
|
|
1618
|
+
async def reply_game(
|
|
1619
|
+
self,
|
|
1620
|
+
game_short_name: str,
|
|
1621
|
+
quote: bool = None,
|
|
1622
|
+
disable_notification: bool = None,
|
|
1623
|
+
reply_to_message_id: int = None,
|
|
1624
|
+
reply_markup: Union[
|
|
1625
|
+
"types.InlineKeyboardMarkup",
|
|
1626
|
+
"types.ReplyKeyboardMarkup",
|
|
1627
|
+
"types.ReplyKeyboardRemove",
|
|
1628
|
+
"types.ForceReply"
|
|
1629
|
+
] = None
|
|
1630
|
+
) -> "Message":
|
|
1631
|
+
"""Bound method *reply_game* of :obj:`~pyrogram.types.Message`.
|
|
1632
|
+
|
|
1633
|
+
Use as a shortcut for:
|
|
1634
|
+
|
|
1635
|
+
.. code-block:: python
|
|
1636
|
+
|
|
1637
|
+
await client.send_game(
|
|
1638
|
+
chat_id=message.chat.id,
|
|
1639
|
+
game_short_name="lumberjack"
|
|
1640
|
+
)
|
|
1641
|
+
|
|
1642
|
+
Example:
|
|
1643
|
+
.. code-block:: python
|
|
1644
|
+
|
|
1645
|
+
await message.reply_game("lumberjack")
|
|
1646
|
+
|
|
1647
|
+
Parameters:
|
|
1648
|
+
game_short_name (``str``):
|
|
1649
|
+
Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.
|
|
1650
|
+
|
|
1651
|
+
quote (``bool``, *optional*):
|
|
1652
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1653
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1654
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1655
|
+
|
|
1656
|
+
disable_notification (``bool``, *optional*):
|
|
1657
|
+
Sends the message silently.
|
|
1658
|
+
Users will receive a notification with no sound.
|
|
1659
|
+
|
|
1660
|
+
reply_to_message_id (``int``, *optional*):
|
|
1661
|
+
If the message is a reply, ID of the original message.
|
|
1662
|
+
|
|
1663
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
|
1664
|
+
An object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown automatically.
|
|
1665
|
+
If not empty, the first button must launch the game.
|
|
1666
|
+
|
|
1667
|
+
Returns:
|
|
1668
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1669
|
+
|
|
1670
|
+
Raises:
|
|
1671
|
+
RPCError: In case of a Telegram RPC error.
|
|
1672
|
+
"""
|
|
1673
|
+
if quote is None:
|
|
1674
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1675
|
+
|
|
1676
|
+
if reply_to_message_id is None and quote:
|
|
1677
|
+
reply_to_message_id = self.id
|
|
1678
|
+
|
|
1679
|
+
return await self._client.send_game(
|
|
1680
|
+
chat_id=self.chat.id,
|
|
1681
|
+
game_short_name=game_short_name,
|
|
1682
|
+
disable_notification=disable_notification,
|
|
1683
|
+
reply_to_message_id=reply_to_message_id,
|
|
1684
|
+
reply_markup=reply_markup
|
|
1685
|
+
)
|
|
1686
|
+
|
|
1687
|
+
async def reply_inline_bot_result(
|
|
1688
|
+
self,
|
|
1689
|
+
query_id: int,
|
|
1690
|
+
result_id: str,
|
|
1691
|
+
quote: bool = None,
|
|
1692
|
+
disable_notification: bool = None,
|
|
1693
|
+
reply_to_message_id: int = None
|
|
1694
|
+
) -> "Message":
|
|
1695
|
+
"""Bound method *reply_inline_bot_result* of :obj:`~pyrogram.types.Message`.
|
|
1696
|
+
|
|
1697
|
+
Use as a shortcut for:
|
|
1698
|
+
|
|
1699
|
+
.. code-block:: python
|
|
1700
|
+
|
|
1701
|
+
await client.send_inline_bot_result(
|
|
1702
|
+
chat_id=message.chat.id,
|
|
1703
|
+
query_id=query_id,
|
|
1704
|
+
result_id=result_id
|
|
1705
|
+
)
|
|
1706
|
+
|
|
1707
|
+
Example:
|
|
1708
|
+
.. code-block:: python
|
|
1709
|
+
|
|
1710
|
+
await message.reply_inline_bot_result(query_id, result_id)
|
|
1711
|
+
|
|
1712
|
+
Parameters:
|
|
1713
|
+
query_id (``int``):
|
|
1714
|
+
Unique identifier for the answered query.
|
|
1715
|
+
|
|
1716
|
+
result_id (``str``):
|
|
1717
|
+
Unique identifier for the result that was chosen.
|
|
1718
|
+
|
|
1719
|
+
quote (``bool``, *optional*):
|
|
1720
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1721
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1722
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1723
|
+
|
|
1724
|
+
disable_notification (``bool``, *optional*):
|
|
1725
|
+
Sends the message silently.
|
|
1726
|
+
Users will receive a notification with no sound.
|
|
1727
|
+
|
|
1728
|
+
reply_to_message_id (``bool``, *optional*):
|
|
1729
|
+
If the message is a reply, ID of the original message.
|
|
1730
|
+
|
|
1731
|
+
Returns:
|
|
1732
|
+
On success, the sent Message is returned.
|
|
1733
|
+
|
|
1734
|
+
Raises:
|
|
1735
|
+
RPCError: In case of a Telegram RPC error.
|
|
1736
|
+
"""
|
|
1737
|
+
if quote is None:
|
|
1738
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1739
|
+
|
|
1740
|
+
if reply_to_message_id is None and quote:
|
|
1741
|
+
reply_to_message_id = self.id
|
|
1742
|
+
|
|
1743
|
+
return await self._client.send_inline_bot_result(
|
|
1744
|
+
chat_id=self.chat.id,
|
|
1745
|
+
query_id=query_id,
|
|
1746
|
+
result_id=result_id,
|
|
1747
|
+
disable_notification=disable_notification,
|
|
1748
|
+
reply_to_message_id=reply_to_message_id
|
|
1749
|
+
)
|
|
1750
|
+
|
|
1751
|
+
async def reply_location(
|
|
1752
|
+
self,
|
|
1753
|
+
latitude: float,
|
|
1754
|
+
longitude: float,
|
|
1755
|
+
quote: bool = None,
|
|
1756
|
+
disable_notification: bool = None,
|
|
1757
|
+
reply_to_message_id: int = None,
|
|
1758
|
+
reply_markup: Union[
|
|
1759
|
+
"types.InlineKeyboardMarkup",
|
|
1760
|
+
"types.ReplyKeyboardMarkup",
|
|
1761
|
+
"types.ReplyKeyboardRemove",
|
|
1762
|
+
"types.ForceReply"
|
|
1763
|
+
] = None
|
|
1764
|
+
) -> "Message":
|
|
1765
|
+
"""Bound method *reply_location* of :obj:`~pyrogram.types.Message`.
|
|
1766
|
+
|
|
1767
|
+
Use as a shortcut for:
|
|
1768
|
+
|
|
1769
|
+
.. code-block:: python
|
|
1770
|
+
|
|
1771
|
+
await client.send_location(
|
|
1772
|
+
chat_id=message.chat.id,
|
|
1773
|
+
latitude=latitude,
|
|
1774
|
+
longitude=longitude
|
|
1775
|
+
)
|
|
1776
|
+
|
|
1777
|
+
Example:
|
|
1778
|
+
.. code-block:: python
|
|
1779
|
+
|
|
1780
|
+
await message.reply_location(latitude, longitude)
|
|
1781
|
+
|
|
1782
|
+
Parameters:
|
|
1783
|
+
latitude (``float``):
|
|
1784
|
+
Latitude of the location.
|
|
1785
|
+
|
|
1786
|
+
longitude (``float``):
|
|
1787
|
+
Longitude of the location.
|
|
1788
|
+
|
|
1789
|
+
quote (``bool``, *optional*):
|
|
1790
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1791
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1792
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1793
|
+
|
|
1794
|
+
disable_notification (``bool``, *optional*):
|
|
1795
|
+
Sends the message silently.
|
|
1796
|
+
Users will receive a notification with no sound.
|
|
1797
|
+
|
|
1798
|
+
reply_to_message_id (``int``, *optional*):
|
|
1799
|
+
If the message is a reply, ID of the original message
|
|
1800
|
+
|
|
1801
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
1802
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
1803
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
1804
|
+
|
|
1805
|
+
Returns:
|
|
1806
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1807
|
+
|
|
1808
|
+
Raises:
|
|
1809
|
+
RPCError: In case of a Telegram RPC error.
|
|
1810
|
+
"""
|
|
1811
|
+
if quote is None:
|
|
1812
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1813
|
+
|
|
1814
|
+
if reply_to_message_id is None and quote:
|
|
1815
|
+
reply_to_message_id = self.id
|
|
1816
|
+
|
|
1817
|
+
return await self._client.send_location(
|
|
1818
|
+
chat_id=self.chat.id,
|
|
1819
|
+
latitude=latitude,
|
|
1820
|
+
longitude=longitude,
|
|
1821
|
+
disable_notification=disable_notification,
|
|
1822
|
+
reply_to_message_id=reply_to_message_id,
|
|
1823
|
+
reply_markup=reply_markup
|
|
1824
|
+
)
|
|
1825
|
+
|
|
1826
|
+
async def reply_media_group(
|
|
1827
|
+
self,
|
|
1828
|
+
media: List[Union["types.InputMediaPhoto", "types.InputMediaVideo"]],
|
|
1829
|
+
quote: bool = None,
|
|
1830
|
+
disable_notification: bool = None,
|
|
1831
|
+
reply_to_message_id: int = None
|
|
1832
|
+
) -> List["types.Message"]:
|
|
1833
|
+
"""Bound method *reply_media_group* of :obj:`~pyrogram.types.Message`.
|
|
1834
|
+
|
|
1835
|
+
Use as a shortcut for:
|
|
1836
|
+
|
|
1837
|
+
.. code-block:: python
|
|
1838
|
+
|
|
1839
|
+
await client.send_media_group(
|
|
1840
|
+
chat_id=message.chat.id,
|
|
1841
|
+
media=list_of_media
|
|
1842
|
+
)
|
|
1843
|
+
|
|
1844
|
+
Example:
|
|
1845
|
+
.. code-block:: python
|
|
1846
|
+
|
|
1847
|
+
await message.reply_media_group(list_of_media)
|
|
1848
|
+
|
|
1849
|
+
Parameters:
|
|
1850
|
+
media (``list``):
|
|
1851
|
+
A list containing either :obj:`~pyrogram.types.InputMediaPhoto` or
|
|
1852
|
+
:obj:`~pyrogram.types.InputMediaVideo` objects
|
|
1853
|
+
describing photos and videos to be sent, must include 2–10 items.
|
|
1854
|
+
|
|
1855
|
+
quote (``bool``, *optional*):
|
|
1856
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1857
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1858
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1859
|
+
|
|
1860
|
+
disable_notification (``bool``, *optional*):
|
|
1861
|
+
Sends the message silently.
|
|
1862
|
+
Users will receive a notification with no sound.
|
|
1863
|
+
|
|
1864
|
+
reply_to_message_id (``int``, *optional*):
|
|
1865
|
+
If the message is a reply, ID of the original message.
|
|
1866
|
+
|
|
1867
|
+
Returns:
|
|
1868
|
+
On success, a :obj:`~pyrogram.types.Messages` object is returned containing all the
|
|
1869
|
+
single messages sent.
|
|
1870
|
+
|
|
1871
|
+
Raises:
|
|
1872
|
+
RPCError: In case of a Telegram RPC error.
|
|
1873
|
+
"""
|
|
1874
|
+
if quote is None:
|
|
1875
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1876
|
+
|
|
1877
|
+
if reply_to_message_id is None and quote:
|
|
1878
|
+
reply_to_message_id = self.id
|
|
1879
|
+
|
|
1880
|
+
return await self._client.send_media_group(
|
|
1881
|
+
chat_id=self.chat.id,
|
|
1882
|
+
media=media,
|
|
1883
|
+
disable_notification=disable_notification,
|
|
1884
|
+
reply_to_message_id=reply_to_message_id
|
|
1885
|
+
)
|
|
1886
|
+
|
|
1887
|
+
async def reply_photo(
|
|
1888
|
+
self,
|
|
1889
|
+
photo: Union[str, BinaryIO],
|
|
1890
|
+
quote: bool = None,
|
|
1891
|
+
caption: str = "",
|
|
1892
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
1893
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
1894
|
+
has_spoiler: bool = None,
|
|
1895
|
+
ttl_seconds: int = None,
|
|
1896
|
+
disable_notification: bool = None,
|
|
1897
|
+
reply_to_message_id: int = None,
|
|
1898
|
+
reply_markup: Union[
|
|
1899
|
+
"types.InlineKeyboardMarkup",
|
|
1900
|
+
"types.ReplyKeyboardMarkup",
|
|
1901
|
+
"types.ReplyKeyboardRemove",
|
|
1902
|
+
"types.ForceReply"
|
|
1903
|
+
] = None,
|
|
1904
|
+
progress: Callable = None,
|
|
1905
|
+
progress_args: tuple = ()
|
|
1906
|
+
) -> "Message":
|
|
1907
|
+
"""Bound method *reply_photo* of :obj:`~pyrogram.types.Message`.
|
|
1908
|
+
|
|
1909
|
+
Use as a shortcut for:
|
|
1910
|
+
|
|
1911
|
+
.. code-block:: python
|
|
1912
|
+
|
|
1913
|
+
await client.send_photo(
|
|
1914
|
+
chat_id=message.chat.id,
|
|
1915
|
+
photo=photo
|
|
1916
|
+
)
|
|
1917
|
+
|
|
1918
|
+
Example:
|
|
1919
|
+
.. code-block:: python
|
|
1920
|
+
|
|
1921
|
+
await message.reply_photo(photo)
|
|
1922
|
+
|
|
1923
|
+
Parameters:
|
|
1924
|
+
photo (``str``):
|
|
1925
|
+
Photo to send.
|
|
1926
|
+
Pass a file_id as string to send a photo that exists on the Telegram servers,
|
|
1927
|
+
pass an HTTP URL as a string for Telegram to get a photo from the Internet, or
|
|
1928
|
+
pass a file path as string to upload a new photo that exists on your local machine.
|
|
1929
|
+
|
|
1930
|
+
quote (``bool``, *optional*):
|
|
1931
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
1932
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
1933
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
1934
|
+
|
|
1935
|
+
caption (``str``, *optional*):
|
|
1936
|
+
Photo caption, 0-1024 characters.
|
|
1937
|
+
|
|
1938
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
1939
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
1940
|
+
You can combine both syntaxes together.
|
|
1941
|
+
|
|
1942
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
1943
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
1944
|
+
|
|
1945
|
+
has_spoiler (``bool``, *optional*):
|
|
1946
|
+
Pass True if the photo needs to be covered with a spoiler animation.
|
|
1947
|
+
|
|
1948
|
+
ttl_seconds (``int``, *optional*):
|
|
1949
|
+
Self-Destruct Timer.
|
|
1950
|
+
If you set a timer, the photo will self-destruct in *ttl_seconds*
|
|
1951
|
+
seconds after it was viewed.
|
|
1952
|
+
|
|
1953
|
+
disable_notification (``bool``, *optional*):
|
|
1954
|
+
Sends the message silently.
|
|
1955
|
+
Users will receive a notification with no sound.
|
|
1956
|
+
|
|
1957
|
+
reply_to_message_id (``int``, *optional*):
|
|
1958
|
+
If the message is a reply, ID of the original message.
|
|
1959
|
+
|
|
1960
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
1961
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
1962
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
1963
|
+
|
|
1964
|
+
progress (``Callable``, *optional*):
|
|
1965
|
+
Pass a callback function to view the file transmission progress.
|
|
1966
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
1967
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
1968
|
+
transmitted.
|
|
1969
|
+
|
|
1970
|
+
progress_args (``tuple``, *optional*):
|
|
1971
|
+
Extra custom arguments for the progress callback function.
|
|
1972
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
1973
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
1974
|
+
|
|
1975
|
+
Other Parameters:
|
|
1976
|
+
current (``int``):
|
|
1977
|
+
The amount of bytes transmitted so far.
|
|
1978
|
+
|
|
1979
|
+
total (``int``):
|
|
1980
|
+
The total size of the file.
|
|
1981
|
+
|
|
1982
|
+
*args (``tuple``, *optional*):
|
|
1983
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
1984
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
1985
|
+
|
|
1986
|
+
Returns:
|
|
1987
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
1988
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
1989
|
+
instead.
|
|
1990
|
+
|
|
1991
|
+
Raises:
|
|
1992
|
+
RPCError: In case of a Telegram RPC error.
|
|
1993
|
+
"""
|
|
1994
|
+
if quote is None:
|
|
1995
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
1996
|
+
|
|
1997
|
+
if reply_to_message_id is None and quote:
|
|
1998
|
+
reply_to_message_id = self.id
|
|
1999
|
+
|
|
2000
|
+
return await self._client.send_photo(
|
|
2001
|
+
chat_id=self.chat.id,
|
|
2002
|
+
photo=photo,
|
|
2003
|
+
caption=caption,
|
|
2004
|
+
parse_mode=parse_mode,
|
|
2005
|
+
caption_entities=caption_entities,
|
|
2006
|
+
has_spoiler=has_spoiler,
|
|
2007
|
+
ttl_seconds=ttl_seconds,
|
|
2008
|
+
disable_notification=disable_notification,
|
|
2009
|
+
reply_to_message_id=reply_to_message_id,
|
|
2010
|
+
reply_markup=reply_markup,
|
|
2011
|
+
progress=progress,
|
|
2012
|
+
progress_args=progress_args
|
|
2013
|
+
)
|
|
2014
|
+
|
|
2015
|
+
async def reply_poll(
|
|
2016
|
+
self,
|
|
2017
|
+
question: str,
|
|
2018
|
+
options: List[str],
|
|
2019
|
+
is_anonymous: bool = True,
|
|
2020
|
+
type: "enums.PollType" = enums.PollType.REGULAR,
|
|
2021
|
+
allows_multiple_answers: bool = None,
|
|
2022
|
+
correct_option_id: int = None,
|
|
2023
|
+
explanation: str = None,
|
|
2024
|
+
explanation_parse_mode: "enums.ParseMode" = None,
|
|
2025
|
+
explanation_entities: List["types.MessageEntity"] = None,
|
|
2026
|
+
open_period: int = None,
|
|
2027
|
+
close_date: datetime = None,
|
|
2028
|
+
is_closed: bool = None,
|
|
2029
|
+
quote: bool = None,
|
|
2030
|
+
disable_notification: bool = None,
|
|
2031
|
+
protect_content: bool = None,
|
|
2032
|
+
reply_to_message_id: int = None,
|
|
2033
|
+
schedule_date: datetime = None,
|
|
2034
|
+
reply_markup: Union[
|
|
2035
|
+
"types.InlineKeyboardMarkup",
|
|
2036
|
+
"types.ReplyKeyboardMarkup",
|
|
2037
|
+
"types.ReplyKeyboardRemove",
|
|
2038
|
+
"types.ForceReply"
|
|
2039
|
+
] = None
|
|
2040
|
+
) -> "Message":
|
|
2041
|
+
"""Bound method *reply_poll* of :obj:`~pyrogram.types.Message`.
|
|
2042
|
+
|
|
2043
|
+
Use as a shortcut for:
|
|
2044
|
+
|
|
2045
|
+
.. code-block:: python
|
|
2046
|
+
|
|
2047
|
+
await client.send_poll(
|
|
2048
|
+
chat_id=message.chat.id,
|
|
2049
|
+
question="This is a poll",
|
|
2050
|
+
options=["A", "B", "C]
|
|
2051
|
+
)
|
|
2052
|
+
|
|
2053
|
+
Example:
|
|
2054
|
+
.. code-block:: python
|
|
2055
|
+
|
|
2056
|
+
await message.reply_poll("This is a poll", ["A", "B", "C"])
|
|
2057
|
+
|
|
2058
|
+
Parameters:
|
|
2059
|
+
question (``str``):
|
|
2060
|
+
Poll question, 1-255 characters.
|
|
2061
|
+
|
|
2062
|
+
options (List of ``str``):
|
|
2063
|
+
List of answer options, 2-10 strings 1-100 characters each.
|
|
2064
|
+
|
|
2065
|
+
is_anonymous (``bool``, *optional*):
|
|
2066
|
+
True, if the poll needs to be anonymous.
|
|
2067
|
+
Defaults to True.
|
|
2068
|
+
|
|
2069
|
+
type (:obj`~pyrogram.enums.PollType`, *optional*):
|
|
2070
|
+
Poll type, :obj:`~pyrogram.enums.PollType.QUIZ` or :obj:`~pyrogram.enums.PollType.REGULAR`.
|
|
2071
|
+
Defaults to :obj:`~pyrogram.enums.PollType.REGULAR`.
|
|
2072
|
+
|
|
2073
|
+
allows_multiple_answers (``bool``, *optional*):
|
|
2074
|
+
True, if the poll allows multiple answers, ignored for polls in quiz mode.
|
|
2075
|
+
Defaults to False.
|
|
2076
|
+
|
|
2077
|
+
correct_option_id (``int``, *optional*):
|
|
2078
|
+
0-based identifier of the correct answer option, required for polls in quiz mode.
|
|
2079
|
+
|
|
2080
|
+
explanation (``str``, *optional*):
|
|
2081
|
+
Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style
|
|
2082
|
+
poll, 0-200 characters with at most 2 line feeds after entities parsing.
|
|
2083
|
+
|
|
2084
|
+
explanation_parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
2085
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
2086
|
+
You can combine both syntaxes together.
|
|
2087
|
+
|
|
2088
|
+
explanation_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
2089
|
+
List of special entities that appear in the poll explanation, which can be specified instead of
|
|
2090
|
+
*parse_mode*.
|
|
2091
|
+
|
|
2092
|
+
open_period (``int``, *optional*):
|
|
2093
|
+
Amount of time in seconds the poll will be active after creation, 5-600.
|
|
2094
|
+
Can't be used together with *close_date*.
|
|
2095
|
+
|
|
2096
|
+
close_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
2097
|
+
Point in time when the poll will be automatically closed.
|
|
2098
|
+
Must be at least 5 and no more than 600 seconds in the future.
|
|
2099
|
+
Can't be used together with *open_period*.
|
|
2100
|
+
|
|
2101
|
+
is_closed (``bool``, *optional*):
|
|
2102
|
+
Pass True, if the poll needs to be immediately closed.
|
|
2103
|
+
This can be useful for poll preview.
|
|
2104
|
+
|
|
2105
|
+
quote (``bool``, *optional*):
|
|
2106
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
2107
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
2108
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
2109
|
+
|
|
2110
|
+
disable_notification (``bool``, *optional*):
|
|
2111
|
+
Sends the message silently.
|
|
2112
|
+
Users will receive a notification with no sound.
|
|
2113
|
+
|
|
2114
|
+
protect_content (``bool``, *optional*):
|
|
2115
|
+
Protects the contents of the sent message from forwarding and saving.
|
|
2116
|
+
|
|
2117
|
+
reply_to_message_id (``int``, *optional*):
|
|
2118
|
+
If the message is a reply, ID of the original message.
|
|
2119
|
+
|
|
2120
|
+
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
2121
|
+
Date when the message will be automatically sent.
|
|
2122
|
+
|
|
2123
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
2124
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
2125
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
2126
|
+
|
|
2127
|
+
Returns:
|
|
2128
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
2129
|
+
|
|
2130
|
+
Raises:
|
|
2131
|
+
RPCError: In case of a Telegram RPC error.
|
|
2132
|
+
"""
|
|
2133
|
+
if quote is None:
|
|
2134
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
2135
|
+
|
|
2136
|
+
if reply_to_message_id is None and quote:
|
|
2137
|
+
reply_to_message_id = self.id
|
|
2138
|
+
|
|
2139
|
+
return await self._client.send_poll(
|
|
2140
|
+
chat_id=self.chat.id,
|
|
2141
|
+
question=question,
|
|
2142
|
+
options=options,
|
|
2143
|
+
is_anonymous=is_anonymous,
|
|
2144
|
+
type=type,
|
|
2145
|
+
allows_multiple_answers=allows_multiple_answers,
|
|
2146
|
+
correct_option_id=correct_option_id,
|
|
2147
|
+
explanation=explanation,
|
|
2148
|
+
explanation_parse_mode=explanation_parse_mode,
|
|
2149
|
+
explanation_entities=explanation_entities,
|
|
2150
|
+
open_period=open_period,
|
|
2151
|
+
close_date=close_date,
|
|
2152
|
+
is_closed=is_closed,
|
|
2153
|
+
disable_notification=disable_notification,
|
|
2154
|
+
protect_content=protect_content,
|
|
2155
|
+
reply_to_message_id=reply_to_message_id,
|
|
2156
|
+
schedule_date=schedule_date,
|
|
2157
|
+
reply_markup=reply_markup
|
|
2158
|
+
)
|
|
2159
|
+
|
|
2160
|
+
async def reply_sticker(
|
|
2161
|
+
self,
|
|
2162
|
+
sticker: Union[str, BinaryIO],
|
|
2163
|
+
quote: bool = None,
|
|
2164
|
+
disable_notification: bool = None,
|
|
2165
|
+
reply_to_message_id: int = None,
|
|
2166
|
+
reply_markup: Union[
|
|
2167
|
+
"types.InlineKeyboardMarkup",
|
|
2168
|
+
"types.ReplyKeyboardMarkup",
|
|
2169
|
+
"types.ReplyKeyboardRemove",
|
|
2170
|
+
"types.ForceReply"
|
|
2171
|
+
] = None,
|
|
2172
|
+
progress: Callable = None,
|
|
2173
|
+
progress_args: tuple = ()
|
|
2174
|
+
) -> "Message":
|
|
2175
|
+
"""Bound method *reply_sticker* of :obj:`~pyrogram.types.Message`.
|
|
2176
|
+
|
|
2177
|
+
Use as a shortcut for:
|
|
2178
|
+
|
|
2179
|
+
.. code-block:: python
|
|
2180
|
+
|
|
2181
|
+
await client.send_sticker(
|
|
2182
|
+
chat_id=message.chat.id,
|
|
2183
|
+
sticker=sticker
|
|
2184
|
+
)
|
|
2185
|
+
|
|
2186
|
+
Example:
|
|
2187
|
+
.. code-block:: python
|
|
2188
|
+
|
|
2189
|
+
await message.reply_sticker(sticker)
|
|
2190
|
+
|
|
2191
|
+
Parameters:
|
|
2192
|
+
sticker (``str``):
|
|
2193
|
+
Sticker to send.
|
|
2194
|
+
Pass a file_id as string to send a sticker that exists on the Telegram servers,
|
|
2195
|
+
pass an HTTP URL as a string for Telegram to get a .webp sticker file from the Internet, or
|
|
2196
|
+
pass a file path as string to upload a new sticker that exists on your local machine.
|
|
2197
|
+
|
|
2198
|
+
quote (``bool``, *optional*):
|
|
2199
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
2200
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
2201
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
2202
|
+
|
|
2203
|
+
disable_notification (``bool``, *optional*):
|
|
2204
|
+
Sends the message silently.
|
|
2205
|
+
Users will receive a notification with no sound.
|
|
2206
|
+
|
|
2207
|
+
reply_to_message_id (``int``, *optional*):
|
|
2208
|
+
If the message is a reply, ID of the original message.
|
|
2209
|
+
|
|
2210
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
2211
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
2212
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
2213
|
+
|
|
2214
|
+
progress (``Callable``, *optional*):
|
|
2215
|
+
Pass a callback function to view the file transmission progress.
|
|
2216
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
2217
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
2218
|
+
transmitted.
|
|
2219
|
+
|
|
2220
|
+
progress_args (``tuple``, *optional*):
|
|
2221
|
+
Extra custom arguments for the progress callback function.
|
|
2222
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
2223
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
2224
|
+
|
|
2225
|
+
Other Parameters:
|
|
2226
|
+
current (``int``):
|
|
2227
|
+
The amount of bytes transmitted so far.
|
|
2228
|
+
|
|
2229
|
+
total (``int``):
|
|
2230
|
+
The total size of the file.
|
|
2231
|
+
|
|
2232
|
+
*args (``tuple``, *optional*):
|
|
2233
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
2234
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
2235
|
+
|
|
2236
|
+
Returns:
|
|
2237
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
2238
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
2239
|
+
instead.
|
|
2240
|
+
|
|
2241
|
+
Raises:
|
|
2242
|
+
RPCError: In case of a Telegram RPC error.
|
|
2243
|
+
"""
|
|
2244
|
+
if quote is None:
|
|
2245
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
2246
|
+
|
|
2247
|
+
if reply_to_message_id is None and quote:
|
|
2248
|
+
reply_to_message_id = self.id
|
|
2249
|
+
|
|
2250
|
+
return await self._client.send_sticker(
|
|
2251
|
+
chat_id=self.chat.id,
|
|
2252
|
+
sticker=sticker,
|
|
2253
|
+
disable_notification=disable_notification,
|
|
2254
|
+
reply_to_message_id=reply_to_message_id,
|
|
2255
|
+
reply_markup=reply_markup,
|
|
2256
|
+
progress=progress,
|
|
2257
|
+
progress_args=progress_args
|
|
2258
|
+
)
|
|
2259
|
+
|
|
2260
|
+
async def reply_venue(
|
|
2261
|
+
self,
|
|
2262
|
+
latitude: float,
|
|
2263
|
+
longitude: float,
|
|
2264
|
+
title: str,
|
|
2265
|
+
address: str,
|
|
2266
|
+
quote: bool = None,
|
|
2267
|
+
foursquare_id: str = "",
|
|
2268
|
+
foursquare_type: str = "",
|
|
2269
|
+
disable_notification: bool = None,
|
|
2270
|
+
reply_to_message_id: int = None,
|
|
2271
|
+
reply_markup: Union[
|
|
2272
|
+
"types.InlineKeyboardMarkup",
|
|
2273
|
+
"types.ReplyKeyboardMarkup",
|
|
2274
|
+
"types.ReplyKeyboardRemove",
|
|
2275
|
+
"types.ForceReply"
|
|
2276
|
+
] = None
|
|
2277
|
+
) -> "Message":
|
|
2278
|
+
"""Bound method *reply_venue* of :obj:`~pyrogram.types.Message`.
|
|
2279
|
+
|
|
2280
|
+
Use as a shortcut for:
|
|
2281
|
+
|
|
2282
|
+
.. code-block:: python
|
|
2283
|
+
|
|
2284
|
+
await client.send_venue(
|
|
2285
|
+
chat_id=message.chat.id,
|
|
2286
|
+
latitude=latitude,
|
|
2287
|
+
longitude=longitude,
|
|
2288
|
+
title="Venue title",
|
|
2289
|
+
address="Venue address"
|
|
2290
|
+
)
|
|
2291
|
+
|
|
2292
|
+
Example:
|
|
2293
|
+
.. code-block:: python
|
|
2294
|
+
|
|
2295
|
+
await message.reply_venue(latitude, longitude, "Venue title", "Venue address")
|
|
2296
|
+
|
|
2297
|
+
Parameters:
|
|
2298
|
+
latitude (``float``):
|
|
2299
|
+
Latitude of the venue.
|
|
2300
|
+
|
|
2301
|
+
longitude (``float``):
|
|
2302
|
+
Longitude of the venue.
|
|
2303
|
+
|
|
2304
|
+
title (``str``):
|
|
2305
|
+
Name of the venue.
|
|
2306
|
+
|
|
2307
|
+
address (``str``):
|
|
2308
|
+
Address of the venue.
|
|
2309
|
+
|
|
2310
|
+
quote (``bool``, *optional*):
|
|
2311
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
2312
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
2313
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
2314
|
+
|
|
2315
|
+
foursquare_id (``str``, *optional*):
|
|
2316
|
+
Foursquare identifier of the venue.
|
|
2317
|
+
|
|
2318
|
+
foursquare_type (``str``, *optional*):
|
|
2319
|
+
Foursquare type of the venue, if known.
|
|
2320
|
+
(For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".)
|
|
2321
|
+
|
|
2322
|
+
disable_notification (``bool``, *optional*):
|
|
2323
|
+
Sends the message silently.
|
|
2324
|
+
Users will receive a notification with no sound.
|
|
2325
|
+
|
|
2326
|
+
reply_to_message_id (``int``, *optional*):
|
|
2327
|
+
If the message is a reply, ID of the original message
|
|
2328
|
+
|
|
2329
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
2330
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
2331
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
2332
|
+
|
|
2333
|
+
Returns:
|
|
2334
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
2335
|
+
|
|
2336
|
+
Raises:
|
|
2337
|
+
RPCError: In case of a Telegram RPC error.
|
|
2338
|
+
"""
|
|
2339
|
+
if quote is None:
|
|
2340
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
2341
|
+
|
|
2342
|
+
if reply_to_message_id is None and quote:
|
|
2343
|
+
reply_to_message_id = self.id
|
|
2344
|
+
|
|
2345
|
+
return await self._client.send_venue(
|
|
2346
|
+
chat_id=self.chat.id,
|
|
2347
|
+
latitude=latitude,
|
|
2348
|
+
longitude=longitude,
|
|
2349
|
+
title=title,
|
|
2350
|
+
address=address,
|
|
2351
|
+
foursquare_id=foursquare_id,
|
|
2352
|
+
foursquare_type=foursquare_type,
|
|
2353
|
+
disable_notification=disable_notification,
|
|
2354
|
+
reply_to_message_id=reply_to_message_id,
|
|
2355
|
+
reply_markup=reply_markup
|
|
2356
|
+
)
|
|
2357
|
+
|
|
2358
|
+
async def reply_video(
|
|
2359
|
+
self,
|
|
2360
|
+
video: Union[str, BinaryIO],
|
|
2361
|
+
quote: bool = None,
|
|
2362
|
+
caption: str = "",
|
|
2363
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
2364
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
2365
|
+
has_spoiler: bool = None,
|
|
2366
|
+
ttl_seconds: int = None,
|
|
2367
|
+
duration: int = 0,
|
|
2368
|
+
width: int = 0,
|
|
2369
|
+
height: int = 0,
|
|
2370
|
+
thumb: str = None,
|
|
2371
|
+
supports_streaming: bool = True,
|
|
2372
|
+
disable_notification: bool = None,
|
|
2373
|
+
reply_to_message_id: int = None,
|
|
2374
|
+
reply_markup: Union[
|
|
2375
|
+
"types.InlineKeyboardMarkup",
|
|
2376
|
+
"types.ReplyKeyboardMarkup",
|
|
2377
|
+
"types.ReplyKeyboardRemove",
|
|
2378
|
+
"types.ForceReply"
|
|
2379
|
+
] = None,
|
|
2380
|
+
progress: Callable = None,
|
|
2381
|
+
progress_args: tuple = ()
|
|
2382
|
+
) -> "Message":
|
|
2383
|
+
"""Bound method *reply_video* of :obj:`~pyrogram.types.Message`.
|
|
2384
|
+
|
|
2385
|
+
Use as a shortcut for:
|
|
2386
|
+
|
|
2387
|
+
.. code-block:: python
|
|
2388
|
+
|
|
2389
|
+
await client.send_video(
|
|
2390
|
+
chat_id=message.chat.id,
|
|
2391
|
+
video=video
|
|
2392
|
+
)
|
|
2393
|
+
|
|
2394
|
+
Example:
|
|
2395
|
+
.. code-block:: python
|
|
2396
|
+
|
|
2397
|
+
await message.reply_video(video)
|
|
2398
|
+
|
|
2399
|
+
Parameters:
|
|
2400
|
+
video (``str``):
|
|
2401
|
+
Video to send.
|
|
2402
|
+
Pass a file_id as string to send a video that exists on the Telegram servers,
|
|
2403
|
+
pass an HTTP URL as a string for Telegram to get a video from the Internet, or
|
|
2404
|
+
pass a file path as string to upload a new video that exists on your local machine.
|
|
2405
|
+
|
|
2406
|
+
quote (``bool``, *optional*):
|
|
2407
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
2408
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
2409
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
2410
|
+
|
|
2411
|
+
caption (``str``, *optional*):
|
|
2412
|
+
Video caption, 0-1024 characters.
|
|
2413
|
+
|
|
2414
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
2415
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
2416
|
+
You can combine both syntaxes together.
|
|
2417
|
+
|
|
2418
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
2419
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
2420
|
+
|
|
2421
|
+
has_spoiler (``bool``, *optional*):
|
|
2422
|
+
Pass True if the video needs to be covered with a spoiler animation.
|
|
2423
|
+
|
|
2424
|
+
ttl_seconds (``int``, *optional*):
|
|
2425
|
+
Self-Destruct Timer.
|
|
2426
|
+
If you set a timer, the video will self-destruct in *ttl_seconds*
|
|
2427
|
+
seconds after it was viewed.
|
|
2428
|
+
|
|
2429
|
+
duration (``int``, *optional*):
|
|
2430
|
+
Duration of sent video in seconds.
|
|
2431
|
+
|
|
2432
|
+
width (``int``, *optional*):
|
|
2433
|
+
Video width.
|
|
2434
|
+
|
|
2435
|
+
height (``int``, *optional*):
|
|
2436
|
+
Video height.
|
|
2437
|
+
|
|
2438
|
+
thumb (``str``, *optional*):
|
|
2439
|
+
Thumbnail of the video sent.
|
|
2440
|
+
The thumbnail should be in JPEG format and less than 200 KB in size.
|
|
2441
|
+
A thumbnail's width and height should not exceed 320 pixels.
|
|
2442
|
+
Thumbnails can't be reused and can be only uploaded as a new file.
|
|
2443
|
+
|
|
2444
|
+
supports_streaming (``bool``, *optional*):
|
|
2445
|
+
Pass True, if the uploaded video is suitable for streaming.
|
|
2446
|
+
|
|
2447
|
+
disable_notification (``bool``, *optional*):
|
|
2448
|
+
Sends the message silently.
|
|
2449
|
+
Users will receive a notification with no sound.
|
|
2450
|
+
|
|
2451
|
+
reply_to_message_id (``int``, *optional*):
|
|
2452
|
+
If the message is a reply, ID of the original message.
|
|
2453
|
+
|
|
2454
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
2455
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
2456
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
2457
|
+
|
|
2458
|
+
progress (``Callable``, *optional*):
|
|
2459
|
+
Pass a callback function to view the file transmission progress.
|
|
2460
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
2461
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
2462
|
+
transmitted.
|
|
2463
|
+
|
|
2464
|
+
progress_args (``tuple``, *optional*):
|
|
2465
|
+
Extra custom arguments for the progress callback function.
|
|
2466
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
2467
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
2468
|
+
|
|
2469
|
+
Other Parameters:
|
|
2470
|
+
current (``int``):
|
|
2471
|
+
The amount of bytes transmitted so far.
|
|
2472
|
+
|
|
2473
|
+
total (``int``):
|
|
2474
|
+
The total size of the file.
|
|
2475
|
+
|
|
2476
|
+
*args (``tuple``, *optional*):
|
|
2477
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
2478
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
2479
|
+
|
|
2480
|
+
Returns:
|
|
2481
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
2482
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
2483
|
+
instead.
|
|
2484
|
+
|
|
2485
|
+
Raises:
|
|
2486
|
+
RPCError: In case of a Telegram RPC error.
|
|
2487
|
+
"""
|
|
2488
|
+
if quote is None:
|
|
2489
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
2490
|
+
|
|
2491
|
+
if reply_to_message_id is None and quote:
|
|
2492
|
+
reply_to_message_id = self.id
|
|
2493
|
+
|
|
2494
|
+
return await self._client.send_video(
|
|
2495
|
+
chat_id=self.chat.id,
|
|
2496
|
+
video=video,
|
|
2497
|
+
caption=caption,
|
|
2498
|
+
parse_mode=parse_mode,
|
|
2499
|
+
caption_entities=caption_entities,
|
|
2500
|
+
has_spoiler=has_spoiler,
|
|
2501
|
+
ttl_seconds=ttl_seconds,
|
|
2502
|
+
duration=duration,
|
|
2503
|
+
width=width,
|
|
2504
|
+
height=height,
|
|
2505
|
+
thumb=thumb,
|
|
2506
|
+
supports_streaming=supports_streaming,
|
|
2507
|
+
disable_notification=disable_notification,
|
|
2508
|
+
reply_to_message_id=reply_to_message_id,
|
|
2509
|
+
reply_markup=reply_markup,
|
|
2510
|
+
progress=progress,
|
|
2511
|
+
progress_args=progress_args
|
|
2512
|
+
)
|
|
2513
|
+
|
|
2514
|
+
async def reply_video_note(
|
|
2515
|
+
self,
|
|
2516
|
+
video_note: Union[str, BinaryIO],
|
|
2517
|
+
quote: bool = None,
|
|
2518
|
+
duration: int = 0,
|
|
2519
|
+
length: int = 1,
|
|
2520
|
+
thumb: str = None,
|
|
2521
|
+
disable_notification: bool = None,
|
|
2522
|
+
reply_to_message_id: int = None,
|
|
2523
|
+
reply_markup: Union[
|
|
2524
|
+
"types.InlineKeyboardMarkup",
|
|
2525
|
+
"types.ReplyKeyboardMarkup",
|
|
2526
|
+
"types.ReplyKeyboardRemove",
|
|
2527
|
+
"types.ForceReply"
|
|
2528
|
+
] = None,
|
|
2529
|
+
progress: Callable = None,
|
|
2530
|
+
progress_args: tuple = ()
|
|
2531
|
+
) -> "Message":
|
|
2532
|
+
"""Bound method *reply_video_note* of :obj:`~pyrogram.types.Message`.
|
|
2533
|
+
|
|
2534
|
+
Use as a shortcut for:
|
|
2535
|
+
|
|
2536
|
+
.. code-block:: python
|
|
2537
|
+
|
|
2538
|
+
await client.send_video_note(
|
|
2539
|
+
chat_id=message.chat.id,
|
|
2540
|
+
video_note=video_note
|
|
2541
|
+
)
|
|
2542
|
+
|
|
2543
|
+
Example:
|
|
2544
|
+
.. code-block:: python
|
|
2545
|
+
|
|
2546
|
+
await message.reply_video_note(video_note)
|
|
2547
|
+
|
|
2548
|
+
Parameters:
|
|
2549
|
+
video_note (``str``):
|
|
2550
|
+
Video note to send.
|
|
2551
|
+
Pass a file_id as string to send a video note that exists on the Telegram servers, or
|
|
2552
|
+
pass a file path as string to upload a new video note that exists on your local machine.
|
|
2553
|
+
Sending video notes by a URL is currently unsupported.
|
|
2554
|
+
|
|
2555
|
+
quote (``bool``, *optional*):
|
|
2556
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
2557
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
2558
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
2559
|
+
|
|
2560
|
+
duration (``int``, *optional*):
|
|
2561
|
+
Duration of sent video in seconds.
|
|
2562
|
+
|
|
2563
|
+
length (``int``, *optional*):
|
|
2564
|
+
Video width and height.
|
|
2565
|
+
|
|
2566
|
+
thumb (``str``, *optional*):
|
|
2567
|
+
Thumbnail of the video sent.
|
|
2568
|
+
The thumbnail should be in JPEG format and less than 200 KB in size.
|
|
2569
|
+
A thumbnail's width and height should not exceed 320 pixels.
|
|
2570
|
+
Thumbnails can't be reused and can be only uploaded as a new file.
|
|
2571
|
+
|
|
2572
|
+
disable_notification (``bool``, *optional*):
|
|
2573
|
+
Sends the message silently.
|
|
2574
|
+
Users will receive a notification with no sound.
|
|
2575
|
+
|
|
2576
|
+
reply_to_message_id (``int``, *optional*):
|
|
2577
|
+
If the message is a reply, ID of the original message
|
|
2578
|
+
|
|
2579
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
2580
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
2581
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
2582
|
+
|
|
2583
|
+
progress (``Callable``, *optional*):
|
|
2584
|
+
Pass a callback function to view the file transmission progress.
|
|
2585
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
2586
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
2587
|
+
transmitted.
|
|
2588
|
+
|
|
2589
|
+
progress_args (``tuple``, *optional*):
|
|
2590
|
+
Extra custom arguments for the progress callback function.
|
|
2591
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
2592
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
2593
|
+
|
|
2594
|
+
Other Parameters:
|
|
2595
|
+
current (``int``):
|
|
2596
|
+
The amount of bytes transmitted so far.
|
|
2597
|
+
|
|
2598
|
+
total (``int``):
|
|
2599
|
+
The total size of the file.
|
|
2600
|
+
|
|
2601
|
+
*args (``tuple``, *optional*):
|
|
2602
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
2603
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
2604
|
+
|
|
2605
|
+
Returns:
|
|
2606
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
2607
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
2608
|
+
instead.
|
|
2609
|
+
|
|
2610
|
+
Raises:
|
|
2611
|
+
RPCError: In case of a Telegram RPC error.
|
|
2612
|
+
"""
|
|
2613
|
+
if quote is None:
|
|
2614
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
2615
|
+
|
|
2616
|
+
if reply_to_message_id is None and quote:
|
|
2617
|
+
reply_to_message_id = self.id
|
|
2618
|
+
|
|
2619
|
+
return await self._client.send_video_note(
|
|
2620
|
+
chat_id=self.chat.id,
|
|
2621
|
+
video_note=video_note,
|
|
2622
|
+
duration=duration,
|
|
2623
|
+
length=length,
|
|
2624
|
+
thumb=thumb,
|
|
2625
|
+
disable_notification=disable_notification,
|
|
2626
|
+
reply_to_message_id=reply_to_message_id,
|
|
2627
|
+
reply_markup=reply_markup,
|
|
2628
|
+
progress=progress,
|
|
2629
|
+
progress_args=progress_args
|
|
2630
|
+
)
|
|
2631
|
+
|
|
2632
|
+
async def reply_voice(
|
|
2633
|
+
self,
|
|
2634
|
+
voice: Union[str, BinaryIO],
|
|
2635
|
+
quote: bool = None,
|
|
2636
|
+
caption: str = "",
|
|
2637
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
2638
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
2639
|
+
duration: int = 0,
|
|
2640
|
+
disable_notification: bool = None,
|
|
2641
|
+
reply_to_message_id: int = None,
|
|
2642
|
+
reply_markup: Union[
|
|
2643
|
+
"types.InlineKeyboardMarkup",
|
|
2644
|
+
"types.ReplyKeyboardMarkup",
|
|
2645
|
+
"types.ReplyKeyboardRemove",
|
|
2646
|
+
"types.ForceReply"
|
|
2647
|
+
] = None,
|
|
2648
|
+
progress: Callable = None,
|
|
2649
|
+
progress_args: tuple = ()
|
|
2650
|
+
) -> "Message":
|
|
2651
|
+
"""Bound method *reply_voice* of :obj:`~pyrogram.types.Message`.
|
|
2652
|
+
|
|
2653
|
+
Use as a shortcut for:
|
|
2654
|
+
|
|
2655
|
+
.. code-block:: python
|
|
2656
|
+
|
|
2657
|
+
await client.send_voice(
|
|
2658
|
+
chat_id=message.chat.id,
|
|
2659
|
+
voice=voice
|
|
2660
|
+
)
|
|
2661
|
+
|
|
2662
|
+
Example:
|
|
2663
|
+
.. code-block:: python
|
|
2664
|
+
|
|
2665
|
+
await message.reply_voice(voice)
|
|
2666
|
+
|
|
2667
|
+
Parameters:
|
|
2668
|
+
voice (``str``):
|
|
2669
|
+
Audio file to send.
|
|
2670
|
+
Pass a file_id as string to send an audio that exists on the Telegram servers,
|
|
2671
|
+
pass an HTTP URL as a string for Telegram to get an audio from the Internet, or
|
|
2672
|
+
pass a file path as string to upload a new audio that exists on your local machine.
|
|
2673
|
+
|
|
2674
|
+
quote (``bool``, *optional*):
|
|
2675
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
2676
|
+
If *reply_to_message_id* is passed, this parameter will be ignored.
|
|
2677
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
2678
|
+
|
|
2679
|
+
caption (``str``, *optional*):
|
|
2680
|
+
Voice message caption, 0-1024 characters.
|
|
2681
|
+
|
|
2682
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
2683
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
2684
|
+
You can combine both syntaxes together.
|
|
2685
|
+
|
|
2686
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
2687
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
2688
|
+
|
|
2689
|
+
duration (``int``, *optional*):
|
|
2690
|
+
Duration of the voice message in seconds.
|
|
2691
|
+
|
|
2692
|
+
disable_notification (``bool``, *optional*):
|
|
2693
|
+
Sends the message silently.
|
|
2694
|
+
Users will receive a notification with no sound.
|
|
2695
|
+
|
|
2696
|
+
reply_to_message_id (``int``, *optional*):
|
|
2697
|
+
If the message is a reply, ID of the original message
|
|
2698
|
+
|
|
2699
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
2700
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
2701
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
2702
|
+
|
|
2703
|
+
progress (``Callable``, *optional*):
|
|
2704
|
+
Pass a callback function to view the file transmission progress.
|
|
2705
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
2706
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
2707
|
+
transmitted.
|
|
2708
|
+
|
|
2709
|
+
progress_args (``tuple``, *optional*):
|
|
2710
|
+
Extra custom arguments for the progress callback function.
|
|
2711
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
2712
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
2713
|
+
|
|
2714
|
+
Other Parameters:
|
|
2715
|
+
current (``int``):
|
|
2716
|
+
The amount of bytes transmitted so far.
|
|
2717
|
+
|
|
2718
|
+
total (``int``):
|
|
2719
|
+
The total size of the file.
|
|
2720
|
+
|
|
2721
|
+
*args (``tuple``, *optional*):
|
|
2722
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
2723
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
2724
|
+
|
|
2725
|
+
Returns:
|
|
2726
|
+
On success, the sent :obj:`~pyrogram.types.Message` is returned.
|
|
2727
|
+
In case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is returned
|
|
2728
|
+
instead.
|
|
2729
|
+
|
|
2730
|
+
Raises:
|
|
2731
|
+
RPCError: In case of a Telegram RPC error.
|
|
2732
|
+
"""
|
|
2733
|
+
if quote is None:
|
|
2734
|
+
quote = self.chat.type != enums.ChatType.PRIVATE
|
|
2735
|
+
|
|
2736
|
+
if reply_to_message_id is None and quote:
|
|
2737
|
+
reply_to_message_id = self.id
|
|
2738
|
+
|
|
2739
|
+
return await self._client.send_voice(
|
|
2740
|
+
chat_id=self.chat.id,
|
|
2741
|
+
voice=voice,
|
|
2742
|
+
caption=caption,
|
|
2743
|
+
parse_mode=parse_mode,
|
|
2744
|
+
caption_entities=caption_entities,
|
|
2745
|
+
duration=duration,
|
|
2746
|
+
disable_notification=disable_notification,
|
|
2747
|
+
reply_to_message_id=reply_to_message_id,
|
|
2748
|
+
reply_markup=reply_markup,
|
|
2749
|
+
progress=progress,
|
|
2750
|
+
progress_args=progress_args
|
|
2751
|
+
)
|
|
2752
|
+
|
|
2753
|
+
async def edit_text(
|
|
2754
|
+
self,
|
|
2755
|
+
text: str,
|
|
2756
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
2757
|
+
entities: List["types.MessageEntity"] = None,
|
|
2758
|
+
disable_web_page_preview: bool = None,
|
|
2759
|
+
reply_markup: "types.InlineKeyboardMarkup" = None
|
|
2760
|
+
) -> "Message":
|
|
2761
|
+
"""Bound method *edit_text* of :obj:`~pyrogram.types.Message`.
|
|
2762
|
+
|
|
2763
|
+
An alias exists as *edit*.
|
|
2764
|
+
|
|
2765
|
+
Use as a shortcut for:
|
|
2766
|
+
|
|
2767
|
+
.. code-block:: python
|
|
2768
|
+
|
|
2769
|
+
await client.edit_message_text(
|
|
2770
|
+
chat_id=message.chat.id,
|
|
2771
|
+
message_id=message.id,
|
|
2772
|
+
text="hello"
|
|
2773
|
+
)
|
|
2774
|
+
|
|
2775
|
+
Example:
|
|
2776
|
+
.. code-block:: python
|
|
2777
|
+
|
|
2778
|
+
await message.edit_text("hello")
|
|
2779
|
+
|
|
2780
|
+
Parameters:
|
|
2781
|
+
text (``str``):
|
|
2782
|
+
New text of the message.
|
|
2783
|
+
|
|
2784
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
2785
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
2786
|
+
You can combine both syntaxes together.
|
|
2787
|
+
|
|
2788
|
+
entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
2789
|
+
List of special entities that appear in message text, which can be specified instead of *parse_mode*.
|
|
2790
|
+
|
|
2791
|
+
disable_web_page_preview (``bool``, *optional*):
|
|
2792
|
+
Disables link previews for links in this message.
|
|
2793
|
+
|
|
2794
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
|
2795
|
+
An InlineKeyboardMarkup object.
|
|
2796
|
+
|
|
2797
|
+
Returns:
|
|
2798
|
+
On success, the edited :obj:`~pyrogram.types.Message` is returned.
|
|
2799
|
+
|
|
2800
|
+
Raises:
|
|
2801
|
+
RPCError: In case of a Telegram RPC error.
|
|
2802
|
+
"""
|
|
2803
|
+
return await self._client.edit_message_text(
|
|
2804
|
+
chat_id=self.chat.id,
|
|
2805
|
+
message_id=self.id,
|
|
2806
|
+
text=text,
|
|
2807
|
+
parse_mode=parse_mode,
|
|
2808
|
+
entities=entities,
|
|
2809
|
+
disable_web_page_preview=disable_web_page_preview,
|
|
2810
|
+
reply_markup=reply_markup
|
|
2811
|
+
)
|
|
2812
|
+
|
|
2813
|
+
edit = edit_text
|
|
2814
|
+
|
|
2815
|
+
async def edit_caption(
|
|
2816
|
+
self,
|
|
2817
|
+
caption: str,
|
|
2818
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
2819
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
2820
|
+
reply_markup: "types.InlineKeyboardMarkup" = None
|
|
2821
|
+
) -> "Message":
|
|
2822
|
+
"""Bound method *edit_caption* of :obj:`~pyrogram.types.Message`.
|
|
2823
|
+
|
|
2824
|
+
Use as a shortcut for:
|
|
2825
|
+
|
|
2826
|
+
.. code-block:: python
|
|
2827
|
+
|
|
2828
|
+
await client.edit_message_caption(
|
|
2829
|
+
chat_id=message.chat.id,
|
|
2830
|
+
message_id=message.id,
|
|
2831
|
+
caption="hello"
|
|
2832
|
+
)
|
|
2833
|
+
|
|
2834
|
+
Example:
|
|
2835
|
+
.. code-block:: python
|
|
2836
|
+
|
|
2837
|
+
await message.edit_caption("hello")
|
|
2838
|
+
|
|
2839
|
+
Parameters:
|
|
2840
|
+
caption (``str``):
|
|
2841
|
+
New caption of the message.
|
|
2842
|
+
|
|
2843
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
2844
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
2845
|
+
You can combine both syntaxes together.
|
|
2846
|
+
|
|
2847
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
2848
|
+
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
|
2849
|
+
|
|
2850
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
|
2851
|
+
An InlineKeyboardMarkup object.
|
|
2852
|
+
|
|
2853
|
+
Returns:
|
|
2854
|
+
On success, the edited :obj:`~pyrogram.types.Message` is returned.
|
|
2855
|
+
|
|
2856
|
+
Raises:
|
|
2857
|
+
RPCError: In case of a Telegram RPC error.
|
|
2858
|
+
"""
|
|
2859
|
+
return await self._client.edit_message_caption(
|
|
2860
|
+
chat_id=self.chat.id,
|
|
2861
|
+
message_id=self.id,
|
|
2862
|
+
caption=caption,
|
|
2863
|
+
parse_mode=parse_mode,
|
|
2864
|
+
caption_entities=caption_entities,
|
|
2865
|
+
reply_markup=reply_markup
|
|
2866
|
+
)
|
|
2867
|
+
|
|
2868
|
+
async def edit_media(
|
|
2869
|
+
self,
|
|
2870
|
+
media: "types.InputMedia",
|
|
2871
|
+
reply_markup: "types.InlineKeyboardMarkup" = None
|
|
2872
|
+
) -> "Message":
|
|
2873
|
+
"""Bound method *edit_media* of :obj:`~pyrogram.types.Message`.
|
|
2874
|
+
|
|
2875
|
+
Use as a shortcut for:
|
|
2876
|
+
|
|
2877
|
+
.. code-block:: python
|
|
2878
|
+
|
|
2879
|
+
await client.edit_message_media(
|
|
2880
|
+
chat_id=message.chat.id,
|
|
2881
|
+
message_id=message.id,
|
|
2882
|
+
media=media
|
|
2883
|
+
)
|
|
2884
|
+
|
|
2885
|
+
Example:
|
|
2886
|
+
.. code-block:: python
|
|
2887
|
+
|
|
2888
|
+
await message.edit_media(media)
|
|
2889
|
+
|
|
2890
|
+
Parameters:
|
|
2891
|
+
media (:obj:`~pyrogram.types.InputMedia`):
|
|
2892
|
+
One of the InputMedia objects describing an animation, audio, document, photo or video.
|
|
2893
|
+
|
|
2894
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
|
2895
|
+
An InlineKeyboardMarkup object.
|
|
2896
|
+
|
|
2897
|
+
Returns:
|
|
2898
|
+
On success, the edited :obj:`~pyrogram.types.Message` is returned.
|
|
2899
|
+
|
|
2900
|
+
Raises:
|
|
2901
|
+
RPCError: In case of a Telegram RPC error.
|
|
2902
|
+
"""
|
|
2903
|
+
return await self._client.edit_message_media(
|
|
2904
|
+
chat_id=self.chat.id,
|
|
2905
|
+
message_id=self.id,
|
|
2906
|
+
media=media,
|
|
2907
|
+
reply_markup=reply_markup
|
|
2908
|
+
)
|
|
2909
|
+
|
|
2910
|
+
async def edit_reply_markup(self, reply_markup: "types.InlineKeyboardMarkup" = None) -> "Message":
|
|
2911
|
+
"""Bound method *edit_reply_markup* of :obj:`~pyrogram.types.Message`.
|
|
2912
|
+
|
|
2913
|
+
Use as a shortcut for:
|
|
2914
|
+
|
|
2915
|
+
.. code-block:: python
|
|
2916
|
+
|
|
2917
|
+
await client.edit_message_reply_markup(
|
|
2918
|
+
chat_id=message.chat.id,
|
|
2919
|
+
message_id=message.id,
|
|
2920
|
+
reply_markup=inline_reply_markup
|
|
2921
|
+
)
|
|
2922
|
+
|
|
2923
|
+
Example:
|
|
2924
|
+
.. code-block:: python
|
|
2925
|
+
|
|
2926
|
+
await message.edit_reply_markup(inline_reply_markup)
|
|
2927
|
+
|
|
2928
|
+
Parameters:
|
|
2929
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`):
|
|
2930
|
+
An InlineKeyboardMarkup object.
|
|
2931
|
+
|
|
2932
|
+
Returns:
|
|
2933
|
+
On success, if edited message is sent by the bot, the edited
|
|
2934
|
+
:obj:`~pyrogram.types.Message` is returned, otherwise True is returned.
|
|
2935
|
+
|
|
2936
|
+
Raises:
|
|
2937
|
+
RPCError: In case of a Telegram RPC error.
|
|
2938
|
+
"""
|
|
2939
|
+
return await self._client.edit_message_reply_markup(
|
|
2940
|
+
chat_id=self.chat.id,
|
|
2941
|
+
message_id=self.id,
|
|
2942
|
+
reply_markup=reply_markup
|
|
2943
|
+
)
|
|
2944
|
+
|
|
2945
|
+
async def forward(
|
|
2946
|
+
self,
|
|
2947
|
+
chat_id: Union[int, str],
|
|
2948
|
+
disable_notification: bool = None,
|
|
2949
|
+
schedule_date: datetime = None
|
|
2950
|
+
) -> Union["types.Message", List["types.Message"]]:
|
|
2951
|
+
"""Bound method *forward* of :obj:`~pyrogram.types.Message`.
|
|
2952
|
+
|
|
2953
|
+
Use as a shortcut for:
|
|
2954
|
+
|
|
2955
|
+
.. code-block:: python
|
|
2956
|
+
|
|
2957
|
+
await client.forward_messages(
|
|
2958
|
+
chat_id=chat_id,
|
|
2959
|
+
from_chat_id=message.chat.id,
|
|
2960
|
+
message_ids=message.id
|
|
2961
|
+
)
|
|
2962
|
+
|
|
2963
|
+
Example:
|
|
2964
|
+
.. code-block:: python
|
|
2965
|
+
|
|
2966
|
+
await message.forward(chat_id)
|
|
2967
|
+
|
|
2968
|
+
Parameters:
|
|
2969
|
+
chat_id (``int`` | ``str``):
|
|
2970
|
+
Unique identifier (int) or username (str) of the target chat.
|
|
2971
|
+
For your personal cloud (Saved Messages) you can simply use "me" or "self".
|
|
2972
|
+
For a contact that exists in your Telegram address book you can use his phone number (str).
|
|
2973
|
+
|
|
2974
|
+
disable_notification (``bool``, *optional*):
|
|
2975
|
+
Sends the message silently.
|
|
2976
|
+
Users will receive a notification with no sound.
|
|
2977
|
+
|
|
2978
|
+
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
2979
|
+
Date when the message will be automatically sent.
|
|
2980
|
+
|
|
2981
|
+
Returns:
|
|
2982
|
+
On success, the forwarded Message is returned.
|
|
2983
|
+
|
|
2984
|
+
Raises:
|
|
2985
|
+
RPCError: In case of a Telegram RPC error.
|
|
2986
|
+
"""
|
|
2987
|
+
return await self._client.forward_messages(
|
|
2988
|
+
chat_id=chat_id,
|
|
2989
|
+
from_chat_id=self.chat.id,
|
|
2990
|
+
message_ids=self.id,
|
|
2991
|
+
disable_notification=disable_notification,
|
|
2992
|
+
schedule_date=schedule_date
|
|
2993
|
+
)
|
|
2994
|
+
|
|
2995
|
+
async def copy(
|
|
2996
|
+
self,
|
|
2997
|
+
chat_id: Union[int, str],
|
|
2998
|
+
caption: str = None,
|
|
2999
|
+
parse_mode: Optional["enums.ParseMode"] = None,
|
|
3000
|
+
caption_entities: List["types.MessageEntity"] = None,
|
|
3001
|
+
disable_notification: bool = None,
|
|
3002
|
+
reply_to_message_id: int = None,
|
|
3003
|
+
schedule_date: datetime = None,
|
|
3004
|
+
protect_content: bool = None,
|
|
3005
|
+
reply_markup: Union[
|
|
3006
|
+
"types.InlineKeyboardMarkup",
|
|
3007
|
+
"types.ReplyKeyboardMarkup",
|
|
3008
|
+
"types.ReplyKeyboardRemove",
|
|
3009
|
+
"types.ForceReply"
|
|
3010
|
+
] = object
|
|
3011
|
+
) -> Union["types.Message", List["types.Message"]]:
|
|
3012
|
+
"""Bound method *copy* of :obj:`~pyrogram.types.Message`.
|
|
3013
|
+
|
|
3014
|
+
Use as a shortcut for:
|
|
3015
|
+
|
|
3016
|
+
.. code-block:: python
|
|
3017
|
+
|
|
3018
|
+
await client.copy_message(
|
|
3019
|
+
chat_id=chat_id,
|
|
3020
|
+
from_chat_id=message.chat.id,
|
|
3021
|
+
message_id=message.id
|
|
3022
|
+
)
|
|
3023
|
+
|
|
3024
|
+
Example:
|
|
3025
|
+
.. code-block:: python
|
|
3026
|
+
|
|
3027
|
+
await message.copy(chat_id)
|
|
3028
|
+
|
|
3029
|
+
Parameters:
|
|
3030
|
+
chat_id (``int`` | ``str``):
|
|
3031
|
+
Unique identifier (int) or username (str) of the target chat.
|
|
3032
|
+
For your personal cloud (Saved Messages) you can simply use "me" or "self".
|
|
3033
|
+
For a contact that exists in your Telegram address book you can use his phone number (str).
|
|
3034
|
+
|
|
3035
|
+
caption (``string``, *optional*):
|
|
3036
|
+
New caption for media, 0-1024 characters after entities parsing.
|
|
3037
|
+
If not specified, the original caption is kept.
|
|
3038
|
+
Pass "" (empty string) to remove the caption.
|
|
3039
|
+
|
|
3040
|
+
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
|
|
3041
|
+
By default, texts are parsed using both Markdown and HTML styles.
|
|
3042
|
+
You can combine both syntaxes together.
|
|
3043
|
+
|
|
3044
|
+
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
|
3045
|
+
List of special entities that appear in the new caption, which can be specified instead of *parse_mode*.
|
|
3046
|
+
|
|
3047
|
+
disable_notification (``bool``, *optional*):
|
|
3048
|
+
Sends the message silently.
|
|
3049
|
+
Users will receive a notification with no sound.
|
|
3050
|
+
|
|
3051
|
+
reply_to_message_id (``int``, *optional*):
|
|
3052
|
+
If the message is a reply, ID of the original message.
|
|
3053
|
+
|
|
3054
|
+
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
|
3055
|
+
Date when the message will be automatically sent.
|
|
3056
|
+
|
|
3057
|
+
protect_content (``bool``, *optional*):
|
|
3058
|
+
Protects the contents of the sent message from forwarding and saving.
|
|
3059
|
+
|
|
3060
|
+
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
|
3061
|
+
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
|
3062
|
+
instructions to remove reply keyboard or to force a reply from the user.
|
|
3063
|
+
If not specified, the original reply markup is kept.
|
|
3064
|
+
Pass None to remove the reply markup.
|
|
3065
|
+
|
|
3066
|
+
Returns:
|
|
3067
|
+
:obj:`~pyrogram.types.Message`: On success, the copied message is returned.
|
|
3068
|
+
|
|
3069
|
+
Raises:
|
|
3070
|
+
RPCError: In case of a Telegram RPC error.
|
|
3071
|
+
"""
|
|
3072
|
+
if self.service:
|
|
3073
|
+
log.warning("Service messages cannot be copied. chat_id: %s, message_id: %s",
|
|
3074
|
+
self.chat.id, self.id)
|
|
3075
|
+
elif self.game and not await self._client.storage.is_bot():
|
|
3076
|
+
log.warning("Users cannot send messages with Game media type. chat_id: %s, message_id: %s",
|
|
3077
|
+
self.chat.id, self.id)
|
|
3078
|
+
elif self.empty:
|
|
3079
|
+
log.warning("Empty messages cannot be copied.")
|
|
3080
|
+
elif self.text:
|
|
3081
|
+
return await self._client.send_message(
|
|
3082
|
+
chat_id,
|
|
3083
|
+
text=self.text,
|
|
3084
|
+
entities=self.entities,
|
|
3085
|
+
parse_mode=enums.ParseMode.DISABLED,
|
|
3086
|
+
disable_web_page_preview=not self.web_page,
|
|
3087
|
+
disable_notification=disable_notification,
|
|
3088
|
+
reply_to_message_id=reply_to_message_id,
|
|
3089
|
+
schedule_date=schedule_date,
|
|
3090
|
+
protect_content=protect_content,
|
|
3091
|
+
reply_markup=self.reply_markup if reply_markup is object else reply_markup
|
|
3092
|
+
)
|
|
3093
|
+
elif self.media:
|
|
3094
|
+
send_media = partial(
|
|
3095
|
+
self._client.send_cached_media,
|
|
3096
|
+
chat_id=chat_id,
|
|
3097
|
+
disable_notification=disable_notification,
|
|
3098
|
+
reply_to_message_id=reply_to_message_id,
|
|
3099
|
+
schedule_date=schedule_date,
|
|
3100
|
+
protect_content=protect_content,
|
|
3101
|
+
reply_markup=self.reply_markup if reply_markup is object else reply_markup
|
|
3102
|
+
)
|
|
3103
|
+
|
|
3104
|
+
if self.photo:
|
|
3105
|
+
file_id = self.photo.file_id
|
|
3106
|
+
elif self.audio:
|
|
3107
|
+
file_id = self.audio.file_id
|
|
3108
|
+
elif self.document:
|
|
3109
|
+
file_id = self.document.file_id
|
|
3110
|
+
elif self.video:
|
|
3111
|
+
file_id = self.video.file_id
|
|
3112
|
+
elif self.animation:
|
|
3113
|
+
file_id = self.animation.file_id
|
|
3114
|
+
elif self.voice:
|
|
3115
|
+
file_id = self.voice.file_id
|
|
3116
|
+
elif self.sticker:
|
|
3117
|
+
file_id = self.sticker.file_id
|
|
3118
|
+
elif self.video_note:
|
|
3119
|
+
file_id = self.video_note.file_id
|
|
3120
|
+
elif self.contact:
|
|
3121
|
+
return await self._client.send_contact(
|
|
3122
|
+
chat_id,
|
|
3123
|
+
phone_number=self.contact.phone_number,
|
|
3124
|
+
first_name=self.contact.first_name,
|
|
3125
|
+
last_name=self.contact.last_name,
|
|
3126
|
+
vcard=self.contact.vcard,
|
|
3127
|
+
disable_notification=disable_notification,
|
|
3128
|
+
schedule_date=schedule_date
|
|
3129
|
+
)
|
|
3130
|
+
elif self.location:
|
|
3131
|
+
return await self._client.send_location(
|
|
3132
|
+
chat_id,
|
|
3133
|
+
latitude=self.location.latitude,
|
|
3134
|
+
longitude=self.location.longitude,
|
|
3135
|
+
disable_notification=disable_notification,
|
|
3136
|
+
schedule_date=schedule_date
|
|
3137
|
+
)
|
|
3138
|
+
elif self.venue:
|
|
3139
|
+
return await self._client.send_venue(
|
|
3140
|
+
chat_id,
|
|
3141
|
+
latitude=self.venue.location.latitude,
|
|
3142
|
+
longitude=self.venue.location.longitude,
|
|
3143
|
+
title=self.venue.title,
|
|
3144
|
+
address=self.venue.address,
|
|
3145
|
+
foursquare_id=self.venue.foursquare_id,
|
|
3146
|
+
foursquare_type=self.venue.foursquare_type,
|
|
3147
|
+
disable_notification=disable_notification,
|
|
3148
|
+
schedule_date=schedule_date
|
|
3149
|
+
)
|
|
3150
|
+
elif self.poll:
|
|
3151
|
+
return await self._client.send_poll(
|
|
3152
|
+
chat_id,
|
|
3153
|
+
question=self.poll.question,
|
|
3154
|
+
options=[opt.text for opt in self.poll.options],
|
|
3155
|
+
disable_notification=disable_notification,
|
|
3156
|
+
schedule_date=schedule_date
|
|
3157
|
+
)
|
|
3158
|
+
elif self.game:
|
|
3159
|
+
return await self._client.send_game(
|
|
3160
|
+
chat_id,
|
|
3161
|
+
game_short_name=self.game.short_name,
|
|
3162
|
+
disable_notification=disable_notification
|
|
3163
|
+
)
|
|
3164
|
+
else:
|
|
3165
|
+
raise ValueError("Unknown media type")
|
|
3166
|
+
|
|
3167
|
+
if self.sticker or self.video_note: # Sticker and VideoNote should have no caption
|
|
3168
|
+
return await send_media(file_id=file_id)
|
|
3169
|
+
else:
|
|
3170
|
+
if caption is None:
|
|
3171
|
+
caption = self.caption or ""
|
|
3172
|
+
caption_entities = self.caption_entities
|
|
3173
|
+
|
|
3174
|
+
return await send_media(
|
|
3175
|
+
file_id=file_id,
|
|
3176
|
+
caption=caption,
|
|
3177
|
+
parse_mode=parse_mode,
|
|
3178
|
+
caption_entities=caption_entities
|
|
3179
|
+
)
|
|
3180
|
+
else:
|
|
3181
|
+
raise ValueError("Can't copy this message")
|
|
3182
|
+
|
|
3183
|
+
async def delete(self, revoke: bool = True):
|
|
3184
|
+
"""Bound method *delete* of :obj:`~pyrogram.types.Message`.
|
|
3185
|
+
|
|
3186
|
+
Use as a shortcut for:
|
|
3187
|
+
|
|
3188
|
+
.. code-block:: python
|
|
3189
|
+
|
|
3190
|
+
await client.delete_messages(
|
|
3191
|
+
chat_id=chat_id,
|
|
3192
|
+
message_ids=message.id
|
|
3193
|
+
)
|
|
3194
|
+
|
|
3195
|
+
Example:
|
|
3196
|
+
.. code-block:: python
|
|
3197
|
+
|
|
3198
|
+
await message.delete()
|
|
3199
|
+
|
|
3200
|
+
Parameters:
|
|
3201
|
+
revoke (``bool``, *optional*):
|
|
3202
|
+
Deletes messages on both parts.
|
|
3203
|
+
This is only for private cloud chats and normal groups, messages on
|
|
3204
|
+
channels and supergroups are always revoked (i.e.: deleted for everyone).
|
|
3205
|
+
Defaults to True.
|
|
3206
|
+
|
|
3207
|
+
Returns:
|
|
3208
|
+
True on success, False otherwise.
|
|
3209
|
+
|
|
3210
|
+
Raises:
|
|
3211
|
+
RPCError: In case of a Telegram RPC error.
|
|
3212
|
+
"""
|
|
3213
|
+
return await self._client.delete_messages(
|
|
3214
|
+
chat_id=self.chat.id,
|
|
3215
|
+
message_ids=self.id,
|
|
3216
|
+
revoke=revoke
|
|
3217
|
+
)
|
|
3218
|
+
|
|
3219
|
+
async def click(self, x: Union[int, str] = 0, y: int = None, quote: bool = None, timeout: int = 10):
|
|
3220
|
+
"""Bound method *click* of :obj:`~pyrogram.types.Message`.
|
|
3221
|
+
|
|
3222
|
+
Use as a shortcut for clicking a button attached to the message instead of:
|
|
3223
|
+
|
|
3224
|
+
- Clicking inline buttons:
|
|
3225
|
+
|
|
3226
|
+
.. code-block:: python
|
|
3227
|
+
|
|
3228
|
+
await client.request_callback_answer(
|
|
3229
|
+
chat_id=message.chat.id,
|
|
3230
|
+
message_id=message.id,
|
|
3231
|
+
callback_data=message.reply_markup[i][j].callback_data
|
|
3232
|
+
)
|
|
3233
|
+
|
|
3234
|
+
- Clicking normal buttons:
|
|
3235
|
+
|
|
3236
|
+
.. code-block:: python
|
|
3237
|
+
|
|
3238
|
+
await client.send_message(
|
|
3239
|
+
chat_id=message.chat.id,
|
|
3240
|
+
text=message.reply_markup[i][j].text
|
|
3241
|
+
)
|
|
3242
|
+
|
|
3243
|
+
Example:
|
|
3244
|
+
This method can be used in three different ways:
|
|
3245
|
+
|
|
3246
|
+
1. Pass one integer argument only (e.g.: ``.click(2)``, to click a button at index 2).
|
|
3247
|
+
Buttons are counted left to right, starting from the top.
|
|
3248
|
+
|
|
3249
|
+
2. Pass two integer arguments (e.g.: ``.click(1, 0)``, to click a button at position (1, 0)).
|
|
3250
|
+
The origin (0, 0) is top-left.
|
|
3251
|
+
|
|
3252
|
+
3. Pass one string argument only (e.g.: ``.click("Settings")``, to click a button by using its label).
|
|
3253
|
+
Only the first matching button will be pressed.
|
|
3254
|
+
|
|
3255
|
+
Parameters:
|
|
3256
|
+
x (``int`` | ``str``):
|
|
3257
|
+
Used as integer index, integer abscissa (in pair with y) or as string label.
|
|
3258
|
+
Defaults to 0 (first button).
|
|
3259
|
+
|
|
3260
|
+
y (``int``, *optional*):
|
|
3261
|
+
Used as ordinate only (in pair with x).
|
|
3262
|
+
|
|
3263
|
+
quote (``bool``, *optional*):
|
|
3264
|
+
Useful for normal buttons only, where pressing it will result in a new message sent.
|
|
3265
|
+
If ``True``, the message will be sent as a reply to this message.
|
|
3266
|
+
Defaults to ``True`` in group chats and ``False`` in private chats.
|
|
3267
|
+
|
|
3268
|
+
timeout (``int``, *optional*):
|
|
3269
|
+
Timeout in seconds.
|
|
3270
|
+
|
|
3271
|
+
Returns:
|
|
3272
|
+
- The result of :meth:`~pyrogram.Client.request_callback_answer` in case of inline callback button clicks.
|
|
3273
|
+
- The result of :meth:`~Message.reply()` in case of normal button clicks.
|
|
3274
|
+
- A string in case the inline button is a URL, a *switch_inline_query* or a
|
|
3275
|
+
*switch_inline_query_current_chat* button.
|
|
3276
|
+
|
|
3277
|
+
Raises:
|
|
3278
|
+
RPCError: In case of a Telegram RPC error.
|
|
3279
|
+
ValueError: In case the provided index or position is out of range or the button label was not found.
|
|
3280
|
+
TimeoutError: In case, after clicking an inline button, the bot fails to answer within the timeout.
|
|
3281
|
+
"""
|
|
3282
|
+
|
|
3283
|
+
if isinstance(self.reply_markup, types.ReplyKeyboardMarkup):
|
|
3284
|
+
keyboard = self.reply_markup.keyboard
|
|
3285
|
+
is_inline = False
|
|
3286
|
+
elif isinstance(self.reply_markup, types.InlineKeyboardMarkup):
|
|
3287
|
+
keyboard = self.reply_markup.inline_keyboard
|
|
3288
|
+
is_inline = True
|
|
3289
|
+
else:
|
|
3290
|
+
raise ValueError("The message doesn't contain any keyboard")
|
|
3291
|
+
|
|
3292
|
+
if isinstance(x, int) and y is None:
|
|
3293
|
+
try:
|
|
3294
|
+
button = [
|
|
3295
|
+
button
|
|
3296
|
+
for row in keyboard
|
|
3297
|
+
for button in row
|
|
3298
|
+
][x]
|
|
3299
|
+
except IndexError:
|
|
3300
|
+
raise ValueError(f"The button at index {x} doesn't exist")
|
|
3301
|
+
elif isinstance(x, int) and isinstance(y, int):
|
|
3302
|
+
try:
|
|
3303
|
+
button = keyboard[y][x]
|
|
3304
|
+
except IndexError:
|
|
3305
|
+
raise ValueError(f"The button at position ({x}, {y}) doesn't exist")
|
|
3306
|
+
elif isinstance(x, str) and y is None:
|
|
3307
|
+
label = x.encode("utf-16", "surrogatepass").decode("utf-16")
|
|
3308
|
+
|
|
3309
|
+
try:
|
|
3310
|
+
button = [
|
|
3311
|
+
button
|
|
3312
|
+
for row in keyboard
|
|
3313
|
+
for button in row
|
|
3314
|
+
if label == button.text
|
|
3315
|
+
][0]
|
|
3316
|
+
except IndexError:
|
|
3317
|
+
raise ValueError(f"The button with label '{x}' doesn't exists")
|
|
3318
|
+
else:
|
|
3319
|
+
raise ValueError("Invalid arguments")
|
|
3320
|
+
|
|
3321
|
+
if is_inline:
|
|
3322
|
+
if button.callback_data:
|
|
3323
|
+
return await self._client.request_callback_answer(
|
|
3324
|
+
chat_id=self.chat.id,
|
|
3325
|
+
message_id=self.id,
|
|
3326
|
+
callback_data=button.callback_data,
|
|
3327
|
+
timeout=timeout
|
|
3328
|
+
)
|
|
3329
|
+
elif button.url:
|
|
3330
|
+
return button.url
|
|
3331
|
+
elif button.switch_inline_query:
|
|
3332
|
+
return button.switch_inline_query
|
|
3333
|
+
elif button.switch_inline_query_current_chat:
|
|
3334
|
+
return button.switch_inline_query_current_chat
|
|
3335
|
+
else:
|
|
3336
|
+
raise ValueError("This button is not supported yet")
|
|
3337
|
+
else:
|
|
3338
|
+
await self.reply(button, quote=quote)
|
|
3339
|
+
|
|
3340
|
+
async def react(self, emoji: str = "", big: bool = False) -> bool:
|
|
3341
|
+
"""Bound method *react* of :obj:`~pyrogram.types.Message`.
|
|
3342
|
+
|
|
3343
|
+
Use as a shortcut for:
|
|
3344
|
+
|
|
3345
|
+
.. code-block:: python
|
|
3346
|
+
|
|
3347
|
+
await client.send_reaction(
|
|
3348
|
+
chat_id=chat_id,
|
|
3349
|
+
message_id=message.id,
|
|
3350
|
+
emoji="🔥"
|
|
3351
|
+
)
|
|
3352
|
+
|
|
3353
|
+
Example:
|
|
3354
|
+
.. code-block:: python
|
|
3355
|
+
|
|
3356
|
+
await message.react(emoji="🔥")
|
|
3357
|
+
|
|
3358
|
+
Parameters:
|
|
3359
|
+
emoji (``str``, *optional*):
|
|
3360
|
+
Reaction emoji.
|
|
3361
|
+
Pass "" as emoji (default) to retract the reaction.
|
|
3362
|
+
|
|
3363
|
+
big (``bool``, *optional*):
|
|
3364
|
+
Pass True to show a bigger and longer reaction.
|
|
3365
|
+
Defaults to False.
|
|
3366
|
+
|
|
3367
|
+
Returns:
|
|
3368
|
+
``bool``: On success, True is returned.
|
|
3369
|
+
|
|
3370
|
+
Raises:
|
|
3371
|
+
RPCError: In case of a Telegram RPC error.
|
|
3372
|
+
"""
|
|
3373
|
+
|
|
3374
|
+
return await self._client.send_reaction(
|
|
3375
|
+
chat_id=self.chat.id,
|
|
3376
|
+
message_id=self.id,
|
|
3377
|
+
emoji=emoji,
|
|
3378
|
+
big=big
|
|
3379
|
+
)
|
|
3380
|
+
|
|
3381
|
+
async def retract_vote(
|
|
3382
|
+
self,
|
|
3383
|
+
) -> "types.Poll":
|
|
3384
|
+
"""Bound method *retract_vote* of :obj:`~pyrogram.types.Message`.
|
|
3385
|
+
|
|
3386
|
+
Use as a shortcut for:
|
|
3387
|
+
|
|
3388
|
+
.. code-block:: python
|
|
3389
|
+
|
|
3390
|
+
client.retract_vote(
|
|
3391
|
+
chat_id=message.chat.id,
|
|
3392
|
+
message_id=message_id,
|
|
3393
|
+
)
|
|
3394
|
+
|
|
3395
|
+
Example:
|
|
3396
|
+
.. code-block:: python
|
|
3397
|
+
|
|
3398
|
+
message.retract_vote()
|
|
3399
|
+
|
|
3400
|
+
Returns:
|
|
3401
|
+
:obj:`~pyrogram.types.Poll`: On success, the poll with the retracted vote is returned.
|
|
3402
|
+
|
|
3403
|
+
Raises:
|
|
3404
|
+
RPCError: In case of a Telegram RPC error.
|
|
3405
|
+
"""
|
|
3406
|
+
|
|
3407
|
+
return await self._client.retract_vote(
|
|
3408
|
+
chat_id=self.chat.id,
|
|
3409
|
+
message_id=self.id
|
|
3410
|
+
)
|
|
3411
|
+
|
|
3412
|
+
async def download(
|
|
3413
|
+
self,
|
|
3414
|
+
file_name: str = "",
|
|
3415
|
+
in_memory: bool = False,
|
|
3416
|
+
block: bool = True,
|
|
3417
|
+
progress: Callable = None,
|
|
3418
|
+
progress_args: tuple = ()
|
|
3419
|
+
) -> str:
|
|
3420
|
+
"""Bound method *download* of :obj:`~pyrogram.types.Message`.
|
|
3421
|
+
|
|
3422
|
+
Use as a shortcut for:
|
|
3423
|
+
|
|
3424
|
+
.. code-block:: python
|
|
3425
|
+
|
|
3426
|
+
await client.download_media(message)
|
|
3427
|
+
|
|
3428
|
+
Example:
|
|
3429
|
+
.. code-block:: python
|
|
3430
|
+
|
|
3431
|
+
await message.download()
|
|
3432
|
+
|
|
3433
|
+
Parameters:
|
|
3434
|
+
file_name (``str``, *optional*):
|
|
3435
|
+
A custom *file_name* to be used instead of the one provided by Telegram.
|
|
3436
|
+
By default, all files are downloaded in the *downloads* folder in your working directory.
|
|
3437
|
+
You can also specify a path for downloading files in a custom location: paths that end with "/"
|
|
3438
|
+
are considered directories. All non-existent folders will be created automatically.
|
|
3439
|
+
|
|
3440
|
+
in_memory (``bool``, *optional*):
|
|
3441
|
+
Pass True to download the media in-memory.
|
|
3442
|
+
A binary file-like object with its attribute ".name" set will be returned.
|
|
3443
|
+
Defaults to False.
|
|
3444
|
+
|
|
3445
|
+
block (``bool``, *optional*):
|
|
3446
|
+
Blocks the code execution until the file has been downloaded.
|
|
3447
|
+
Defaults to True.
|
|
3448
|
+
|
|
3449
|
+
progress (``Callable``, *optional*):
|
|
3450
|
+
Pass a callback function to view the file transmission progress.
|
|
3451
|
+
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
|
|
3452
|
+
detailed description) and will be called back each time a new file chunk has been successfully
|
|
3453
|
+
transmitted.
|
|
3454
|
+
|
|
3455
|
+
progress_args (``tuple``, *optional*):
|
|
3456
|
+
Extra custom arguments for the progress callback function.
|
|
3457
|
+
You can pass anything you need to be available in the progress callback scope; for example, a Message
|
|
3458
|
+
object or a Client instance in order to edit the message with the updated progress status.
|
|
3459
|
+
|
|
3460
|
+
Other Parameters:
|
|
3461
|
+
current (``int``):
|
|
3462
|
+
The amount of bytes transmitted so far.
|
|
3463
|
+
|
|
3464
|
+
total (``int``):
|
|
3465
|
+
The total size of the file.
|
|
3466
|
+
|
|
3467
|
+
*args (``tuple``, *optional*):
|
|
3468
|
+
Extra custom arguments as defined in the ``progress_args`` parameter.
|
|
3469
|
+
You can either keep ``*args`` or add every single extra argument in your function signature.
|
|
3470
|
+
|
|
3471
|
+
Returns:
|
|
3472
|
+
On success, the absolute path of the downloaded file as string is returned, None otherwise.
|
|
3473
|
+
|
|
3474
|
+
Raises:
|
|
3475
|
+
RPCError: In case of a Telegram RPC error.
|
|
3476
|
+
``ValueError``: If the message doesn't contain any downloadable media
|
|
3477
|
+
"""
|
|
3478
|
+
return await self._client.download_media(
|
|
3479
|
+
message=self,
|
|
3480
|
+
file_name=file_name,
|
|
3481
|
+
in_memory=in_memory,
|
|
3482
|
+
block=block,
|
|
3483
|
+
progress=progress,
|
|
3484
|
+
progress_args=progress_args,
|
|
3485
|
+
)
|
|
3486
|
+
|
|
3487
|
+
async def vote(
|
|
3488
|
+
self,
|
|
3489
|
+
option: int,
|
|
3490
|
+
) -> "types.Poll":
|
|
3491
|
+
"""Bound method *vote* of :obj:`~pyrogram.types.Message`.
|
|
3492
|
+
|
|
3493
|
+
Use as a shortcut for:
|
|
3494
|
+
|
|
3495
|
+
.. code-block:: python
|
|
3496
|
+
|
|
3497
|
+
client.vote_poll(
|
|
3498
|
+
chat_id=message.chat.id,
|
|
3499
|
+
message_id=message.id,
|
|
3500
|
+
option=1
|
|
3501
|
+
)
|
|
3502
|
+
|
|
3503
|
+
Example:
|
|
3504
|
+
.. code-block:: python
|
|
3505
|
+
|
|
3506
|
+
message.vote(6)
|
|
3507
|
+
|
|
3508
|
+
Parameters:
|
|
3509
|
+
option (``int``):
|
|
3510
|
+
Index of the poll option you want to vote for (0 to 9).
|
|
3511
|
+
|
|
3512
|
+
Returns:
|
|
3513
|
+
:obj:`~pyrogram.types.Poll`: On success, the poll with the chosen option is returned.
|
|
3514
|
+
|
|
3515
|
+
Raises:
|
|
3516
|
+
RPCError: In case of a Telegram RPC error.
|
|
3517
|
+
"""
|
|
3518
|
+
|
|
3519
|
+
return await self._client.vote_poll(
|
|
3520
|
+
chat_id=self.chat.id,
|
|
3521
|
+
message_id=self.id,
|
|
3522
|
+
options=option
|
|
3523
|
+
)
|
|
3524
|
+
|
|
3525
|
+
async def pin(self, disable_notification: bool = False, both_sides: bool = False) -> "types.Message":
|
|
3526
|
+
"""Bound method *pin* of :obj:`~pyrogram.types.Message`.
|
|
3527
|
+
|
|
3528
|
+
Use as a shortcut for:
|
|
3529
|
+
|
|
3530
|
+
.. code-block:: python
|
|
3531
|
+
|
|
3532
|
+
await client.pin_chat_message(
|
|
3533
|
+
chat_id=message.chat.id,
|
|
3534
|
+
message_id=message_id
|
|
3535
|
+
)
|
|
3536
|
+
|
|
3537
|
+
Example:
|
|
3538
|
+
.. code-block:: python
|
|
3539
|
+
|
|
3540
|
+
await message.pin()
|
|
3541
|
+
|
|
3542
|
+
Parameters:
|
|
3543
|
+
disable_notification (``bool``):
|
|
3544
|
+
Pass True, if it is not necessary to send a notification to all chat members about the new pinned
|
|
3545
|
+
message. Notifications are always disabled in channels.
|
|
3546
|
+
|
|
3547
|
+
both_sides (``bool``, *optional*):
|
|
3548
|
+
Pass True to pin the message for both sides (you and recipient).
|
|
3549
|
+
Applicable to private chats only. Defaults to False.
|
|
3550
|
+
|
|
3551
|
+
Returns:
|
|
3552
|
+
:obj:`~pyrogram.types.Message`: On success, the service message is returned.
|
|
3553
|
+
|
|
3554
|
+
Raises:
|
|
3555
|
+
RPCError: In case of a Telegram RPC error.
|
|
3556
|
+
"""
|
|
3557
|
+
return await self._client.pin_chat_message(
|
|
3558
|
+
chat_id=self.chat.id,
|
|
3559
|
+
message_id=self.id,
|
|
3560
|
+
disable_notification=disable_notification,
|
|
3561
|
+
both_sides=both_sides
|
|
3562
|
+
)
|
|
3563
|
+
|
|
3564
|
+
async def unpin(self) -> bool:
|
|
3565
|
+
"""Bound method *unpin* of :obj:`~pyrogram.types.Message`.
|
|
3566
|
+
|
|
3567
|
+
Use as a shortcut for:
|
|
3568
|
+
|
|
3569
|
+
.. code-block:: python
|
|
3570
|
+
|
|
3571
|
+
await client.unpin_chat_message(
|
|
3572
|
+
chat_id=message.chat.id,
|
|
3573
|
+
message_id=message_id
|
|
3574
|
+
)
|
|
3575
|
+
|
|
3576
|
+
Example:
|
|
3577
|
+
.. code-block:: python
|
|
3578
|
+
|
|
3579
|
+
await message.unpin()
|
|
3580
|
+
|
|
3581
|
+
Returns:
|
|
3582
|
+
True on success.
|
|
3583
|
+
|
|
3584
|
+
Raises:
|
|
3585
|
+
RPCError: In case of a Telegram RPC error.
|
|
3586
|
+
"""
|
|
3587
|
+
return await self._client.unpin_chat_message(
|
|
3588
|
+
chat_id=self.chat.id,
|
|
3589
|
+
message_id=self.id
|
|
3590
|
+
)
|