@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
package/esm/client/5_client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
-
* Copyright (C) 2023-
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
4
|
*
|
|
5
5
|
* This file is part of MTKruto.
|
|
6
6
|
*
|
|
@@ -28,7 +28,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
28
28
|
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");
|
|
29
29
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
30
|
};
|
|
31
|
-
var _Client_instances, _a, _Client_client, _Client_guaranteeUpdateDelivery,
|
|
31
|
+
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;
|
|
32
32
|
import { MINUTE, SECOND, unreachable } from "../0_deps.js";
|
|
33
33
|
import { AccessError, ConnectionError, InputError } from "../0_errors.js";
|
|
34
34
|
import { cleanObject, drop, getLogger, getRandomId, mustPrompt, mustPromptOneOf, Mutex, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
@@ -49,6 +49,7 @@ import { AccountManager } from "./2_account_manager.js";
|
|
|
49
49
|
import { BotInfoManager } from "./2_bot_info_manager.js";
|
|
50
50
|
import { BusinessConnectionManager } from "./2_business_connection_manager.js";
|
|
51
51
|
import { FileManager } from "./2_file_manager.js";
|
|
52
|
+
import { GiftManager } from "./2_gift_manager.js";
|
|
52
53
|
import { NetworkStatisticsManager } from "./2_network_statistics_manager.js";
|
|
53
54
|
import { PaymentManager } from "./2_payment_manager.js";
|
|
54
55
|
import { ReactionManager } from "./2_reaction_manager.js";
|
|
@@ -58,6 +59,7 @@ import { MessageManager } from "./3_message_manager.js";
|
|
|
58
59
|
import { VideoChatManager } from "./3_video_chat_manager.js";
|
|
59
60
|
import { CallbackQueryManager } from "./4_callback_query_manager.js";
|
|
60
61
|
import { ChatListManager } from "./4_chat_list_manager.js";
|
|
62
|
+
import { ChatManager } from "./4_chat_manager.js";
|
|
61
63
|
import { InlineQueryManager } from "./4_inline_query_manager.js";
|
|
62
64
|
import { PollManager } from "./4_poll_manager.js";
|
|
63
65
|
import { StoryManager } from "./4_story_manager.js";
|
|
@@ -78,21 +80,25 @@ export class Client extends Composer {
|
|
|
78
80
|
// deno-lint-ignore no-explicit-any
|
|
79
81
|
get managers() {
|
|
80
82
|
return __classPrivateFieldGet(this, _Client_managers, "f") ?? (__classPrivateFieldSet(this, _Client_managers, __classPrivateFieldGet(this, _Client_managers, "f") ?? {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
// 2_
|
|
84
|
+
accountManager: __classPrivateFieldGet(this, _Client_accountManager, "f"),
|
|
83
85
|
botInfoManager: __classPrivateFieldGet(this, _Client_botInfoManager, "f"),
|
|
86
|
+
businessConnectionManager: __classPrivateFieldGet(this, _Client_businessConnectionManager, "f"),
|
|
84
87
|
fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"),
|
|
88
|
+
giftManager: __classPrivateFieldGet(this, _Client_giftManager, "f"),
|
|
89
|
+
networkStatisticsManager: __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f"),
|
|
90
|
+
paymentManager: __classPrivateFieldGet(this, _Client_paymentManager, "f"),
|
|
85
91
|
reactionManager: __classPrivateFieldGet(this, _Client_reactionManager, "f"),
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
translationsManager: __classPrivateFieldGet(this, _Client_translationsManager, "f"),
|
|
93
|
+
updateManager: __classPrivateFieldGet(this, _Client_updateManager, "f"),
|
|
94
|
+
// 3_
|
|
88
95
|
messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f"),
|
|
89
|
-
|
|
96
|
+
videoChatManager: __classPrivateFieldGet(this, _Client_videoChatManager, "f"),
|
|
97
|
+
// 4_
|
|
90
98
|
callbackQueryManager: __classPrivateFieldGet(this, _Client_callbackQueryManager, "f"),
|
|
91
|
-
inlineQueryManager: __classPrivateFieldGet(this, _Client_inlineQueryManager, "f"),
|
|
92
99
|
chatListManager: __classPrivateFieldGet(this, _Client_chatListManager, "f"),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
translationsManager: __classPrivateFieldGet(this, _Client_translationsManager, "f"),
|
|
100
|
+
inlineQueryManager: __classPrivateFieldGet(this, _Client_inlineQueryManager, "f"),
|
|
101
|
+
storyManager: __classPrivateFieldGet(this, _Client_storyManager, "f"),
|
|
96
102
|
}, "f"));
|
|
97
103
|
}
|
|
98
104
|
/**
|
|
@@ -103,22 +109,27 @@ export class Client extends Composer {
|
|
|
103
109
|
_Client_instances.add(this);
|
|
104
110
|
_Client_client.set(this, void 0);
|
|
105
111
|
_Client_guaranteeUpdateDelivery.set(this, void 0);
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
// 2_
|
|
113
|
+
_Client_accountManager.set(this, void 0);
|
|
108
114
|
_Client_botInfoManager.set(this, void 0);
|
|
115
|
+
_Client_businessConnectionManager.set(this, void 0);
|
|
109
116
|
_Client_fileManager.set(this, void 0);
|
|
117
|
+
_Client_giftManager.set(this, void 0);
|
|
118
|
+
_Client_networkStatisticsManager.set(this, void 0);
|
|
119
|
+
_Client_paymentManager.set(this, void 0);
|
|
110
120
|
_Client_reactionManager.set(this, void 0);
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
_Client_translationsManager.set(this, void 0);
|
|
122
|
+
_Client_updateManager.set(this, void 0);
|
|
123
|
+
// 3_
|
|
113
124
|
_Client_messageManager.set(this, void 0);
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
_Client_videoChatManager.set(this, void 0);
|
|
126
|
+
// 4_
|
|
116
127
|
_Client_callbackQueryManager.set(this, void 0);
|
|
117
|
-
_Client_inlineQueryManager.set(this, void 0);
|
|
118
128
|
_Client_chatListManager.set(this, void 0);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
_Client_chatManager.set(this, void 0);
|
|
130
|
+
_Client_inlineQueryManager.set(this, void 0);
|
|
131
|
+
_Client_pollManager.set(this, void 0);
|
|
132
|
+
_Client_storyManager.set(this, void 0);
|
|
122
133
|
// deno-lint-ignore no-explicit-any
|
|
123
134
|
_Client_managers.set(this, void 0);
|
|
124
135
|
_Client_storage_.set(this, void 0);
|
|
@@ -397,6 +408,14 @@ export class Client extends Composer {
|
|
|
397
408
|
const inlineMessageId = mustGetInlineMsgId();
|
|
398
409
|
return this.editInlineMessageText(inlineMessageId, text, params);
|
|
399
410
|
},
|
|
411
|
+
editInlineMessageMedia: (media, params) => {
|
|
412
|
+
const inlineMessageId = mustGetInlineMsgId();
|
|
413
|
+
return this.editInlineMessageMedia(inlineMessageId, media, params);
|
|
414
|
+
},
|
|
415
|
+
editInlineMessageCaption: (params) => {
|
|
416
|
+
const inlineMessageId = mustGetInlineMsgId();
|
|
417
|
+
return this.editInlineMessageCaption(inlineMessageId, params);
|
|
418
|
+
},
|
|
400
419
|
editInlineMessageLiveLocation: (latitude, longitude, params) => {
|
|
401
420
|
const inlineMessageId = mustGetInlineMsgId();
|
|
402
421
|
return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
@@ -409,6 +428,14 @@ export class Client extends Composer {
|
|
|
409
428
|
const { chatId } = mustGetMsg();
|
|
410
429
|
return this.editMessageText(chatId, messageId, text, params);
|
|
411
430
|
},
|
|
431
|
+
editMessageCaption: (messageId, params) => {
|
|
432
|
+
const { chatId } = mustGetMsg();
|
|
433
|
+
return this.editMessageCaption(chatId, messageId, params);
|
|
434
|
+
},
|
|
435
|
+
editMessageMedia: (messageId, media, params) => {
|
|
436
|
+
const { chatId } = mustGetMsg();
|
|
437
|
+
return this.editMessageMedia(chatId, messageId, media, params);
|
|
438
|
+
},
|
|
412
439
|
editMessageLiveLocation: (messageId, latitude, longitude, params) => {
|
|
413
440
|
const { chatId } = mustGetMsg();
|
|
414
441
|
return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
@@ -711,22 +738,27 @@ export class Client extends Composer {
|
|
|
711
738
|
langPack: this.platform,
|
|
712
739
|
langCode: this.language,
|
|
713
740
|
};
|
|
714
|
-
|
|
715
|
-
__classPrivateFieldSet(this,
|
|
741
|
+
// 2_
|
|
742
|
+
__classPrivateFieldSet(this, _Client_accountManager, new AccountManager(c), "f");
|
|
716
743
|
__classPrivateFieldSet(this, _Client_botInfoManager, new BotInfoManager(c), "f");
|
|
717
|
-
__classPrivateFieldSet(this, _Client_fileManager, new FileManager(c), "f");
|
|
718
|
-
__classPrivateFieldSet(this, _Client_reactionManager, new ReactionManager(c), "f");
|
|
719
744
|
__classPrivateFieldSet(this, _Client_businessConnectionManager, new BusinessConnectionManager(c), "f");
|
|
720
|
-
__classPrivateFieldSet(this,
|
|
721
|
-
__classPrivateFieldSet(this,
|
|
722
|
-
__classPrivateFieldSet(this,
|
|
723
|
-
__classPrivateFieldSet(this, _Client_pollManager, new PollManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
724
|
-
__classPrivateFieldSet(this, _Client_storyManager, new StoryManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
725
|
-
__classPrivateFieldSet(this, _Client_inlineQueryManager, new InlineQueryManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
726
|
-
__classPrivateFieldSet(this, _Client_chatListManager, new ChatListManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
727
|
-
__classPrivateFieldSet(this, _Client_accountManager, new AccountManager(c), "f");
|
|
745
|
+
const fileManager = __classPrivateFieldSet(this, _Client_fileManager, new FileManager(c), "f");
|
|
746
|
+
__classPrivateFieldSet(this, _Client_giftManager, new GiftManager(c), "f");
|
|
747
|
+
__classPrivateFieldSet(this, _Client_networkStatisticsManager, new NetworkStatisticsManager(c), "f");
|
|
728
748
|
__classPrivateFieldSet(this, _Client_paymentManager, new PaymentManager(c), "f");
|
|
749
|
+
__classPrivateFieldSet(this, _Client_reactionManager, new ReactionManager(c), "f");
|
|
729
750
|
__classPrivateFieldSet(this, _Client_translationsManager, new TranslationsManager(c), "f");
|
|
751
|
+
__classPrivateFieldSet(this, _Client_updateManager, new UpdateManager(c), "f");
|
|
752
|
+
// 3_
|
|
753
|
+
const messageManager = __classPrivateFieldSet(this, _Client_messageManager, new MessageManager({ ...c, fileManager }), "f");
|
|
754
|
+
__classPrivateFieldSet(this, _Client_videoChatManager, new VideoChatManager({ ...c, fileManager }), "f");
|
|
755
|
+
// 4_
|
|
756
|
+
__classPrivateFieldSet(this, _Client_callbackQueryManager, new CallbackQueryManager({ ...c, messageManager }), "f");
|
|
757
|
+
__classPrivateFieldSet(this, _Client_chatListManager, new ChatListManager({ ...c, fileManager, messageManager }), "f");
|
|
758
|
+
__classPrivateFieldSet(this, _Client_chatManager, new ChatManager({ ...c, fileManager, messageManager }), "f");
|
|
759
|
+
__classPrivateFieldSet(this, _Client_inlineQueryManager, new InlineQueryManager({ ...c, messageManager }), "f");
|
|
760
|
+
__classPrivateFieldSet(this, _Client_pollManager, new PollManager({ ...c, messageManager }), "f");
|
|
761
|
+
__classPrivateFieldSet(this, _Client_storyManager, new StoryManager({ ...c, fileManager, messageManager }), "f");
|
|
730
762
|
__classPrivateFieldGet(this, _Client_updateManager, "f").setUpdateHandler(__classPrivateFieldGet(this, _Client_instances, "m", _Client_handleUpdate).bind(this));
|
|
731
763
|
const transportProvider = __classPrivateFieldGet(this, _Client_client, "f").transportProvider;
|
|
732
764
|
__classPrivateFieldGet(this, _Client_client, "f").transportProvider = (params) => {
|
|
@@ -846,7 +878,7 @@ export class Client extends Composer {
|
|
|
846
878
|
}
|
|
847
879
|
await __classPrivateFieldGet(this, _Client_client, "f").reconnect();
|
|
848
880
|
}
|
|
849
|
-
async [(_Client_client = new WeakMap(), _Client_guaranteeUpdateDelivery = new WeakMap(),
|
|
881
|
+
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() {
|
|
850
882
|
if (this.connected) {
|
|
851
883
|
return;
|
|
852
884
|
}
|
|
@@ -1776,6 +1808,18 @@ export class Client extends Composer {
|
|
|
1776
1808
|
async editMessageText(chatId, messageId, text, params) {
|
|
1777
1809
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
|
|
1778
1810
|
}
|
|
1811
|
+
/**
|
|
1812
|
+
* Edit a message's caption.
|
|
1813
|
+
*
|
|
1814
|
+
* @method ms
|
|
1815
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
1816
|
+
* @param messageId The message's identifier.
|
|
1817
|
+
* @param text The new caption of the message.
|
|
1818
|
+
* @returns The edited message.
|
|
1819
|
+
*/
|
|
1820
|
+
async editMessageCaption(chatId, messageId, params) {
|
|
1821
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageCaption(chatId, messageId, params);
|
|
1822
|
+
}
|
|
1779
1823
|
/**
|
|
1780
1824
|
* Edit a message's media.
|
|
1781
1825
|
*
|
|
@@ -1808,6 +1852,15 @@ export class Client extends Composer {
|
|
|
1808
1852
|
async editInlineMessageText(inlineMessageId, text, params) {
|
|
1809
1853
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageText(inlineMessageId, text, params);
|
|
1810
1854
|
}
|
|
1855
|
+
/**
|
|
1856
|
+
* Edit an inline message's caption. Bot-only.
|
|
1857
|
+
*
|
|
1858
|
+
* @method ms
|
|
1859
|
+
* @param inlineMessageId The inline message's identifier.
|
|
1860
|
+
*/
|
|
1861
|
+
async editInlineMessageCaption(inlineMessageId, params) {
|
|
1862
|
+
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageCaption(inlineMessageId, params);
|
|
1863
|
+
}
|
|
1811
1864
|
/**
|
|
1812
1865
|
* Edit a message's reply markup.
|
|
1813
1866
|
*
|
|
@@ -2146,7 +2199,7 @@ export class Client extends Composer {
|
|
|
2146
2199
|
* @param availableReactions The new available reactions.
|
|
2147
2200
|
*/
|
|
2148
2201
|
async setAvailableReactions(chatId, availableReactions) {
|
|
2149
|
-
await __classPrivateFieldGet(this,
|
|
2202
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setAvailableReactions(chatId, availableReactions);
|
|
2150
2203
|
}
|
|
2151
2204
|
/**
|
|
2152
2205
|
* Set a chat's photo.
|
|
@@ -2156,7 +2209,7 @@ export class Client extends Composer {
|
|
|
2156
2209
|
* @param photo A photo to set as the chat's photo.
|
|
2157
2210
|
*/
|
|
2158
2211
|
async setChatPhoto(chatId, photo, params) {
|
|
2159
|
-
await __classPrivateFieldGet(this,
|
|
2212
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setChatPhoto(chatId, photo, params);
|
|
2160
2213
|
}
|
|
2161
2214
|
/**
|
|
2162
2215
|
* Delete a chat's photo.
|
|
@@ -2165,7 +2218,7 @@ export class Client extends Composer {
|
|
|
2165
2218
|
* @param chatId The identifier of the chat.
|
|
2166
2219
|
*/
|
|
2167
2220
|
async deleteChatPhoto(chatId) {
|
|
2168
|
-
await __classPrivateFieldGet(this,
|
|
2221
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").deleteChatPhoto(chatId);
|
|
2169
2222
|
}
|
|
2170
2223
|
/**
|
|
2171
2224
|
* Ban a member from a chat.
|
|
@@ -2175,7 +2228,7 @@ export class Client extends Composer {
|
|
|
2175
2228
|
* @param memberId The identifier of the member.
|
|
2176
2229
|
*/
|
|
2177
2230
|
async banChatMember(chatId, memberId, params) {
|
|
2178
|
-
await __classPrivateFieldGet(this,
|
|
2231
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").banChatMember(chatId, memberId, params);
|
|
2179
2232
|
}
|
|
2180
2233
|
/**
|
|
2181
2234
|
* Unban a member from a chat.
|
|
@@ -2185,7 +2238,7 @@ export class Client extends Composer {
|
|
|
2185
2238
|
* @param memberId The identifier of the member.
|
|
2186
2239
|
*/
|
|
2187
2240
|
async unbanChatMember(chatId, memberId) {
|
|
2188
|
-
await __classPrivateFieldGet(this,
|
|
2241
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").unbanChatMember(chatId, memberId);
|
|
2189
2242
|
}
|
|
2190
2243
|
/**
|
|
2191
2244
|
* Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
|
|
@@ -2195,8 +2248,8 @@ export class Client extends Composer {
|
|
|
2195
2248
|
* @param memberId The identifier of the member.
|
|
2196
2249
|
*/
|
|
2197
2250
|
async kickChatMember(chatId, memberId) {
|
|
2198
|
-
await __classPrivateFieldGet(this,
|
|
2199
|
-
await __classPrivateFieldGet(this,
|
|
2251
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").banChatMember(chatId, memberId);
|
|
2252
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").unbanChatMember(chatId, memberId);
|
|
2200
2253
|
}
|
|
2201
2254
|
/**
|
|
2202
2255
|
* Set the rights of a chat member.
|
|
@@ -2206,7 +2259,7 @@ export class Client extends Composer {
|
|
|
2206
2259
|
* @param memberId The identifier of a member.
|
|
2207
2260
|
*/
|
|
2208
2261
|
async setChatMemberRights(chatId, memberId, params) {
|
|
2209
|
-
await __classPrivateFieldGet(this,
|
|
2262
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setChatMemberRights(chatId, memberId, params);
|
|
2210
2263
|
}
|
|
2211
2264
|
/**
|
|
2212
2265
|
* Get the administrators of a chat.
|
|
@@ -2225,7 +2278,7 @@ export class Client extends Composer {
|
|
|
2225
2278
|
* @param chatId The identifier of the chat. Must be a channel or a supergroup.
|
|
2226
2279
|
*/
|
|
2227
2280
|
async enableJoinRequests(chatId) {
|
|
2228
|
-
await __classPrivateFieldGet(this,
|
|
2281
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").enableJoinRequests(chatId);
|
|
2229
2282
|
}
|
|
2230
2283
|
/**
|
|
2231
2284
|
* Disable join requests in a chat. User-only.
|
|
@@ -2234,7 +2287,7 @@ export class Client extends Composer {
|
|
|
2234
2287
|
* @param chatId The identifier of the chat. Must be a channel or a supergroup.
|
|
2235
2288
|
*/
|
|
2236
2289
|
async disableJoinRequests(chatId) {
|
|
2237
|
-
await __classPrivateFieldGet(this,
|
|
2290
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").disableJoinRequests(chatId);
|
|
2238
2291
|
}
|
|
2239
2292
|
/**
|
|
2240
2293
|
* Get inactive chats. User-only.
|
|
@@ -2253,7 +2306,7 @@ export class Client extends Composer {
|
|
|
2253
2306
|
* @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.
|
|
2254
2307
|
*/
|
|
2255
2308
|
async getCreatedInviteLinks(chatId, params) {
|
|
2256
|
-
return await __classPrivateFieldGet(this,
|
|
2309
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").getCreatedInviteLinks(chatId, params);
|
|
2257
2310
|
}
|
|
2258
2311
|
/**
|
|
2259
2312
|
* Join a chat. User-only.
|
|
@@ -2262,7 +2315,7 @@ export class Client extends Composer {
|
|
|
2262
2315
|
* @param chatId The identifier of the chat to join.
|
|
2263
2316
|
*/
|
|
2264
2317
|
async joinChat(chatId) {
|
|
2265
|
-
await __classPrivateFieldGet(this,
|
|
2318
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").joinChat(chatId);
|
|
2266
2319
|
}
|
|
2267
2320
|
/**
|
|
2268
2321
|
* Leave a chat.
|
|
@@ -2271,7 +2324,7 @@ export class Client extends Composer {
|
|
|
2271
2324
|
* @param chatId The identifier of the chat to leave.
|
|
2272
2325
|
*/
|
|
2273
2326
|
async leaveChat(chatId) {
|
|
2274
|
-
await __classPrivateFieldGet(this,
|
|
2327
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").leaveChat(chatId);
|
|
2275
2328
|
}
|
|
2276
2329
|
/**
|
|
2277
2330
|
* Get information on a user's chat membership.
|
|
@@ -2319,7 +2372,7 @@ export class Client extends Composer {
|
|
|
2319
2372
|
* @param boosts The number of boosts required to circumvent its restrictions.
|
|
2320
2373
|
*/
|
|
2321
2374
|
async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
|
|
2322
|
-
await __classPrivateFieldGet(this,
|
|
2375
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").setBoostsRequiredToCircumventRestrictions(chatId, boosts);
|
|
2323
2376
|
}
|
|
2324
2377
|
/**
|
|
2325
2378
|
* Create an invite link.
|
|
@@ -2329,7 +2382,7 @@ export class Client extends Composer {
|
|
|
2329
2382
|
* @returns The newly created invite link.
|
|
2330
2383
|
*/
|
|
2331
2384
|
async createInviteLink(chatId, params) {
|
|
2332
|
-
return await __classPrivateFieldGet(this,
|
|
2385
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").createInviteLink(chatId, params);
|
|
2333
2386
|
}
|
|
2334
2387
|
/**
|
|
2335
2388
|
* Approve a join request.
|
|
@@ -2339,7 +2392,7 @@ export class Client extends Composer {
|
|
|
2339
2392
|
* @param userId The user who made the join request.
|
|
2340
2393
|
*/
|
|
2341
2394
|
async approveJoinRequest(chatId, userId) {
|
|
2342
|
-
await __classPrivateFieldGet(this,
|
|
2395
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").approveJoinRequest(chatId, userId);
|
|
2343
2396
|
}
|
|
2344
2397
|
/**
|
|
2345
2398
|
* Decline a join request.
|
|
@@ -2349,7 +2402,7 @@ export class Client extends Composer {
|
|
|
2349
2402
|
* @param userId The user who made the join request.
|
|
2350
2403
|
*/
|
|
2351
2404
|
async declineJoinRequest(chatId, userId) {
|
|
2352
|
-
await __classPrivateFieldGet(this,
|
|
2405
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").declineJoinRequest(chatId, userId);
|
|
2353
2406
|
}
|
|
2354
2407
|
/**
|
|
2355
2408
|
* Approve all join requests. User-only.
|
|
@@ -2358,7 +2411,7 @@ export class Client extends Composer {
|
|
|
2358
2411
|
* @param chatId The identifier of the chat that contains the join requests.
|
|
2359
2412
|
*/
|
|
2360
2413
|
async approveJoinRequests(chatId, params) {
|
|
2361
|
-
await __classPrivateFieldGet(this,
|
|
2414
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").approveJoinRequests(chatId, params);
|
|
2362
2415
|
}
|
|
2363
2416
|
/**
|
|
2364
2417
|
* Decline all join requests. User-only.
|
|
@@ -2367,7 +2420,7 @@ export class Client extends Composer {
|
|
|
2367
2420
|
* @param chatId The identifier of the chat that contains the join requests.
|
|
2368
2421
|
*/
|
|
2369
2422
|
async declineJoinRequests(chatId, params) {
|
|
2370
|
-
await __classPrivateFieldGet(this,
|
|
2423
|
+
await __classPrivateFieldGet(this, _Client_chatManager, "f").declineJoinRequests(chatId, params);
|
|
2371
2424
|
}
|
|
2372
2425
|
/**
|
|
2373
2426
|
* Add a single user to a chat.
|
|
@@ -2378,7 +2431,7 @@ export class Client extends Composer {
|
|
|
2378
2431
|
* @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
|
|
2379
2432
|
*/
|
|
2380
2433
|
async addChatMember(chatId, userId, params) {
|
|
2381
|
-
return await __classPrivateFieldGet(this,
|
|
2434
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").addChatMember(chatId, userId, params);
|
|
2382
2435
|
}
|
|
2383
2436
|
/**
|
|
2384
2437
|
* Add multiple users at once to a channel or a supergroup.
|
|
@@ -2388,7 +2441,7 @@ export class Client extends Composer {
|
|
|
2388
2441
|
* @param userId The identifiers of the users to add to the channel or supergroup.
|
|
2389
2442
|
*/
|
|
2390
2443
|
async addChatMembers(chatId, userIds) {
|
|
2391
|
-
return await __classPrivateFieldGet(this,
|
|
2444
|
+
return await __classPrivateFieldGet(this, _Client_chatManager, "f").addChatMembers(chatId, userIds);
|
|
2392
2445
|
}
|
|
2393
2446
|
/**
|
|
2394
2447
|
* Open a chat. User-only.
|
|
@@ -2930,6 +2983,25 @@ export class Client extends Composer {
|
|
|
2930
2983
|
async getTranslations(params) {
|
|
2931
2984
|
return await __classPrivateFieldGet(this, _Client_translationsManager, "f").getTranslations(params);
|
|
2932
2985
|
}
|
|
2986
|
+
//
|
|
2987
|
+
// ========================= GIFTS ========================= //
|
|
2988
|
+
//
|
|
2989
|
+
/**
|
|
2990
|
+
* Get available gifts.
|
|
2991
|
+
*
|
|
2992
|
+
* @method gf
|
|
2993
|
+
*/
|
|
2994
|
+
async getGifts() {
|
|
2995
|
+
return await __classPrivateFieldGet(this, _Client_giftManager, "f").getGifts();
|
|
2996
|
+
}
|
|
2997
|
+
/**
|
|
2998
|
+
* Get gifts claimed by a specific user. User-only.
|
|
2999
|
+
*
|
|
3000
|
+
* @method gf
|
|
3001
|
+
*/
|
|
3002
|
+
async getUserGifts(userId, params) {
|
|
3003
|
+
return await __classPrivateFieldGet(this, _Client_giftManager, "f").getUserGifts(userId, params);
|
|
3004
|
+
}
|
|
2933
3005
|
}
|
|
2934
3006
|
_a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
2935
3007
|
if (__classPrivateFieldGet(this, _Client_disableUpdates, "f") && !("authorizationState" in update) && !("connectionState" in update)) {
|
|
@@ -2958,18 +3030,18 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
2958
3030
|
await this.messageStorage.setEntity(entity);
|
|
2959
3031
|
}
|
|
2960
3032
|
}
|
|
2961
|
-
if (
|
|
3033
|
+
if (__classPrivateFieldGet(this, _Client_messageManager, "f").canHandleUpdate(update)) {
|
|
2962
3034
|
promises.push(async () => {
|
|
2963
|
-
const
|
|
2964
|
-
if (!
|
|
3035
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_messageManager, "f").handleUpdate(update);
|
|
3036
|
+
if (!ctxUpdate) {
|
|
2965
3037
|
return;
|
|
2966
3038
|
}
|
|
2967
3039
|
try {
|
|
2968
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this,
|
|
3040
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
2969
3041
|
}
|
|
2970
3042
|
finally {
|
|
2971
|
-
if ("deletedMessages" in
|
|
2972
|
-
for (const { chatId, messageId } of
|
|
3043
|
+
if ("deletedMessages" in ctxUpdate) {
|
|
3044
|
+
for (const { chatId, messageId } of ctxUpdate.deletedMessages) {
|
|
2973
3045
|
await this.messageStorage.setMessage(chatId, messageId, null);
|
|
2974
3046
|
await __classPrivateFieldGet(this, _Client_chatListManager, "f").reassignChatLastMessage(chatId);
|
|
2975
3047
|
}
|
|
@@ -2977,7 +3049,15 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
2977
3049
|
}
|
|
2978
3050
|
});
|
|
2979
3051
|
}
|
|
2980
|
-
if (
|
|
3052
|
+
if (__classPrivateFieldGet(this, _Client_chatManager, "f").canHandleUpdate(update)) {
|
|
3053
|
+
promises.push(async () => {
|
|
3054
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_chatManager, "f").handleUpdate(update);
|
|
3055
|
+
if (ctxUpdate) {
|
|
3056
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3057
|
+
}
|
|
3058
|
+
});
|
|
3059
|
+
}
|
|
3060
|
+
if (__classPrivateFieldGet(this, _Client_pollManager, "f").canHandleUpdate(update)) {
|
|
2981
3061
|
promises.push(async () => {
|
|
2982
3062
|
const ctxUpdate = await __classPrivateFieldGet(this, _Client_pollManager, "f").handleUpdate(update);
|
|
2983
3063
|
if (ctxUpdate) {
|
|
@@ -2985,16 +3065,21 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
2985
3065
|
}
|
|
2986
3066
|
});
|
|
2987
3067
|
}
|
|
2988
|
-
if (
|
|
2989
|
-
promises.push(async () =>
|
|
3068
|
+
if (__classPrivateFieldGet(this, _Client_videoChatManager, "f").canHandleUpdate(update)) {
|
|
3069
|
+
promises.push(async () => {
|
|
3070
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_videoChatManager, "f").handleUpdate(update);
|
|
3071
|
+
if (ctxUpdate) {
|
|
3072
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3073
|
+
}
|
|
3074
|
+
});
|
|
2990
3075
|
}
|
|
2991
|
-
if (
|
|
3076
|
+
if (__classPrivateFieldGet(this, _Client_callbackQueryManager, "f").canHandleUpdate(update)) {
|
|
2992
3077
|
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").handleUpdate(update)));
|
|
2993
3078
|
}
|
|
2994
|
-
if (
|
|
3079
|
+
if (__classPrivateFieldGet(this, _Client_inlineQueryManager, "f").canHandleUpdate(update)) {
|
|
2995
3080
|
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").handleUpdate(update)));
|
|
2996
3081
|
}
|
|
2997
|
-
if (
|
|
3082
|
+
if (__classPrivateFieldGet(this, _Client_reactionManager, "f").canHandleUpdate(update)) {
|
|
2998
3083
|
promises.push(async () => {
|
|
2999
3084
|
const upd = await __classPrivateFieldGet(this, _Client_reactionManager, "f").handleUpdate(update);
|
|
3000
3085
|
if (upd) {
|
|
@@ -3002,20 +3087,44 @@ _a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(up
|
|
|
3002
3087
|
}
|
|
3003
3088
|
});
|
|
3004
3089
|
}
|
|
3005
|
-
if (
|
|
3090
|
+
if (__classPrivateFieldGet(this, _Client_chatListManager, "f").canHandleUpdate(update)) {
|
|
3006
3091
|
promises.push(() => __classPrivateFieldGet(this, _Client_chatListManager, "f").handleUpdate(update));
|
|
3007
3092
|
}
|
|
3008
|
-
if (
|
|
3093
|
+
if (__classPrivateFieldGet(this, _Client_storyManager, "f").canHandleUpdate(update)) {
|
|
3009
3094
|
promises.push(async () => {
|
|
3010
|
-
const
|
|
3011
|
-
if (
|
|
3012
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this,
|
|
3095
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_storyManager, "f").handleUpdate(update);
|
|
3096
|
+
if (ctxUpdate) {
|
|
3097
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3013
3098
|
}
|
|
3014
3099
|
});
|
|
3015
3100
|
}
|
|
3016
|
-
if (
|
|
3101
|
+
if (__classPrivateFieldGet(this, _Client_businessConnectionManager, "f").canHandleUpdate(update)) {
|
|
3017
3102
|
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_businessConnectionManager, "f").handleUpdate(update)));
|
|
3018
3103
|
}
|
|
3104
|
+
if (__classPrivateFieldGet(this, _Client_storyManager, "f").canHandleUpdate(update)) {
|
|
3105
|
+
promises.push(async () => {
|
|
3106
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_storyManager, "f").handleUpdate(update);
|
|
3107
|
+
if (ctxUpdate) {
|
|
3108
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3109
|
+
}
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3112
|
+
if (__classPrivateFieldGet(this, _Client_paymentManager, "f").canHandleUpdate(update)) {
|
|
3113
|
+
promises.push(async () => {
|
|
3114
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_paymentManager, "f").handleUpdate(update);
|
|
3115
|
+
if (ctxUpdate) {
|
|
3116
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3117
|
+
}
|
|
3118
|
+
});
|
|
3119
|
+
}
|
|
3120
|
+
if (__classPrivateFieldGet(this, _Client_translationsManager, "f").canHandleUpdate(update)) {
|
|
3121
|
+
promises.push(async () => {
|
|
3122
|
+
const ctxUpdate = await __classPrivateFieldGet(this, _Client_translationsManager, "f").handleUpdate(update);
|
|
3123
|
+
if (ctxUpdate) {
|
|
3124
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, ctxUpdate);
|
|
3125
|
+
}
|
|
3126
|
+
});
|
|
3127
|
+
}
|
|
3019
3128
|
return () => Promise.all(promises.map((v) => v()));
|
|
3020
3129
|
}, _Client_getMe = async function _Client_getMe() {
|
|
3021
3130
|
if (__classPrivateFieldGet(this, _Client_lastGetMe, "f") != null) {
|
|
@@ -12,7 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
12
12
|
var _ConnectionWebSocket_instances, _ConnectionWebSocket_url, _ConnectionWebSocket_webSocket, _ConnectionWebSocket_rMutex, _ConnectionWebSocket_wMutex, _ConnectionWebSocket_buffer, _ConnectionWebSocket_nextResolve, _ConnectionWebSocket_initWs, _ConnectionWebSocket_isConnecting, _ConnectionWebSocket_assertConnected, _ConnectionWebSocket_rejectRead;
|
|
13
13
|
/**
|
|
14
14
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
15
|
-
* Copyright (C) 2023-
|
|
15
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
16
16
|
*
|
|
17
17
|
* This file is part of MTKruto.
|
|
18
18
|
*
|
package/esm/mod.d.ts
CHANGED
package/esm/mod.js
CHANGED