@mtkruto/node 0.13.0 → 0.15.0
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.
- package/esm/0_deps.d.ts +1 -1
- package/esm/0_deps.js +1 -1
- package/esm/0_errors.d.ts +1 -1
- package/esm/0_errors.js +1 -1
- package/esm/1_utilities.d.ts +1 -1
- package/esm/1_utilities.js +1 -1
- package/esm/2_connection.d.ts +1 -1
- package/esm/2_connection.js +1 -1
- package/esm/2_storage.d.ts +1 -1
- package/esm/2_storage.js +1 -1
- package/esm/2_tl.d.ts +1 -1
- package/esm/2_tl.js +1 -1
- package/esm/3_errors.d.ts +1 -1
- package/esm/3_errors.js +1 -1
- package/esm/3_transport.d.ts +1 -1
- package/esm/3_transport.js +1 -1
- package/esm/3_types.d.ts +5 -1
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +5 -1
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +2 -2
- package/esm/4_errors.d.ts +1 -1
- package/esm/4_errors.js +1 -1
- package/esm/5_client.d.ts +1 -1
- package/esm/5_client.js +1 -1
- package/esm/client/0_client_abstract.js +1 -1
- package/esm/client/0_filters.d.ts +1 -1
- package/esm/client/0_filters.js +1 -1
- package/esm/client/0_html.d.ts +1 -1
- package/esm/client/0_html.js +1 -1
- package/esm/client/0_markdown.d.ts +1 -1
- package/esm/client/0_markdown.js +1 -1
- package/esm/client/0_message.d.ts +1 -1
- package/esm/client/0_message.js +1 -1
- package/esm/client/0_params.d.ts +31 -9
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_params.js +1 -1
- package/esm/client/0_password.js +1 -1
- package/esm/client/0_storage_operations.d.ts +1 -1
- package/esm/client/0_storage_operations.js +1 -1
- package/esm/client/0_update_processor.d.ts +7 -0
- package/esm/client/0_update_processor.d.ts.map +1 -0
- package/esm/client/0_update_processor.js +1 -0
- package/esm/client/0_utilities.d.ts +3 -3
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +1 -1
- package/esm/client/1_client_encrypted.d.ts +1 -1
- package/esm/client/1_client_encrypted.js +1 -1
- package/esm/client/1_client_plain.d.ts +1 -1
- package/esm/client/1_client_plain.js +1 -1
- package/esm/client/1_composer.d.ts +1 -1
- package/esm/client/1_composer.js +1 -1
- package/esm/client/1_types.d.ts +1 -1
- package/esm/client/1_types.js +1 -1
- package/esm/client/2_account_manager.d.ts +1 -1
- package/esm/client/2_account_manager.js +1 -1
- package/esm/client/2_bot_info_manager.d.ts +1 -1
- package/esm/client/2_bot_info_manager.js +1 -1
- package/esm/client/2_business_connection_manager.d.ts +4 -3
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +2 -2
- package/esm/client/2_file_manager.js +1 -1
- package/esm/client/2_gift_manager.d.ts +29 -0
- package/esm/client/2_gift_manager.d.ts.map +1 -0
- package/esm/client/2_gift_manager.js +62 -0
- package/esm/client/2_network_statistics_manager.d.ts +1 -1
- package/esm/client/2_network_statistics_manager.js +1 -1
- package/esm/client/2_payment_manager.d.ts +4 -3
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +2 -2
- package/esm/client/2_reaction_manager.d.ts +4 -3
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +2 -2
- package/esm/client/2_translations_manager.d.ts +3 -2
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +1 -1
- package/esm/client/2_update_manager.d.ts +1 -1
- package/esm/client/2_update_manager.js +1 -1
- package/esm/client/3_message_manager.d.ts +10 -26
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +64 -241
- package/esm/client/3_video_chat_manager.d.ts +5 -4
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +5 -2
- package/esm/client/4_callback_query_manager.d.ts +4 -3
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +2 -2
- package/esm/client/4_chat_list_manager.d.ts +5 -4
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +3 -2
- package/esm/client/4_chat_manager.d.ts +61 -0
- package/esm/client/4_chat_manager.d.ts.map +1 -0
- package/esm/client/4_chat_manager.js +293 -0
- package/esm/client/4_inline_query_manager.d.ts +4 -3
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +2 -2
- package/esm/client/4_poll_manager.d.ts +4 -3
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +2 -2
- package/esm/client/4_story_manager.d.ts +4 -3
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +2 -2
- package/esm/client/5_client.d.ts +44 -7
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +182 -73
- package/esm/connection/0_connection.d.ts +1 -1
- package/esm/connection/0_connection.js +1 -1
- package/esm/connection/1_connection_tcp.node.d.ts +1 -1
- package/esm/connection/1_connection_tcp.node.js +1 -1
- package/esm/connection/1_connection_web_socket.js +1 -1
- package/esm/mod.d.ts +1 -1
- package/esm/mod.js +1 -1
- package/esm/storage/0_storage.d.ts +1 -1
- package/esm/storage/0_storage.js +1 -1
- package/esm/storage/1_utilities.d.ts +1 -1
- package/esm/storage/1_utilities.js +1 -1
- package/esm/storage/2_storage_indexed_db.d.ts +1 -1
- package/esm/storage/2_storage_indexed_db.js +1 -1
- package/esm/storage/2_storage_local_storage.node.d.ts +1 -1
- package/esm/storage/2_storage_local_storage.node.js +1 -1
- package/esm/storage/2_storage_memory.d.ts +1 -1
- package/esm/storage/2_storage_memory.js +1 -1
- package/esm/storage/2_storage_session_storage.d.ts +1 -1
- package/esm/storage/2_storage_session_storage.js +1 -1
- package/esm/tl/0_api.d.ts +218 -79
- package/esm/tl/0_api.d.ts.map +1 -1
- package/esm/tl/0_api.js +362 -159
- package/esm/tl/0_tl_raw_reader.d.ts +1 -1
- package/esm/tl/0_tl_raw_reader.js +1 -1
- package/esm/tl/0_tl_raw_writer.d.ts +1 -1
- package/esm/tl/0_tl_raw_writer.js +1 -1
- package/esm/tl/1_utilities.d.ts +1 -1
- package/esm/tl/1_utilities.js +1 -1
- package/esm/tl/2_deserialize.d.ts +1 -1
- package/esm/tl/2_deserialize.js +1 -1
- package/esm/tl/2_serialize.d.ts +1 -1
- package/esm/tl/2_serialize.js +1 -1
- package/esm/tl/3_tl_reader.d.ts +1 -1
- package/esm/tl/3_tl_reader.js +1 -1
- package/esm/tl/3_utilities.d.ts +1 -1
- package/esm/tl/3_utilities.js +1 -1
- package/esm/tl/4_rpc_result.d.ts +1 -1
- package/esm/tl/4_rpc_result.js +1 -1
- package/esm/tl/4_tl_writer.d.ts +1 -1
- package/esm/tl/4_tl_writer.js +1 -1
- package/esm/tl/5_message.d.ts +1 -1
- package/esm/tl/5_message.js +1 -1
- package/esm/transport/0_obfuscation.js +1 -1
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.js +1 -1
- package/esm/transport/1_transport_abridged.d.ts +1 -1
- package/esm/transport/1_transport_abridged.js +1 -1
- package/esm/transport/1_transport_intermediate.d.ts +1 -1
- package/esm/transport/1_transport_intermediate.js +1 -1
- package/esm/transport/2_transport_provider.d.ts +1 -1
- package/esm/transport/2_transport_provider.js +1 -1
- package/esm/transport/3_transport_provider_tcp.d.ts +1 -1
- package/esm/transport/3_transport_provider_tcp.js +1 -1
- package/esm/transport/3_transport_provider_web_socket.d.ts +1 -1
- package/esm/transport/3_transport_provider_web_socket.js +1 -1
- package/esm/types/0_authorization_state.d.ts +1 -1
- package/esm/types/0_authorization_state.js +1 -1
- package/esm/types/0_birthday.d.ts +1 -1
- package/esm/types/0_birthday.js +1 -1
- package/esm/types/0_bot_command.d.ts +1 -1
- package/esm/types/0_bot_command.js +1 -1
- package/esm/types/0_callback_query_answer.d.ts +1 -1
- package/esm/types/0_callback_query_answer.js +1 -1
- package/esm/types/0_callback_query_question.d.ts +1 -1
- package/esm/types/0_callback_query_question.js +1 -1
- package/esm/types/0_chat_action.d.ts +1 -1
- package/esm/types/0_chat_action.js +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +1 -1
- package/esm/types/0_chat_administrator_rights.js +1 -1
- package/esm/types/0_chat_member_rights.d.ts +1 -1
- package/esm/types/0_chat_member_rights.js +1 -1
- package/esm/types/0_chat_photo.d.ts +1 -1
- package/esm/types/0_chat_photo.js +1 -1
- package/esm/types/0_connection_state.d.ts +1 -1
- package/esm/types/0_connection_state.js +1 -1
- package/esm/types/0_contact.d.ts +1 -1
- package/esm/types/0_contact.js +1 -1
- package/esm/types/0_dice.d.ts +1 -1
- package/esm/types/0_dice.js +1 -1
- package/esm/types/0_failed_invitation.d.ts +1 -1
- package/esm/types/0_failed_invitation.js +1 -1
- package/esm/types/0_file_source.d.ts +1 -1
- package/esm/types/0_file_source.js +1 -1
- package/esm/types/0_giveaway_parameters.d.ts +1 -1
- package/esm/types/0_giveaway_parameters.js +1 -1
- package/esm/types/0_id.d.ts +1 -1
- package/esm/types/0_id.js +1 -1
- package/esm/types/0_invoice.d.ts +1 -1
- package/esm/types/0_invoice.js +1 -1
- package/esm/types/0_keyboard_button_poll_type.d.ts +1 -1
- package/esm/types/0_keyboard_button_poll_type.js +1 -1
- package/esm/types/0_link_preview.d.ts +1 -1
- package/esm/types/0_link_preview.js +1 -1
- package/esm/types/0_live_stream_channel.d.ts +1 -1
- package/esm/types/0_live_stream_channel.js +1 -1
- package/esm/types/0_location.d.ts +1 -1
- package/esm/types/0_location.js +1 -1
- package/esm/types/0_login_url.d.ts +1 -1
- package/esm/types/0_login_url.js +1 -1
- package/esm/types/0_mask_position.d.ts +1 -1
- package/esm/types/0_mask_position.js +1 -1
- package/esm/types/0_message_entity.d.ts +1 -1
- package/esm/types/0_message_entity.js +1 -1
- package/esm/types/0_message_reference.d.ts +1 -1
- package/esm/types/0_message_reference.js +1 -1
- package/esm/types/0_message_search_filter.d.ts +1 -1
- package/esm/types/0_message_search_filter.js +1 -1
- package/esm/types/0_mini_app_info.d.ts +1 -1
- package/esm/types/0_mini_app_info.js +1 -1
- package/esm/types/0_network_statistics_entry.d.ts +1 -1
- package/esm/types/0_network_statistics_entry.js +1 -1
- package/esm/types/0_opening_hours.d.ts +1 -1
- package/esm/types/0_opening_hours.js +1 -1
- package/esm/types/0_parse_mode.d.ts +1 -1
- package/esm/types/0_parse_mode.js +1 -1
- package/esm/types/0_price_tag.d.ts +1 -1
- package/esm/types/0_price_tag.js +1 -1
- package/esm/types/0_reaction.d.ts +1 -1
- package/esm/types/0_reaction.js +1 -1
- package/esm/types/0_refunded_payment.d.ts +1 -1
- package/esm/types/0_refunded_payment.js +1 -1
- package/esm/types/0_restriction_reason.d.ts +1 -1
- package/esm/types/0_restriction_reason.js +1 -1
- package/esm/types/0_self_destruct_option.d.ts +1 -1
- package/esm/types/0_self_destruct_option.js +1 -1
- package/esm/types/0_shipping_address.d.ts +1 -1
- package/esm/types/0_shipping_address.js +1 -1
- package/esm/types/0_story_reference.d.ts +1 -1
- package/esm/types/0_story_reference.js +1 -1
- package/esm/types/0_switch_inline_query_chosen_chats.d.ts +1 -1
- package/esm/types/0_switch_inline_query_chosen_chats.js +1 -1
- package/esm/types/0_thumbnail.d.ts +1 -1
- package/esm/types/0_thumbnail.js +1 -1
- package/esm/types/0_video_chat.d.ts +1 -1
- package/esm/types/0_video_chat.js +1 -1
- package/esm/types/0_voice.d.ts +1 -1
- package/esm/types/0_voice.js +1 -1
- package/esm/types/1_animation.d.ts +1 -1
- package/esm/types/1_animation.js +1 -1
- package/esm/types/1_audio.d.ts +1 -1
- package/esm/types/1_audio.js +1 -1
- package/esm/types/1_bot_command_scope.d.ts +1 -1
- package/esm/types/1_bot_command_scope.js +1 -1
- package/esm/types/1_chat_p.d.ts +1 -1
- package/esm/types/1_chat_p.js +1 -1
- package/esm/types/1_document.d.ts +1 -1
- package/esm/types/1_document.js +1 -1
- package/esm/types/1_giveaway.d.ts +1 -1
- package/esm/types/1_giveaway.js +1 -1
- package/esm/types/1_inline_query_result_button.d.ts +1 -1
- package/esm/types/1_inline_query_result_button.js +1 -1
- package/esm/types/1_input_media.d.ts +1 -1
- package/esm/types/1_input_media.js +1 -1
- package/esm/types/1_input_story_content.d.ts +1 -1
- package/esm/types/1_input_story_content.js +1 -1
- package/esm/types/1_keyboard_button.d.ts +1 -1
- package/esm/types/1_keyboard_button.js +1 -1
- package/esm/types/1_message_content.d.ts +2 -2
- package/esm/types/1_message_content.d.ts.map +1 -1
- package/esm/types/1_message_content.js +1 -1
- package/esm/types/1_message_reaction.d.ts +1 -1
- package/esm/types/1_message_reaction.js +1 -1
- package/esm/types/1_network_statistics.d.ts +1 -1
- package/esm/types/1_network_statistics.js +1 -1
- package/esm/types/1_order_info.d.ts +1 -1
- package/esm/types/1_order_info.js +1 -1
- package/esm/types/1_photo.d.ts +1 -1
- package/esm/types/1_photo.js +1 -1
- package/esm/types/1_poll_option.d.ts +1 -1
- package/esm/types/1_poll_option.js +1 -1
- package/esm/types/1_reaction_count.d.ts +1 -1
- package/esm/types/1_reaction_count.js +1 -1
- package/esm/types/1_reply_quote.d.ts +1 -1
- package/esm/types/1_reply_quote.js +1 -1
- package/esm/types/1_sticker.d.ts +2 -1
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +7 -3
- package/esm/types/1_story_privacy.d.ts +1 -1
- package/esm/types/1_story_privacy.js +1 -1
- package/esm/types/1_story_reaction.d.ts +1 -1
- package/esm/types/1_story_reaction.js +1 -1
- package/esm/types/1_user.d.ts +1 -1
- package/esm/types/1_user.js +1 -1
- package/esm/types/1_venue.d.ts +1 -1
- package/esm/types/1_venue.js +1 -1
- package/esm/types/1_video.d.ts +1 -1
- package/esm/types/1_video.js +1 -1
- package/esm/types/1_video_note.d.ts +1 -1
- package/esm/types/1_video_note.js +1 -1
- package/esm/types/2_business_connection.d.ts +1 -1
- package/esm/types/2_business_connection.js +1 -1
- package/esm/types/2_chat.d.ts +1 -1
- package/esm/types/2_chat.js +1 -1
- package/esm/types/2_chat_member.d.ts +1 -1
- package/esm/types/2_chat_member.js +1 -1
- package/esm/types/2_chosen_inline_result.d.ts +1 -1
- package/esm/types/2_chosen_inline_result.js +1 -1
- package/esm/types/2_forward_header.d.ts +1 -1
- package/esm/types/2_forward_header.js +1 -1
- package/esm/types/2_game.d.ts +1 -1
- package/esm/types/2_game.js +1 -1
- package/esm/types/2_gift_upgraded_component.d.ts +95 -0
- package/esm/types/2_gift_upgraded_component.d.ts.map +1 -0
- package/esm/types/2_gift_upgraded_component.js +88 -0
- package/esm/types/2_inactive_chat.d.ts +1 -1
- package/esm/types/2_inactive_chat.js +1 -1
- package/esm/types/2_inline_keyboard_button.d.ts +1 -1
- package/esm/types/2_inline_keyboard_button.js +1 -1
- package/esm/types/2_inline_query.d.ts +1 -1
- package/esm/types/2_inline_query.js +1 -1
- package/esm/types/2_invite_link.d.ts +1 -1
- package/esm/types/2_invite_link.js +1 -1
- package/esm/types/2_message_interactions.d.ts +1 -1
- package/esm/types/2_message_interactions.js +1 -1
- package/esm/types/2_message_reaction_count.d.ts +1 -1
- package/esm/types/2_message_reaction_count.js +1 -1
- package/esm/types/2_message_reactions.d.ts +1 -1
- package/esm/types/2_message_reactions.js +1 -1
- package/esm/types/2_poll.d.ts +1 -1
- package/esm/types/2_poll.js +1 -1
- package/esm/types/2_pre_checkout_query.d.ts +1 -1
- package/esm/types/2_pre_checkout_query.js +1 -1
- package/esm/types/2_reply_to.d.ts +1 -1
- package/esm/types/2_reply_to.js +1 -1
- package/esm/types/2_story_content.d.ts +1 -1
- package/esm/types/2_story_content.js +1 -1
- package/esm/types/2_story_interactions.d.ts +1 -1
- package/esm/types/2_story_interactions.js +1 -1
- package/esm/types/2_story_interactive_area.d.ts +1 -1
- package/esm/types/2_story_interactive_area.js +1 -1
- package/esm/types/2_successful_payment.d.ts +1 -1
- package/esm/types/2_successful_payment.js +1 -1
- package/esm/types/3_chat_member_updated.d.ts +1 -1
- package/esm/types/3_chat_member_updated.js +1 -1
- package/esm/types/3_gift.d.ts +82 -0
- package/esm/types/3_gift.d.ts.map +1 -0
- package/esm/types/3_gift.js +88 -0
- package/esm/types/3_join_request.d.ts +1 -1
- package/esm/types/3_join_request.js +1 -1
- package/esm/types/3_reply_markup.d.ts +1 -1
- package/esm/types/3_reply_markup.js +1 -1
- package/esm/types/3_story.d.ts +1 -1
- package/esm/types/3_story.js +1 -1
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_inline_query_result.js +1 -1
- package/esm/types/4_message.d.ts +2 -1
- package/esm/types/4_message.d.ts.map +1 -1
- package/esm/types/4_message.js +9 -3
- package/esm/types/4_user_gift.d.ts +44 -0
- package/esm/types/4_user_gift.d.ts.map +1 -0
- package/esm/types/4_user_gift.js +43 -0
- package/esm/types/5_callback_query.d.ts +1 -1
- package/esm/types/5_callback_query.js +1 -1
- package/esm/types/5_chat_list_item.d.ts +1 -1
- package/esm/types/5_chat_list_item.js +1 -1
- package/esm/types/5_inline_query_answer.d.ts +1 -1
- package/esm/types/5_inline_query_answer.js +1 -1
- package/esm/types/5_user_gifts.d.ts +32 -0
- package/esm/types/5_user_gifts.d.ts.map +1 -0
- package/esm/types/5_user_gifts.js +29 -0
- package/esm/types/6_update.d.ts +1 -1
- package/esm/types/6_update.js +1 -1
- package/esm/types/_file_id.d.ts +1 -1
- package/esm/types/_file_id.js +1 -1
- package/esm/types/_getters.d.ts +1 -1
- package/esm/types/_getters.js +1 -1
- package/esm/utilities/0_bigint.js +1 -1
- package/esm/utilities/0_buffer.d.ts +1 -1
- package/esm/utilities/0_buffer.js +1 -1
- package/esm/utilities/0_cache_map.d.ts +1 -1
- package/esm/utilities/0_cache_map.js +1 -1
- package/esm/utilities/0_color.d.ts +1 -1
- package/esm/utilities/0_color.js +1 -1
- package/esm/utilities/0_env.js +1 -1
- package/esm/utilities/0_gunzip.d.ts +1 -1
- package/esm/utilities/0_gunzip.js +1 -1
- package/esm/utilities/0_hash.js +1 -1
- package/esm/utilities/0_misc.d.ts +1 -1
- package/esm/utilities/0_misc.js +1 -1
- package/esm/utilities/0_mutex.d.ts +1 -1
- package/esm/utilities/0_mutex.js +1 -1
- package/esm/utilities/0_object.d.ts +1 -1
- package/esm/utilities/0_object.js +1 -1
- package/esm/utilities/0_part_stream.d.ts +1 -1
- package/esm/utilities/0_part_stream.js +1 -1
- package/esm/utilities/0_rle.d.ts +1 -1
- package/esm/utilities/0_rle.js +1 -1
- package/esm/utilities/0_types.d.ts +1 -1
- package/esm/utilities/0_types.js +1 -1
- package/esm/utilities/0_units.d.ts +1 -1
- package/esm/utilities/0_units.js +1 -1
- package/esm/utilities/1_auth.js +1 -1
- package/esm/utilities/1_base64.d.ts +1 -1
- package/esm/utilities/1_base64.js +1 -1
- package/esm/utilities/1_crypto.d.ts +1 -1
- package/esm/utilities/1_crypto.js +1 -1
- package/esm/utilities/1_logger.d.ts +1 -1
- package/esm/utilities/1_logger.js +1 -1
- package/esm/utilities/1_math.d.ts +1 -1
- package/esm/utilities/1_math.js +1 -1
- package/esm/utilities/2_queue.d.ts +1 -1
- package/esm/utilities/2_queue.js +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +1 -1
- package/script/0_deps.js +1 -1
- package/script/0_errors.d.ts +1 -1
- package/script/0_errors.js +1 -1
- package/script/1_utilities.d.ts +1 -1
- package/script/1_utilities.js +1 -1
- package/script/2_connection.d.ts +1 -1
- package/script/2_connection.js +1 -1
- package/script/2_storage.d.ts +1 -1
- package/script/2_storage.js +1 -1
- package/script/2_tl.d.ts +1 -1
- package/script/2_tl.js +1 -1
- package/script/3_errors.d.ts +1 -1
- package/script/3_errors.js +1 -1
- package/script/3_transport.d.ts +1 -1
- package/script/3_transport.js +1 -1
- package/script/3_types.d.ts +5 -1
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +5 -1
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +2 -2
- package/script/4_errors.d.ts +1 -1
- package/script/4_errors.js +1 -1
- package/script/5_client.d.ts +1 -1
- package/script/5_client.js +1 -1
- package/script/client/0_client_abstract.js +1 -1
- package/script/client/0_filters.d.ts +1 -1
- package/script/client/0_filters.js +1 -1
- package/script/client/0_html.d.ts +1 -1
- package/script/client/0_html.js +1 -1
- package/script/client/0_markdown.d.ts +1 -1
- package/script/client/0_markdown.js +1 -1
- package/script/client/0_message.d.ts +1 -1
- package/script/client/0_message.js +1 -1
- package/script/client/0_params.d.ts +31 -9
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_params.js +1 -1
- package/script/client/0_password.js +1 -1
- package/script/client/0_storage_operations.d.ts +1 -1
- package/script/client/0_storage_operations.js +1 -1
- package/script/client/0_update_processor.d.ts +7 -0
- package/script/client/0_update_processor.d.ts.map +1 -0
- package/script/client/0_update_processor.js +2 -0
- package/script/client/0_utilities.d.ts +3 -3
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +1 -1
- package/script/client/1_client_encrypted.d.ts +1 -1
- package/script/client/1_client_encrypted.js +1 -1
- package/script/client/1_client_plain.d.ts +1 -1
- package/script/client/1_client_plain.js +1 -1
- package/script/client/1_composer.d.ts +1 -1
- package/script/client/1_composer.js +1 -1
- package/script/client/1_types.d.ts +1 -1
- package/script/client/1_types.js +1 -1
- package/script/client/2_account_manager.d.ts +1 -1
- package/script/client/2_account_manager.js +1 -1
- package/script/client/2_bot_info_manager.d.ts +1 -1
- package/script/client/2_bot_info_manager.js +1 -1
- package/script/client/2_business_connection_manager.d.ts +4 -3
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +2 -2
- package/script/client/2_file_manager.js +1 -1
- package/script/client/2_gift_manager.d.ts +29 -0
- package/script/client/2_gift_manager.d.ts.map +1 -0
- package/script/client/2_gift_manager.js +66 -0
- package/script/client/2_network_statistics_manager.d.ts +1 -1
- package/script/client/2_network_statistics_manager.js +1 -1
- package/script/client/2_payment_manager.d.ts +4 -3
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +2 -2
- package/script/client/2_reaction_manager.d.ts +4 -3
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +2 -2
- package/script/client/2_translations_manager.d.ts +3 -2
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +1 -1
- package/script/client/2_update_manager.d.ts +1 -1
- package/script/client/2_update_manager.js +1 -1
- package/script/client/3_message_manager.d.ts +10 -26
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +61 -238
- package/script/client/3_video_chat_manager.d.ts +5 -4
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +5 -2
- package/script/client/4_callback_query_manager.d.ts +4 -3
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +2 -2
- package/script/client/4_chat_list_manager.d.ts +5 -4
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +3 -2
- package/script/client/4_chat_manager.d.ts +61 -0
- package/script/client/4_chat_manager.d.ts.map +1 -0
- package/script/client/4_chat_manager.js +297 -0
- package/script/client/4_inline_query_manager.d.ts +4 -3
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +2 -2
- package/script/client/4_poll_manager.d.ts +4 -3
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +2 -2
- package/script/client/4_story_manager.d.ts +4 -3
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +2 -2
- package/script/client/5_client.d.ts +44 -7
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +182 -73
- package/script/connection/0_connection.d.ts +1 -1
- package/script/connection/0_connection.js +1 -1
- package/script/connection/1_connection_tcp.node.d.ts +1 -1
- package/script/connection/1_connection_tcp.node.js +1 -1
- package/script/connection/1_connection_web_socket.js +1 -1
- package/script/mod.d.ts +1 -1
- package/script/mod.js +1 -1
- package/script/storage/0_storage.d.ts +1 -1
- package/script/storage/0_storage.js +1 -1
- package/script/storage/1_utilities.d.ts +1 -1
- package/script/storage/1_utilities.js +1 -1
- package/script/storage/2_storage_indexed_db.d.ts +1 -1
- package/script/storage/2_storage_indexed_db.js +1 -1
- package/script/storage/2_storage_local_storage.node.d.ts +1 -1
- package/script/storage/2_storage_local_storage.node.js +1 -1
- package/script/storage/2_storage_memory.d.ts +1 -1
- package/script/storage/2_storage_memory.js +1 -1
- package/script/storage/2_storage_session_storage.d.ts +1 -1
- package/script/storage/2_storage_session_storage.js +1 -1
- package/script/tl/0_api.d.ts +218 -79
- package/script/tl/0_api.d.ts.map +1 -1
- package/script/tl/0_api.js +362 -159
- package/script/tl/0_tl_raw_reader.d.ts +1 -1
- package/script/tl/0_tl_raw_reader.js +1 -1
- package/script/tl/0_tl_raw_writer.d.ts +1 -1
- package/script/tl/0_tl_raw_writer.js +1 -1
- package/script/tl/1_utilities.d.ts +1 -1
- package/script/tl/1_utilities.js +1 -1
- package/script/tl/2_deserialize.d.ts +1 -1
- package/script/tl/2_deserialize.js +1 -1
- package/script/tl/2_serialize.d.ts +1 -1
- package/script/tl/2_serialize.js +1 -1
- package/script/tl/3_tl_reader.d.ts +1 -1
- package/script/tl/3_tl_reader.js +1 -1
- package/script/tl/3_utilities.d.ts +1 -1
- package/script/tl/3_utilities.js +1 -1
- package/script/tl/4_rpc_result.d.ts +1 -1
- package/script/tl/4_rpc_result.js +1 -1
- package/script/tl/4_tl_writer.d.ts +1 -1
- package/script/tl/4_tl_writer.js +1 -1
- package/script/tl/5_message.d.ts +1 -1
- package/script/tl/5_message.js +1 -1
- package/script/transport/0_obfuscation.js +1 -1
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.js +1 -1
- package/script/transport/1_transport_abridged.d.ts +1 -1
- package/script/transport/1_transport_abridged.js +1 -1
- package/script/transport/1_transport_intermediate.d.ts +1 -1
- package/script/transport/1_transport_intermediate.js +1 -1
- package/script/transport/2_transport_provider.d.ts +1 -1
- package/script/transport/2_transport_provider.js +1 -1
- package/script/transport/3_transport_provider_tcp.d.ts +1 -1
- package/script/transport/3_transport_provider_tcp.js +1 -1
- package/script/transport/3_transport_provider_web_socket.d.ts +1 -1
- package/script/transport/3_transport_provider_web_socket.js +1 -1
- package/script/types/0_authorization_state.d.ts +1 -1
- package/script/types/0_authorization_state.js +1 -1
- package/script/types/0_birthday.d.ts +1 -1
- package/script/types/0_birthday.js +1 -1
- package/script/types/0_bot_command.d.ts +1 -1
- package/script/types/0_bot_command.js +1 -1
- package/script/types/0_callback_query_answer.d.ts +1 -1
- package/script/types/0_callback_query_answer.js +1 -1
- package/script/types/0_callback_query_question.d.ts +1 -1
- package/script/types/0_callback_query_question.js +1 -1
- package/script/types/0_chat_action.d.ts +1 -1
- package/script/types/0_chat_action.js +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +1 -1
- package/script/types/0_chat_administrator_rights.js +1 -1
- package/script/types/0_chat_member_rights.d.ts +1 -1
- package/script/types/0_chat_member_rights.js +1 -1
- package/script/types/0_chat_photo.d.ts +1 -1
- package/script/types/0_chat_photo.js +1 -1
- package/script/types/0_connection_state.d.ts +1 -1
- package/script/types/0_connection_state.js +1 -1
- package/script/types/0_contact.d.ts +1 -1
- package/script/types/0_contact.js +1 -1
- package/script/types/0_dice.d.ts +1 -1
- package/script/types/0_dice.js +1 -1
- package/script/types/0_failed_invitation.d.ts +1 -1
- package/script/types/0_failed_invitation.js +1 -1
- package/script/types/0_file_source.d.ts +1 -1
- package/script/types/0_file_source.js +1 -1
- package/script/types/0_giveaway_parameters.d.ts +1 -1
- package/script/types/0_giveaway_parameters.js +1 -1
- package/script/types/0_id.d.ts +1 -1
- package/script/types/0_id.js +1 -1
- package/script/types/0_invoice.d.ts +1 -1
- package/script/types/0_invoice.js +1 -1
- package/script/types/0_keyboard_button_poll_type.d.ts +1 -1
- package/script/types/0_keyboard_button_poll_type.js +1 -1
- package/script/types/0_link_preview.d.ts +1 -1
- package/script/types/0_link_preview.js +1 -1
- package/script/types/0_live_stream_channel.d.ts +1 -1
- package/script/types/0_live_stream_channel.js +1 -1
- package/script/types/0_location.d.ts +1 -1
- package/script/types/0_location.js +1 -1
- package/script/types/0_login_url.d.ts +1 -1
- package/script/types/0_login_url.js +1 -1
- package/script/types/0_mask_position.d.ts +1 -1
- package/script/types/0_mask_position.js +1 -1
- package/script/types/0_message_entity.d.ts +1 -1
- package/script/types/0_message_entity.js +1 -1
- package/script/types/0_message_reference.d.ts +1 -1
- package/script/types/0_message_reference.js +1 -1
- package/script/types/0_message_search_filter.d.ts +1 -1
- package/script/types/0_message_search_filter.js +1 -1
- package/script/types/0_mini_app_info.d.ts +1 -1
- package/script/types/0_mini_app_info.js +1 -1
- package/script/types/0_network_statistics_entry.d.ts +1 -1
- package/script/types/0_network_statistics_entry.js +1 -1
- package/script/types/0_opening_hours.d.ts +1 -1
- package/script/types/0_opening_hours.js +1 -1
- package/script/types/0_parse_mode.d.ts +1 -1
- package/script/types/0_parse_mode.js +1 -1
- package/script/types/0_price_tag.d.ts +1 -1
- package/script/types/0_price_tag.js +1 -1
- package/script/types/0_reaction.d.ts +1 -1
- package/script/types/0_reaction.js +1 -1
- package/script/types/0_refunded_payment.d.ts +1 -1
- package/script/types/0_refunded_payment.js +1 -1
- package/script/types/0_restriction_reason.d.ts +1 -1
- package/script/types/0_restriction_reason.js +1 -1
- package/script/types/0_self_destruct_option.d.ts +1 -1
- package/script/types/0_self_destruct_option.js +1 -1
- package/script/types/0_shipping_address.d.ts +1 -1
- package/script/types/0_shipping_address.js +1 -1
- package/script/types/0_story_reference.d.ts +1 -1
- package/script/types/0_story_reference.js +1 -1
- package/script/types/0_switch_inline_query_chosen_chats.d.ts +1 -1
- package/script/types/0_switch_inline_query_chosen_chats.js +1 -1
- package/script/types/0_thumbnail.d.ts +1 -1
- package/script/types/0_thumbnail.js +1 -1
- package/script/types/0_video_chat.d.ts +1 -1
- package/script/types/0_video_chat.js +1 -1
- package/script/types/0_voice.d.ts +1 -1
- package/script/types/0_voice.js +1 -1
- package/script/types/1_animation.d.ts +1 -1
- package/script/types/1_animation.js +1 -1
- package/script/types/1_audio.d.ts +1 -1
- package/script/types/1_audio.js +1 -1
- package/script/types/1_bot_command_scope.d.ts +1 -1
- package/script/types/1_bot_command_scope.js +1 -1
- package/script/types/1_chat_p.d.ts +1 -1
- package/script/types/1_chat_p.js +1 -1
- package/script/types/1_document.d.ts +1 -1
- package/script/types/1_document.js +1 -1
- package/script/types/1_giveaway.d.ts +1 -1
- package/script/types/1_giveaway.js +1 -1
- package/script/types/1_inline_query_result_button.d.ts +1 -1
- package/script/types/1_inline_query_result_button.js +1 -1
- package/script/types/1_input_media.d.ts +1 -1
- package/script/types/1_input_media.js +1 -1
- package/script/types/1_input_story_content.d.ts +1 -1
- package/script/types/1_input_story_content.js +1 -1
- package/script/types/1_keyboard_button.d.ts +1 -1
- package/script/types/1_keyboard_button.js +1 -1
- package/script/types/1_message_content.d.ts +2 -2
- package/script/types/1_message_content.d.ts.map +1 -1
- package/script/types/1_message_content.js +1 -1
- package/script/types/1_message_reaction.d.ts +1 -1
- package/script/types/1_message_reaction.js +1 -1
- package/script/types/1_network_statistics.d.ts +1 -1
- package/script/types/1_network_statistics.js +1 -1
- package/script/types/1_order_info.d.ts +1 -1
- package/script/types/1_order_info.js +1 -1
- package/script/types/1_photo.d.ts +1 -1
- package/script/types/1_photo.js +1 -1
- package/script/types/1_poll_option.d.ts +1 -1
- package/script/types/1_poll_option.js +1 -1
- package/script/types/1_reaction_count.d.ts +1 -1
- package/script/types/1_reaction_count.js +1 -1
- package/script/types/1_reply_quote.d.ts +1 -1
- package/script/types/1_reply_quote.js +1 -1
- package/script/types/1_sticker.d.ts +2 -1
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +8 -3
- package/script/types/1_story_privacy.d.ts +1 -1
- package/script/types/1_story_privacy.js +1 -1
- package/script/types/1_story_reaction.d.ts +1 -1
- package/script/types/1_story_reaction.js +1 -1
- package/script/types/1_user.d.ts +1 -1
- package/script/types/1_user.js +1 -1
- package/script/types/1_venue.d.ts +1 -1
- package/script/types/1_venue.js +1 -1
- package/script/types/1_video.d.ts +1 -1
- package/script/types/1_video.js +1 -1
- package/script/types/1_video_note.d.ts +1 -1
- package/script/types/1_video_note.js +1 -1
- package/script/types/2_business_connection.d.ts +1 -1
- package/script/types/2_business_connection.js +1 -1
- package/script/types/2_chat.d.ts +1 -1
- package/script/types/2_chat.js +1 -1
- package/script/types/2_chat_member.d.ts +1 -1
- package/script/types/2_chat_member.js +1 -1
- package/script/types/2_chosen_inline_result.d.ts +1 -1
- package/script/types/2_chosen_inline_result.js +1 -1
- package/script/types/2_forward_header.d.ts +1 -1
- package/script/types/2_forward_header.js +1 -1
- package/script/types/2_game.d.ts +1 -1
- package/script/types/2_game.js +1 -1
- package/script/types/2_gift_upgraded_component.d.ts +95 -0
- package/script/types/2_gift_upgraded_component.d.ts.map +1 -0
- package/script/types/2_gift_upgraded_component.js +91 -0
- package/script/types/2_inactive_chat.d.ts +1 -1
- package/script/types/2_inactive_chat.js +1 -1
- package/script/types/2_inline_keyboard_button.d.ts +1 -1
- package/script/types/2_inline_keyboard_button.js +1 -1
- package/script/types/2_inline_query.d.ts +1 -1
- package/script/types/2_inline_query.js +1 -1
- package/script/types/2_invite_link.d.ts +1 -1
- package/script/types/2_invite_link.js +1 -1
- package/script/types/2_message_interactions.d.ts +1 -1
- package/script/types/2_message_interactions.js +1 -1
- package/script/types/2_message_reaction_count.d.ts +1 -1
- package/script/types/2_message_reaction_count.js +1 -1
- package/script/types/2_message_reactions.d.ts +1 -1
- package/script/types/2_message_reactions.js +1 -1
- package/script/types/2_poll.d.ts +1 -1
- package/script/types/2_poll.js +1 -1
- package/script/types/2_pre_checkout_query.d.ts +1 -1
- package/script/types/2_pre_checkout_query.js +1 -1
- package/script/types/2_reply_to.d.ts +1 -1
- package/script/types/2_reply_to.js +1 -1
- package/script/types/2_story_content.d.ts +1 -1
- package/script/types/2_story_content.js +1 -1
- package/script/types/2_story_interactions.d.ts +1 -1
- package/script/types/2_story_interactions.js +1 -1
- package/script/types/2_story_interactive_area.d.ts +1 -1
- package/script/types/2_story_interactive_area.js +1 -1
- package/script/types/2_successful_payment.d.ts +1 -1
- package/script/types/2_successful_payment.js +1 -1
- package/script/types/3_chat_member_updated.d.ts +1 -1
- package/script/types/3_chat_member_updated.js +1 -1
- package/script/types/3_gift.d.ts +82 -0
- package/script/types/3_gift.d.ts.map +1 -0
- package/script/types/3_gift.js +93 -0
- package/script/types/3_join_request.d.ts +1 -1
- package/script/types/3_join_request.js +1 -1
- package/script/types/3_reply_markup.d.ts +1 -1
- package/script/types/3_reply_markup.js +1 -1
- package/script/types/3_story.d.ts +1 -1
- package/script/types/3_story.js +1 -1
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_inline_query_result.js +1 -1
- package/script/types/4_message.d.ts +2 -1
- package/script/types/4_message.d.ts.map +1 -1
- package/script/types/4_message.js +10 -3
- package/script/types/4_user_gift.d.ts +44 -0
- package/script/types/4_user_gift.d.ts.map +1 -0
- package/script/types/4_user_gift.js +46 -0
- package/script/types/5_callback_query.d.ts +1 -1
- package/script/types/5_callback_query.js +1 -1
- package/script/types/5_chat_list_item.d.ts +1 -1
- package/script/types/5_chat_list_item.js +1 -1
- package/script/types/5_inline_query_answer.d.ts +1 -1
- package/script/types/5_inline_query_answer.js +1 -1
- package/script/types/5_user_gifts.d.ts +32 -0
- package/script/types/5_user_gifts.d.ts.map +1 -0
- package/script/types/5_user_gifts.js +32 -0
- package/script/types/6_update.d.ts +1 -1
- package/script/types/6_update.js +1 -1
- package/script/types/_file_id.d.ts +1 -1
- package/script/types/_file_id.js +1 -1
- package/script/types/_getters.d.ts +1 -1
- package/script/types/_getters.js +1 -1
- package/script/utilities/0_bigint.js +1 -1
- package/script/utilities/0_buffer.d.ts +1 -1
- package/script/utilities/0_buffer.js +1 -1
- package/script/utilities/0_cache_map.d.ts +1 -1
- package/script/utilities/0_cache_map.js +1 -1
- package/script/utilities/0_color.d.ts +1 -1
- package/script/utilities/0_color.js +1 -1
- package/script/utilities/0_env.js +1 -1
- package/script/utilities/0_gunzip.d.ts +1 -1
- package/script/utilities/0_gunzip.js +1 -1
- package/script/utilities/0_hash.js +1 -1
- package/script/utilities/0_misc.d.ts +1 -1
- package/script/utilities/0_misc.js +1 -1
- package/script/utilities/0_mutex.d.ts +1 -1
- package/script/utilities/0_mutex.js +1 -1
- package/script/utilities/0_object.d.ts +1 -1
- package/script/utilities/0_object.js +1 -1
- package/script/utilities/0_part_stream.d.ts +1 -1
- package/script/utilities/0_part_stream.js +1 -1
- package/script/utilities/0_rle.d.ts +1 -1
- package/script/utilities/0_rle.js +1 -1
- package/script/utilities/0_types.d.ts +1 -1
- package/script/utilities/0_types.js +1 -1
- package/script/utilities/0_units.d.ts +1 -1
- package/script/utilities/0_units.js +1 -1
- package/script/utilities/1_auth.js +1 -1
- package/script/utilities/1_base64.d.ts +1 -1
- package/script/utilities/1_base64.js +1 -1
- package/script/utilities/1_crypto.d.ts +1 -1
- package/script/utilities/1_crypto.js +1 -1
- package/script/utilities/1_logger.d.ts +1 -1
- package/script/utilities/1_logger.js +1 -1
- package/script/utilities/1_math.d.ts +1 -1
- package/script/utilities/1_math.js +1 -1
- package/script/utilities/2_queue.d.ts +1 -1
- package/script/utilities/2_queue.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
-
* Copyright (C) 2023-
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
5
|
*
|
|
6
6
|
* This file is part of MTKruto.
|
|
7
7
|
*
|
|
@@ -29,7 +29,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
29
29
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
30
30
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
31
31
|
};
|
|
32
|
-
var _Client_instances, _a, _Client_client, _Client_guaranteeUpdateDelivery,
|
|
32
|
+
var _Client_instances, _a, _Client_client, _Client_guaranteeUpdateDelivery, _Client_accountManager, _Client_botInfoManager, _Client_businessConnectionManager, _Client_fileManager, _Client_giftManager, _Client_networkStatisticsManager, _Client_paymentManager, _Client_reactionManager, _Client_translationsManager, _Client_updateManager, _Client_messageManager, _Client_videoChatManager, _Client_callbackQueryManager, _Client_chatListManager, _Client_chatManager, _Client_inlineQueryManager, _Client_pollManager, _Client_storyManager, _Client_managers, _Client_storage_, _Client_messageStorage_, _Client_parseMode, _Client_apiId, _Client_apiHash, _Client_publicKeys, _Client_outgoingMessages, _Client_persistCache, _Client_disableUpdates, _Client_authString, _Client_cdn, _Client_L, _Client_LsignIn, _Client_LpingLoop, _Client_LhandleMigrationError, _Client_L$initConncetion, _Client_Lmin, _Client_reconnecting, _Client_reconnect, _Client_getApiId, _Client_getCdnConnectionPool, _Client_getCdnConnection, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_stateChangeHandler, _Client_storageInited, _Client_initStorage, _Client_connectMutex, _Client_lastConnect, _Client_connectionInited, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_getSelfId, _Client_connectionInsuranceLoopStarted, _Client_connectionInsuranceLoopAbortController, _Client_startConnectionInsuranceLoop, _Client_connectionInsuranceLoop, _Client_pingLoopAbortController, _Client_pingInterval, _Client_lastUpdates, _Client_startPingLoop, _Client_pingLoop, _Client_invoke, _Client_handleInvokeError, _Client_authStringImported, _Client_getUserAccessHash, _Client_getChannelAccessHash, _Client_getInputPeerChatId, _Client_getInputPeerInner, _Client_getMinInputPeer, _Client_handleCtxUpdate, _Client_queueHandleCtxUpdate, _Client_handleUpdate, _Client_lastGetMe, _Client_getMe;
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.Client = exports.handleMigrationError = exports.restartAuth = exports.Composer = void 0;
|
|
35
35
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
@@ -52,6 +52,7 @@ const _2_account_manager_js_1 = require("./2_account_manager.js");
|
|
|
52
52
|
const _2_bot_info_manager_js_1 = require("./2_bot_info_manager.js");
|
|
53
53
|
const _2_business_connection_manager_js_1 = require("./2_business_connection_manager.js");
|
|
54
54
|
const _2_file_manager_js_1 = require("./2_file_manager.js");
|
|
55
|
+
const _2_gift_manager_js_1 = require("./2_gift_manager.js");
|
|
55
56
|
const _2_network_statistics_manager_js_1 = require("./2_network_statistics_manager.js");
|
|
56
57
|
const _2_payment_manager_js_1 = require("./2_payment_manager.js");
|
|
57
58
|
const _2_reaction_manager_js_1 = require("./2_reaction_manager.js");
|
|
@@ -61,6 +62,7 @@ const _3_message_manager_js_1 = require("./3_message_manager.js");
|
|
|
61
62
|
const _3_video_chat_manager_js_1 = require("./3_video_chat_manager.js");
|
|
62
63
|
const _4_callback_query_manager_js_1 = require("./4_callback_query_manager.js");
|
|
63
64
|
const _4_chat_list_manager_js_1 = require("./4_chat_list_manager.js");
|
|
65
|
+
const _4_chat_manager_js_1 = require("./4_chat_manager.js");
|
|
64
66
|
const _4_inline_query_manager_js_1 = require("./4_inline_query_manager.js");
|
|
65
67
|
const _4_poll_manager_js_1 = require("./4_poll_manager.js");
|
|
66
68
|
const _4_story_manager_js_1 = require("./4_story_manager.js");
|
|
@@ -82,21 +84,25 @@ class Client extends Composer {
|
|
|
82
84
|
// deno-lint-ignore no-explicit-any
|
|
83
85
|
get managers() {
|
|
84
86
|
return __classPrivateFieldGet(this, _Client_managers, "f") ?? (__classPrivateFieldSet(this, _Client_managers, __classPrivateFieldGet(this, _Client_managers, "f") ?? {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
// 2_
|
|
88
|
+
accountManager: __classPrivateFieldGet(this, _Client_accountManager, "f"),
|
|
87
89
|
botInfoManager: __classPrivateFieldGet(this, _Client_botInfoManager, "f"),
|
|
90
|
+
businessConnectionManager: __classPrivateFieldGet(this, _Client_businessConnectionManager, "f"),
|
|
88
91
|
fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"),
|
|
92
|
+
giftManager: __classPrivateFieldGet(this, _Client_giftManager, "f"),
|
|
93
|
+
networkStatisticsManager: __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f"),
|
|
94
|
+
paymentManager: __classPrivateFieldGet(this, _Client_paymentManager, "f"),
|
|
89
95
|
reactionManager: __classPrivateFieldGet(this, _Client_reactionManager, "f"),
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
translationsManager: __classPrivateFieldGet(this, _Client_translationsManager, "f"),
|
|
97
|
+
updateManager: __classPrivateFieldGet(this, _Client_updateManager, "f"),
|
|
98
|
+
// 3_
|
|
92
99
|
messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f"),
|
|
93
|
-
|
|
100
|
+
videoChatManager: __classPrivateFieldGet(this, _Client_videoChatManager, "f"),
|
|
101
|
+
// 4_
|
|
94
102
|
callbackQueryManager: __classPrivateFieldGet(this, _Client_callbackQueryManager, "f"),
|
|
95
|
-
inlineQueryManager: __classPrivateFieldGet(this, _Client_inlineQueryManager, "f"),
|
|
96
103
|
chatListManager: __classPrivateFieldGet(this, _Client_chatListManager, "f"),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
translationsManager: __classPrivateFieldGet(this, _Client_translationsManager, "f"),
|
|
104
|
+
inlineQueryManager: __classPrivateFieldGet(this, _Client_inlineQueryManager, "f"),
|
|
105
|
+
storyManager: __classPrivateFieldGet(this, _Client_storyManager, "f"),
|
|
100
106
|
}, "f"));
|
|
101
107
|
}
|
|
102
108
|
/**
|
|
@@ -107,22 +113,27 @@ class Client extends Composer {
|
|
|
107
113
|
_Client_instances.add(this);
|
|
108
114
|
_Client_client.set(this, void 0);
|
|
109
115
|
_Client_guaranteeUpdateDelivery.set(this, void 0);
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
// 2_
|
|
117
|
+
_Client_accountManager.set(this, void 0);
|
|
112
118
|
_Client_botInfoManager.set(this, void 0);
|
|
119
|
+
_Client_businessConnectionManager.set(this, void 0);
|
|
113
120
|
_Client_fileManager.set(this, void 0);
|
|
121
|
+
_Client_giftManager.set(this, void 0);
|
|
122
|
+
_Client_networkStatisticsManager.set(this, void 0);
|
|
123
|
+
_Client_paymentManager.set(this, void 0);
|
|
114
124
|
_Client_reactionManager.set(this, void 0);
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
_Client_translationsManager.set(this, void 0);
|
|
126
|
+
_Client_updateManager.set(this, void 0);
|
|
127
|
+
// 3_
|
|
117
128
|
_Client_messageManager.set(this, void 0);
|
|
118
|
-
|
|
119
|
-
|
|
129
|
+
_Client_videoChatManager.set(this, void 0);
|
|
130
|
+
// 4_
|
|
120
131
|
_Client_callbackQueryManager.set(this, void 0);
|
|
121
|
-
_Client_inlineQueryManager.set(this, void 0);
|
|
122
132
|
_Client_chatListManager.set(this, void 0);
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
133
|
+
_Client_chatManager.set(this, void 0);
|
|
134
|
+
_Client_inlineQueryManager.set(this, void 0);
|
|
135
|
+
_Client_pollManager.set(this, void 0);
|
|
136
|
+
_Client_storyManager.set(this, void 0);
|
|
126
137
|
// deno-lint-ignore no-explicit-any
|
|
127
138
|
_Client_managers.set(this, void 0);
|
|
128
139
|
_Client_storage_.set(this, void 0);
|
|
@@ -401,6 +412,14 @@ class Client extends Composer {
|
|
|
401
412
|
const inlineMessageId = mustGetInlineMsgId();
|
|
402
413
|
return this.editInlineMessageText(inlineMessageId, text, params);
|
|
403
414
|
},
|
|
415
|
+
editInlineMessageMedia: (media, params) => {
|
|
416
|
+
const inlineMessageId = mustGetInlineMsgId();
|
|
417
|
+
return this.editInlineMessageMedia(inlineMessageId, media, params);
|
|
418
|
+
},
|
|
419
|
+
editInlineMessageCaption: (params) => {
|
|
420
|
+
const inlineMessageId = mustGetInlineMsgId();
|
|
421
|
+
return this.editInlineMessageCaption(inlineMessageId, params);
|
|
422
|
+
},
|
|
404
423
|
editInlineMessageLiveLocation: (latitude, longitude, params) => {
|
|
405
424
|
const inlineMessageId = mustGetInlineMsgId();
|
|
406
425
|
return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
@@ -413,6 +432,14 @@ class Client extends Composer {
|
|
|
413
432
|
const { chatId } = mustGetMsg();
|
|
414
433
|
return this.editMessageText(chatId, messageId, text, params);
|
|
415
434
|
},
|
|
435
|
+
editMessageCaption: (messageId, params) => {
|
|
436
|
+
const { chatId } = mustGetMsg();
|
|
437
|
+
return this.editMessageCaption(chatId, messageId, params);
|
|
438
|
+
},
|
|
439
|
+
editMessageMedia: (messageId, media, params) => {
|
|
440
|
+
const { chatId } = mustGetMsg();
|
|
441
|
+
return this.editMessageMedia(chatId, messageId, media, params);
|
|
442
|
+
},
|
|
416
443
|
editMessageLiveLocation: (messageId, latitude, longitude, params) => {
|
|
417
444
|
const { chatId } = mustGetMsg();
|
|
418
445
|
return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
@@ -715,22 +742,27 @@ class Client extends Composer {
|
|
|
715
742
|
langPack: this.platform,
|
|
716
743
|
langCode: this.language,
|
|
717
744
|
};
|
|
718
|
-
|
|
719
|
-
__classPrivateFieldSet(this,
|
|
745
|
+
// 2_
|
|
746
|
+
__classPrivateFieldSet(this, _Client_accountManager, new _2_account_manager_js_1.AccountManager(c), "f");
|
|
720
747
|
__classPrivateFieldSet(this, _Client_botInfoManager, new _2_bot_info_manager_js_1.BotInfoManager(c), "f");
|
|
721
|
-
__classPrivateFieldSet(this, _Client_fileManager, new _2_file_manager_js_1.FileManager(c), "f");
|
|
722
|
-
__classPrivateFieldSet(this, _Client_reactionManager, new _2_reaction_manager_js_1.ReactionManager(c), "f");
|
|
723
748
|
__classPrivateFieldSet(this, _Client_businessConnectionManager, new _2_business_connection_manager_js_1.BusinessConnectionManager(c), "f");
|
|
724
|
-
__classPrivateFieldSet(this,
|
|
725
|
-
__classPrivateFieldSet(this,
|
|
726
|
-
__classPrivateFieldSet(this,
|
|
727
|
-
__classPrivateFieldSet(this, _Client_pollManager, new _4_poll_manager_js_1.PollManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
728
|
-
__classPrivateFieldSet(this, _Client_storyManager, new _4_story_manager_js_1.StoryManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
729
|
-
__classPrivateFieldSet(this, _Client_inlineQueryManager, new _4_inline_query_manager_js_1.InlineQueryManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
730
|
-
__classPrivateFieldSet(this, _Client_chatListManager, new _4_chat_list_manager_js_1.ChatListManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
731
|
-
__classPrivateFieldSet(this, _Client_accountManager, new _2_account_manager_js_1.AccountManager(c), "f");
|
|
749
|
+
const fileManager = __classPrivateFieldSet(this, _Client_fileManager, new _2_file_manager_js_1.FileManager(c), "f");
|
|
750
|
+
__classPrivateFieldSet(this, _Client_giftManager, new _2_gift_manager_js_1.GiftManager(c), "f");
|
|
751
|
+
__classPrivateFieldSet(this, _Client_networkStatisticsManager, new _2_network_statistics_manager_js_1.NetworkStatisticsManager(c), "f");
|
|
732
752
|
__classPrivateFieldSet(this, _Client_paymentManager, new _2_payment_manager_js_1.PaymentManager(c), "f");
|
|
753
|
+
__classPrivateFieldSet(this, _Client_reactionManager, new _2_reaction_manager_js_1.ReactionManager(c), "f");
|
|
733
754
|
__classPrivateFieldSet(this, _Client_translationsManager, new _2_translations_manager_js_1.TranslationsManager(c), "f");
|
|
755
|
+
__classPrivateFieldSet(this, _Client_updateManager, new _2_update_manager_js_1.UpdateManager(c), "f");
|
|
756
|
+
// 3_
|
|
757
|
+
const messageManager = __classPrivateFieldSet(this, _Client_messageManager, new _3_message_manager_js_1.MessageManager({ ...c, fileManager }), "f");
|
|
758
|
+
__classPrivateFieldSet(this, _Client_videoChatManager, new _3_video_chat_manager_js_1.VideoChatManager({ ...c, fileManager }), "f");
|
|
759
|
+
// 4_
|
|
760
|
+
__classPrivateFieldSet(this, _Client_callbackQueryManager, new _4_callback_query_manager_js_1.CallbackQueryManager({ ...c, messageManager }), "f");
|
|
761
|
+
__classPrivateFieldSet(this, _Client_chatListManager, new _4_chat_list_manager_js_1.ChatListManager({ ...c, fileManager, messageManager }), "f");
|
|
762
|
+
__classPrivateFieldSet(this, _Client_chatManager, new _4_chat_manager_js_1.ChatManager({ ...c, fileManager, messageManager }), "f");
|
|
763
|
+
__classPrivateFieldSet(this, _Client_inlineQueryManager, new _4_inline_query_manager_js_1.InlineQueryManager({ ...c, messageManager }), "f");
|
|
764
|
+
__classPrivateFieldSet(this, _Client_pollManager, new _4_poll_manager_js_1.PollManager({ ...c, messageManager }), "f");
|
|
765
|
+
__classPrivateFieldSet(this, _Client_storyManager, new _4_story_manager_js_1.StoryManager({ ...c, fileManager, messageManager }), "f");
|
|
734
766
|
__classPrivateFieldGet(this, _Client_updateManager, "f").setUpdateHandler(__classPrivateFieldGet(this, _Client_instances, "m", _Client_handleUpdate).bind(this));
|
|
735
767
|
const transportProvider = __classPrivateFieldGet(this, _Client_client, "f").transportProvider;
|
|
736
768
|
__classPrivateFieldGet(this, _Client_client, "f").transportProvider = (params) => {
|
|
@@ -850,7 +882,7 @@ class Client extends Composer {
|
|
|
850
882
|
}
|
|
851
883
|
await __classPrivateFieldGet(this, _Client_client, "f").reconnect();
|
|
852
884
|
}
|
|
853
|
-
async [(_Client_client = new WeakMap(), _Client_guaranteeUpdateDelivery = new WeakMap(),
|
|
885
|
+
async [(_Client_client = new WeakMap(), _Client_guaranteeUpdateDelivery = new WeakMap(), _Client_accountManager = new WeakMap(), _Client_botInfoManager = new WeakMap(), _Client_businessConnectionManager = new WeakMap(), _Client_fileManager = new WeakMap(), _Client_giftManager = new WeakMap(), _Client_networkStatisticsManager = new WeakMap(), _Client_paymentManager = new WeakMap(), _Client_reactionManager = new WeakMap(), _Client_translationsManager = new WeakMap(), _Client_updateManager = new WeakMap(), _Client_messageManager = new WeakMap(), _Client_videoChatManager = new WeakMap(), _Client_callbackQueryManager = new WeakMap(), _Client_chatListManager = new WeakMap(), _Client_chatManager = new WeakMap(), _Client_inlineQueryManager = new WeakMap(), _Client_pollManager = new WeakMap(), _Client_storyManager = new WeakMap(), _Client_managers = new WeakMap(), _Client_storage_ = new WeakMap(), _Client_messageStorage_ = new WeakMap(), _Client_parseMode = new WeakMap(), _Client_apiId = new WeakMap(), _Client_apiHash = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_outgoingMessages = new WeakMap(), _Client_persistCache = new WeakMap(), _Client_disableUpdates = new WeakMap(), _Client_authString = new WeakMap(), _Client_cdn = new WeakMap(), _Client_L = new WeakMap(), _Client_LsignIn = new WeakMap(), _Client_LpingLoop = new WeakMap(), _Client_LhandleMigrationError = new WeakMap(), _Client_L$initConncetion = new WeakMap(), _Client_Lmin = new WeakMap(), _Client_reconnecting = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_stateChangeHandler = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_lastConnect = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_connectionInsuranceLoopStarted = new WeakMap(), _Client_connectionInsuranceLoopAbortController = new WeakMap(), _Client_pingLoopAbortController = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_authStringImported = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_instances = new WeakSet(), _Client_reconnect = async function _Client_reconnect() {
|
|
854
886
|
if (this.connected) {
|
|
855
887
|
return;
|
|
856
888
|
}
|
|
@@ -1780,6 +1812,18 @@ class Client extends Composer {
|
|
|
1780
1812
|
async editMessageText(chatId, messageId, text, params) {
|
|
1781
1813
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
|
|
1782
1814
|
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Edit a message's caption.
|
|
1817
|
+
*
|
|
1818
|
+
* @method ms
|
|
1819
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
1820
|
+
* @param messageId The message's identifier.
|
|
1821
|
+
* @param text The new caption of the message.
|
|
1822
|
+
* @returns The edited message.
|
|
1823
|
+
*/
|
|
1824
|
+
async editMessageCaption(chatId, messageId, params) {
|
|
1825
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageCaption(chatId, messageId, params);
|
|
1826
|
+
}
|
|
1783
1827
|
/**
|
|
1784
1828
|
* Edit a message's media.
|
|
1785
1829
|
*
|
|
@@ -1812,6 +1856,15 @@ class Client extends Composer {
|
|
|
1812
1856
|
async editInlineMessageText(inlineMessageId, text, params) {
|
|
1813
1857
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageText(inlineMessageId, text, params);
|
|
1814
1858
|
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Edit an inline message's caption. Bot-only.
|
|
1861
|
+
*
|
|
1862
|
+
* @method ms
|
|
1863
|
+
* @param inlineMessageId The inline message's identifier.
|
|
1864
|
+
*/
|
|
1865
|
+
async editInlineMessageCaption(inlineMessageId, params) {
|
|
1866
|
+
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageCaption(inlineMessageId, params);
|
|
1867
|
+
}
|
|
1815
1868
|
/**
|
|
1816
1869
|
* Edit a message's reply markup.
|
|
1817
1870
|
*
|
|
@@ -2150,7 +2203,7 @@ class Client extends Composer {
|
|
|
2150
2203
|
* @param availableReactions The new available reactions.
|
|
2151
2204
|
*/
|
|
2152
2205
|
async setAvailableReactions(chatId, availableReactions) {
|
|
2153
|
-
await __classPrivateFieldGet(this,
|
|
2206
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setAvailableReactions(chatId, availableReactions);
|
|
2154
2207
|
}
|
|
2155
2208
|
/**
|
|
2156
2209
|
* Set a chat's photo.
|
|
@@ -2160,7 +2213,7 @@ class Client extends Composer {
|
|
|
2160
2213
|
* @param photo A photo to set as the chat's photo.
|
|
2161
2214
|
*/
|
|
2162
2215
|
async setChatPhoto(chatId, photo, params) {
|
|
2163
|
-
await __classPrivateFieldGet(this,
|
|
2216
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setChatPhoto(chatId, photo, params);
|
|
2164
2217
|
}
|
|
2165
2218
|
/**
|
|
2166
2219
|
* Delete a chat's photo.
|
|
@@ -2169,7 +2222,7 @@ class Client extends Composer {
|
|
|
2169
2222
|
* @param chatId The identifier of the chat.
|
|
2170
2223
|
*/
|
|
2171
2224
|
async deleteChatPhoto(chatId) {
|
|
2172
|
-
await __classPrivateFieldGet(this,
|
|
2225
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").deleteChatPhoto(chatId);
|
|
2173
2226
|
}
|
|
2174
2227
|
/**
|
|
2175
2228
|
* Ban a member from a chat.
|
|
@@ -2179,7 +2232,7 @@ class Client extends Composer {
|
|
|
2179
2232
|
* @param memberId The identifier of the member.
|
|
2180
2233
|
*/
|
|
2181
2234
|
async banChatMember(chatId, memberId, params) {
|
|
2182
|
-
await __classPrivateFieldGet(this,
|
|
2235
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").banChatMember(chatId, memberId, params);
|
|
2183
2236
|
}
|
|
2184
2237
|
/**
|
|
2185
2238
|
* Unban a member from a chat.
|
|
@@ -2189,7 +2242,7 @@ class Client extends Composer {
|
|
|
2189
2242
|
* @param memberId The identifier of the member.
|
|
2190
2243
|
*/
|
|
2191
2244
|
async unbanChatMember(chatId, memberId) {
|
|
2192
|
-
await __classPrivateFieldGet(this,
|
|
2245
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").unbanChatMember(chatId, memberId);
|
|
2193
2246
|
}
|
|
2194
2247
|
/**
|
|
2195
2248
|
* Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
|
|
@@ -2199,8 +2252,8 @@ class Client extends Composer {
|
|
|
2199
2252
|
* @param memberId The identifier of the member.
|
|
2200
2253
|
*/
|
|
2201
2254
|
async kickChatMember(chatId, memberId) {
|
|
2202
|
-
await __classPrivateFieldGet(this,
|
|
2203
|
-
await __classPrivateFieldGet(this,
|
|
2255
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").banChatMember(chatId, memberId);
|
|
2256
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").unbanChatMember(chatId, memberId);
|
|
2204
2257
|
}
|
|
2205
2258
|
/**
|
|
2206
2259
|
* Set the rights of a chat member.
|
|
@@ -2210,7 +2263,7 @@ class Client extends Composer {
|
|
|
2210
2263
|
* @param memberId The identifier of a member.
|
|
2211
2264
|
*/
|
|
2212
2265
|
async setChatMemberRights(chatId, memberId, params) {
|
|
2213
|
-
await __classPrivateFieldGet(this,
|
|
2266
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setChatMemberRights(chatId, memberId, params);
|
|
2214
2267
|
}
|
|
2215
2268
|
/**
|
|
2216
2269
|
* Get the administrators of a chat.
|
|
@@ -2229,7 +2282,7 @@ class Client extends Composer {
|
|
|
2229
2282
|
* @param chatId The identifier of the chat. Must be a channel or a supergroup.
|
|
2230
2283
|
*/
|
|
2231
2284
|
async enableJoinRequests(chatId) {
|
|
2232
|
-
await __classPrivateFieldGet(this,
|
|
2285
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").enableJoinRequests(chatId);
|
|
2233
2286
|
}
|
|
2234
2287
|
/**
|
|
2235
2288
|
* Disable join requests in a chat. User-only.
|
|
@@ -2238,7 +2291,7 @@ class Client extends Composer {
|
|
|
2238
2291
|
* @param chatId The identifier of the chat. Must be a channel or a supergroup.
|
|
2239
2292
|
*/
|
|
2240
2293
|
async disableJoinRequests(chatId) {
|
|
2241
|
-
await __classPrivateFieldGet(this,
|
|
2294
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").disableJoinRequests(chatId);
|
|
2242
2295
|
}
|
|
2243
2296
|
/**
|
|
2244
2297
|
* Get inactive chats. User-only.
|
|
@@ -2257,7 +2310,7 @@ class Client extends Composer {
|
|
|
2257
2310
|
* @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
|
|
2258
2311
|
*/
|
|
2259
2312
|
async getCreatedInviteLinks(chatId, params) {
|
|
2260
|
-
return await __classPrivateFieldGet(this,
|
|
2313
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").getCreatedInviteLinks(chatId, params);
|
|
2261
2314
|
}
|
|
2262
2315
|
/**
|
|
2263
2316
|
* Join a chat. User-only.
|
|
@@ -2266,7 +2319,7 @@ class Client extends Composer {
|
|
|
2266
2319
|
* @param chatId The identifier of the chat to join.
|
|
2267
2320
|
*/
|
|
2268
2321
|
async joinChat(chatId) {
|
|
2269
|
-
await __classPrivateFieldGet(this,
|
|
2322
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").joinChat(chatId);
|
|
2270
2323
|
}
|
|
2271
2324
|
/**
|
|
2272
2325
|
* Leave a chat.
|
|
@@ -2275,7 +2328,7 @@ class Client extends Composer {
|
|
|
2275
2328
|
* @param chatId The identifier of the chat to leave.
|
|
2276
2329
|
*/
|
|
2277
2330
|
async leaveChat(chatId) {
|
|
2278
|
-
await __classPrivateFieldGet(this,
|
|
2331
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").leaveChat(chatId);
|
|
2279
2332
|
}
|
|
2280
2333
|
/**
|
|
2281
2334
|
* Get information on a user's chat membership.
|
|
@@ -2323,7 +2376,7 @@ class Client extends Composer {
|
|
|
2323
2376
|
* @param boosts The number of boosts required to circumvent its restrictions.
|
|
2324
2377
|
*/
|
|
2325
2378
|
async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
|
|
2326
|
-
await __classPrivateFieldGet(this,
|
|
2379
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setBoostsRequiredToCircumventRestrictions(chatId, boosts);
|
|
2327
2380
|
}
|
|
2328
2381
|
/**
|
|
2329
2382
|
* Create an invite link.
|
|
@@ -2333,7 +2386,7 @@ class Client extends Composer {
|
|
|
2333
2386
|
* @returns The newly created invite link.
|
|
2334
2387
|
*/
|
|
2335
2388
|
async createInviteLink(chatId, params) {
|
|
2336
|
-
return await __classPrivateFieldGet(this,
|
|
2389
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").createInviteLink(chatId, params);
|
|
2337
2390
|
}
|
|
2338
2391
|
/**
|
|
2339
2392
|
* Approve a join request.
|
|
@@ -2343,7 +2396,7 @@ class Client extends Composer {
|
|
|
2343
2396
|
* @param userId The user who made the join request.
|
|
2344
2397
|
*/
|
|
2345
2398
|
async approveJoinRequest(chatId, userId) {
|
|
2346
|
-
await __classPrivateFieldGet(this,
|
|
2399
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").approveJoinRequest(chatId, userId);
|
|
2347
2400
|
}
|
|
2348
2401
|
/**
|
|
2349
2402
|
* Decline a join request.
|
|
@@ -2353,7 +2406,7 @@ class Client extends Composer {
|
|
|
2353
2406
|
* @param userId The user who made the join request.
|
|
2354
2407
|
*/
|
|
2355
2408
|
async declineJoinRequest(chatId, userId) {
|
|
2356
|
-
await __classPrivateFieldGet(this,
|
|
2409
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").declineJoinRequest(chatId, userId);
|
|
2357
2410
|
}
|
|
2358
2411
|
/**
|
|
2359
2412
|
* Approve all join requests. User-only.
|
|
@@ -2362,7 +2415,7 @@ class Client extends Composer {
|
|
|
2362
2415
|
* @param chatId The identifier of the chat that contains the join requests.
|
|
2363
2416
|
*/
|
|
2364
2417
|
async approveJoinRequests(chatId, params) {
|
|
2365
|
-
await __classPrivateFieldGet(this,
|
|
2418
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").approveJoinRequests(chatId, params);
|
|
2366
2419
|
}
|
|
2367
2420
|
/**
|
|
2368
2421
|
* Decline all join requests. User-only.
|
|
@@ -2371,7 +2424,7 @@ class Client extends Composer {
|
|
|
2371
2424
|
* @param chatId The identifier of the chat that contains the join requests.
|
|
2372
2425
|
*/
|
|
2373
2426
|
async declineJoinRequests(chatId, params) {
|
|
2374
|
-
await __classPrivateFieldGet(this,
|
|
2427
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").declineJoinRequests(chatId, params);
|
|
2375
2428
|
}
|
|
2376
2429
|
/**
|
|
2377
2430
|
* Add a single user to a chat.
|
|
@@ -2382,7 +2435,7 @@ class Client extends Composer {
|
|
|
2382
2435
|
* @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
|
|
2383
2436
|
*/
|
|
2384
2437
|
async addChatMember(chatId, userId, params) {
|
|
2385
|
-
return await __classPrivateFieldGet(this,
|
|
2438
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").addChatMember(chatId, userId, params);
|
|
2386
2439
|
}
|
|
2387
2440
|
/**
|
|
2388
2441
|
* Add multiple users at once to a channel or a supergroup.
|
|
@@ -2392,7 +2445,7 @@ class Client extends Composer {
|
|
|
2392
2445
|
* @param userId The identifiers of the users to add to the channel or supergroup.
|
|
2393
2446
|
*/
|
|
2394
2447
|
async addChatMembers(chatId, userIds) {
|
|
2395
|
-
return await __classPrivateFieldGet(this,
|
|
2448
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").addChatMembers(chatId, userIds);
|
|
2396
2449
|
}
|
|
2397
2450
|
/**
|
|
2398
2451
|
* Open a chat. User-only.
|
|
@@ -2934,6 +2987,25 @@ class Client extends Composer {
|
|
|
2934
2987
|
async getTranslations(params) {
|
|
2935
2988
|
return await __classPrivateFieldGet(this, _Client_translationsManager, "f").getTranslations(params);
|
|
2936
2989
|
}
|
|
2990
|
+
//
|
|
2991
|
+
// ========================= GIFTS ========================= //
|
|
2992
|
+
//
|
|
2993
|
+
/**
|
|
2994
|
+
* Get available gifts.
|
|
2995
|
+
*
|
|
2996
|
+
* @method gf
|
|
2997
|
+
*/
|
|
2998
|
+
async getGifts() {
|
|
2999
|
+
return await __classPrivateFieldGet(this, _Client_giftManager, "f").getGifts();
|
|
3000
|
+
}
|
|
3001
|
+
/**
|
|
3002
|
+
* Get gifts claimed by a specific user. User-only.
|
|
3003
|
+
*
|
|
3004
|
+
* @method gf
|
|
3005
|
+
*/
|
|
3006
|
+
async getUserGifts(userId, params) {
|
|
3007
|
+
return await __classPrivateFieldGet(this, _Client_giftManager, "f").getUserGifts(userId, params);
|
|
3008
|
+
}
|
|
2937
3009
|
}
|
|
2938
3010
|
exports.Client = Client;
|
|
2939
3011
|
_a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
@@ -2963,18 +3035,18 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
2963
3035
|
await this.messageStorage.setEntity(entity);
|
|
2964
3036
|
}
|
|
2965
3037
|
}
|
|
2966
|
-
if (
|
|
3038
|
+
if (__classPrivateFieldGet(this, _Client_messageManager, "f").canHandleUpdate(update)) {
|
|
2967
3039
|
promises.push(async () => {
|
|
2968
|
-
const
|
|
2969
|
-
if (!
|
|
3040
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_messageManager, "f").handleUpdate(update);
|
|
3041
|
+
if (!ctxUpdate) {
|
|
2970
3042
|
return;
|
|
2971
3043
|
}
|
|
2972
3044
|
try {
|
|
2973
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this,
|
|
3045
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
2974
3046
|
}
|
|
2975
3047
|
finally {
|
|
2976
|
-
if ("deletedMessages" in
|
|
2977
|
-
for (const { chatId, messageId } of
|
|
3048
|
+
if ("deletedMessages" in ctxUpdate) {
|
|
3049
|
+
for (const { chatId, messageId } of ctxUpdate.deletedMessages) {
|
|
2978
3050
|
await this.messageStorage.setMessage(chatId, messageId, null);
|
|
2979
3051
|
await __classPrivateFieldGet(this, _Client_chatListManager, "f").reassignChatLastMessage(chatId);
|
|
2980
3052
|
}
|
|
@@ -2982,7 +3054,15 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
2982
3054
|
}
|
|
2983
3055
|
});
|
|
2984
3056
|
}
|
|
2985
|
-
if (
|
|
3057
|
+
if (__classPrivateFieldGet(this, _Client_chatManager, "f").canHandleUpdate(update)) {
|
|
3058
|
+
promises.push(async () => {
|
|
3059
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_chatManager, "f").handleUpdate(update);
|
|
3060
|
+
if (ctxUpdate) {
|
|
3061
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3062
|
+
}
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
if (__classPrivateFieldGet(this, _Client_pollManager, "f").canHandleUpdate(update)) {
|
|
2986
3066
|
promises.push(async () => {
|
|
2987
3067
|
const ctxUpdate = await __classPrivateFieldGet(this, _Client_pollManager, "f").handleUpdate(update);
|
|
2988
3068
|
if (ctxUpdate) {
|
|
@@ -2990,16 +3070,21 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
2990
3070
|
}
|
|
2991
3071
|
});
|
|
2992
3072
|
}
|
|
2993
|
-
if (
|
|
2994
|
-
promises.push(async () =>
|
|
3073
|
+
if (__classPrivateFieldGet(this, _Client_videoChatManager, "f").canHandleUpdate(update)) {
|
|
3074
|
+
promises.push(async () => {
|
|
3075
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_videoChatManager, "f").handleUpdate(update);
|
|
3076
|
+
if (ctxUpdate) {
|
|
3077
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3078
|
+
}
|
|
3079
|
+
});
|
|
2995
3080
|
}
|
|
2996
|
-
if (
|
|
3081
|
+
if (__classPrivateFieldGet(this, _Client_callbackQueryManager, "f").canHandleUpdate(update)) {
|
|
2997
3082
|
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").handleUpdate(update)));
|
|
2998
3083
|
}
|
|
2999
|
-
if (
|
|
3084
|
+
if (__classPrivateFieldGet(this, _Client_inlineQueryManager, "f").canHandleUpdate(update)) {
|
|
3000
3085
|
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").handleUpdate(update)));
|
|
3001
3086
|
}
|
|
3002
|
-
if (
|
|
3087
|
+
if (__classPrivateFieldGet(this, _Client_reactionManager, "f").canHandleUpdate(update)) {
|
|
3003
3088
|
promises.push(async () => {
|
|
3004
3089
|
const upd = await __classPrivateFieldGet(this, _Client_reactionManager, "f").handleUpdate(update);
|
|
3005
3090
|
if (upd) {
|
|
@@ -3007,20 +3092,44 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
3007
3092
|
}
|
|
3008
3093
|
});
|
|
3009
3094
|
}
|
|
3010
|
-
if (
|
|
3095
|
+
if (__classPrivateFieldGet(this, _Client_chatListManager, "f").canHandleUpdate(update)) {
|
|
3011
3096
|
promises.push(() => __classPrivateFieldGet(this, _Client_chatListManager, "f").handleUpdate(update));
|
|
3012
3097
|
}
|
|
3013
|
-
if (
|
|
3098
|
+
if (__classPrivateFieldGet(this, _Client_storyManager, "f").canHandleUpdate(update)) {
|
|
3014
3099
|
promises.push(async () => {
|
|
3015
|
-
const
|
|
3016
|
-
if (
|
|
3017
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this,
|
|
3100
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_storyManager, "f").handleUpdate(update);
|
|
3101
|
+
if (ctxUpdate) {
|
|
3102
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3018
3103
|
}
|
|
3019
3104
|
});
|
|
3020
3105
|
}
|
|
3021
|
-
if (
|
|
3106
|
+
if (__classPrivateFieldGet(this, _Client_businessConnectionManager, "f").canHandleUpdate(update)) {
|
|
3022
3107
|
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_businessConnectionManager, "f").handleUpdate(update)));
|
|
3023
3108
|
}
|
|
3109
|
+
if (__classPrivateFieldGet(this, _Client_storyManager, "f").canHandleUpdate(update)) {
|
|
3110
|
+
promises.push(async () => {
|
|
3111
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_storyManager, "f").handleUpdate(update);
|
|
3112
|
+
if (ctxUpdate) {
|
|
3113
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3114
|
+
}
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
if (__classPrivateFieldGet(this, _Client_paymentManager, "f").canHandleUpdate(update)) {
|
|
3118
|
+
promises.push(async () => {
|
|
3119
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_paymentManager, "f").handleUpdate(update);
|
|
3120
|
+
if (ctxUpdate) {
|
|
3121
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3122
|
+
}
|
|
3123
|
+
});
|
|
3124
|
+
}
|
|
3125
|
+
if (__classPrivateFieldGet(this, _Client_translationsManager, "f").canHandleUpdate(update)) {
|
|
3126
|
+
promises.push(async () => {
|
|
3127
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_translationsManager, "f").handleUpdate(update);
|
|
3128
|
+
if (ctxUpdate) {
|
|
3129
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3130
|
+
}
|
|
3131
|
+
});
|
|
3132
|
+
}
|
|
3024
3133
|
return () => Promise.all(promises.map((v) => v()));
|
|
3025
3134
|
}, _Client_getMe = async function _Client_getMe() {
|
|
3026
3135
|
if (__classPrivateFieldGet(this, _Client_lastGetMe, "f") != null) {
|
|
@@ -38,7 +38,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
38
38
|
exports.ConnectionWebSocket = void 0;
|
|
39
39
|
/**
|
|
40
40
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
41
|
-
* Copyright (C) 2023-
|
|
41
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
42
42
|
*
|
|
43
43
|
* This file is part of MTKruto.
|
|
44
44
|
*
|
package/script/mod.d.ts
CHANGED
package/script/mod.js
CHANGED
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.checkPassword = exports.setLogVerbosity = exports.setLoggingProvider = exports.setLogFilter = exports.getRandomId = exports.getColorName = exports.getColorFromPeerId = void 0;
|
|
30
30
|
/**
|
|
31
31
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
32
|
-
* Copyright (C) 2023-
|
|
32
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
33
33
|
*
|
|
34
34
|
* This file is part of MTKruto.
|
|
35
35
|
*
|