@mtkruto/node 0.68.0 → 0.70.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 +14 -12
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +16 -14
- package/esm/3_types.d.ts +36 -33
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +36 -33
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.d.ts.map +1 -1
- package/esm/4_errors.d.ts +2 -2
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/_dnt.polyfills.d.ts +7 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +109 -0
- package/esm/client/0_abortable_loop.d.ts +27 -0
- package/esm/client/0_abortable_loop.d.ts.map +1 -0
- package/esm/client/0_abortable_loop.js +49 -0
- package/esm/client/0_client_abstract.d.ts +3 -3
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_filters.d.ts +10 -4
- package/esm/client/0_filters.d.ts.map +1 -1
- package/esm/client/0_filters.js +6 -3
- package/esm/client/0_html.d.ts +1 -1
- package/esm/client/0_html.d.ts.map +1 -1
- package/esm/client/0_html.js +1 -1
- package/esm/client/0_markdown.d.ts +1 -1
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +8 -8
- package/esm/client/0_params.d.ts +42 -8
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.d.ts +2 -2
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +1 -1
- package/esm/client/0_storage_operations.d.ts +55 -73
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +254 -251
- package/esm/client/0_update_processor.d.ts +4 -4
- package/esm/client/0_update_processor.d.ts.map +1 -1
- package/esm/client/0_utilities.d.ts +2 -2
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +8 -8
- package/esm/client/1_client_plain.d.ts +3 -3
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +2 -2
- package/esm/client/1_composer.d.ts +3 -3
- package/esm/client/1_composer.d.ts.map +1 -1
- package/esm/client/1_composer.js +7 -7
- package/esm/client/1_types.d.ts +5 -5
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_account_manager.d.ts +3 -3
- package/esm/client/2_account_manager.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +7 -7
- package/esm/client/2_bot_info_manager.d.ts +3 -3
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.d.ts +4 -4
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +3 -3
- package/esm/client/2_client_encrypted.d.ts +3 -3
- package/esm/client/2_client_encrypted.d.ts.map +1 -1
- package/esm/client/2_file_manager.d.ts +3 -3
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +45 -31
- package/esm/client/2_network_statistics_manager.d.ts +1 -1
- package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.d.ts +5 -5
- 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 -4
- 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 +5 -5
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +20 -16
- package/esm/client/2_update_manager.d.ts +6 -4
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +76 -94
- package/esm/client/3_client_encrypted_pool.d.ts +1 -1
- package/esm/client/3_client_encrypted_pool.d.ts.map +1 -1
- package/esm/client/3_message_manager.d.ts +12 -9
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +166 -45
- package/esm/client/3_video_chat_manager.d.ts +6 -6
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +7 -7
- package/esm/client/4_callback_query_manager.d.ts +6 -6
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +3 -3
- package/esm/client/4_chat_list_manager.d.ts +8 -9
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +18 -273
- package/esm/client/4_chat_manager.d.ts +9 -9
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +11 -11
- package/esm/client/4_forum_manager.d.ts +4 -4
- package/esm/client/4_forum_manager.d.ts.map +1 -1
- package/esm/client/4_gift_manager.d.ts +4 -4
- package/esm/client/4_gift_manager.d.ts.map +1 -1
- package/esm/client/4_gift_manager.js +4 -4
- package/esm/client/4_inline_query_manager.d.ts +6 -6
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +4 -4
- package/esm/client/4_link_preview_manager.d.ts +6 -6
- package/esm/client/4_link_preview_manager.d.ts.map +1 -1
- package/esm/client/4_link_preview_manager.js +3 -3
- package/esm/client/4_poll_manager.d.ts +5 -5
- 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 +8 -8
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +9 -9
- package/esm/client/5_client.d.ts +41 -23
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +476 -411
- package/esm/connection/0_connection.d.ts +1 -1
- package/esm/connection/0_connection.d.ts.map +1 -1
- package/esm/connection/1_connection_tcp.node.d.ts +1 -1
- package/esm/connection/1_connection_tcp.node.d.ts.map +1 -1
- package/esm/connection/1_connection_tcp.node.js +4 -4
- package/esm/connection/1_connection_web_socket.d.ts +1 -1
- package/esm/connection/1_connection_web_socket.d.ts.map +1 -1
- package/esm/connection/1_connection_web_socket.js +3 -3
- package/esm/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.js +20 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/abortable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/deadline.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/debounce.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/delay.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/delay.js +80 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/mux_async_iterator.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/pool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/retry.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/tee.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +69 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +140 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.js +82 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.js +109 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/_os.d.ts +2 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/_os.js +12 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/os.d.ts +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/os.js +5 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/basename.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/extname.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/is_absolute.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/join.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/to_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/streams/1.0.11/to_array_buffer.d.ts.map +1 -0
- package/esm/session/1_session.d.ts +2 -2
- package/esm/session/1_session.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.d.ts +3 -3
- package/esm/session/2_session_encrypted.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.js +76 -77
- package/esm/session/2_session_plain.js +1 -1
- package/esm/storage/0_storage.d.ts +2 -1
- package/esm/storage/0_storage.d.ts.map +1 -1
- package/esm/storage/1_utilities.d.ts +14 -11
- package/esm/storage/1_utilities.d.ts.map +1 -1
- package/esm/storage/1_utilities.js +17 -17
- package/esm/storage/2_storage_indexed_db.d.ts +2 -1
- package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.js +6 -3
- package/esm/storage/2_storage_local_storage.node.d.ts +2 -1
- package/esm/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.node.js +6 -3
- package/esm/storage/2_storage_memory.d.ts +3 -2
- package/esm/storage/2_storage_memory.d.ts.map +1 -1
- package/esm/storage/2_storage_memory.js +5 -2
- package/esm/storage/2_storage_session_storage.d.ts +3 -2
- package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_session_storage.js +6 -3
- package/esm/tl/0_utilities.d.ts +1 -0
- package/esm/tl/0_utilities.d.ts.map +1 -1
- package/esm/tl/0_utilities.js +21 -2
- package/esm/tl/1_telegram_api.d.ts +810 -254
- package/esm/tl/1_telegram_api.d.ts.map +1 -1
- package/esm/tl/1_telegram_api.js +912 -213
- package/esm/tl/1_tl_reader.d.ts +3 -3
- package/esm/tl/1_tl_reader.d.ts.map +1 -1
- package/esm/tl/1_tl_reader.js +8 -8
- package/esm/tl/1_tl_writer.d.ts +3 -3
- package/esm/tl/1_tl_writer.d.ts.map +1 -1
- package/esm/tl/1_tl_writer.js +6 -6
- package/esm/tl/1_utilities.d.ts +1 -1
- package/esm/tl/1_utilities.d.ts.map +1 -1
- package/esm/tl/1_utilities.js +2 -2
- package/esm/tl/2_message.js +1 -1
- package/esm/tl/2_mtproto.d.ts +2 -2
- package/esm/tl/2_mtproto.d.ts.map +1 -1
- package/esm/tl/2_telegram.d.ts +1 -1
- package/esm/tl/2_telegram.d.ts.map +1 -1
- package/esm/transport/0_obfuscation.d.ts +1 -1
- package/esm/transport/0_obfuscation.d.ts.map +1 -1
- package/esm/transport/0_obfuscation.js +2 -2
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.d.ts.map +1 -1
- package/esm/transport/1_transport_abridged.d.ts +1 -1
- package/esm/transport/1_transport_abridged.d.ts.map +1 -1
- package/esm/transport/1_transport_intermediate.d.ts +1 -1
- package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
- package/esm/transport/1_transport_provider.d.ts +2 -2
- package/esm/transport/1_transport_provider.d.ts.map +1 -1
- package/esm/transport/2_transport_provider_tcp.d.ts +1 -1
- package/esm/transport/2_transport_provider_tcp.d.ts.map +1 -1
- package/esm/transport/2_transport_provider_web_socket.d.ts +1 -1
- package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -1
- package/esm/transport/2_transport_provider_web_socket.js +1 -1
- package/esm/types/0_birthday.d.ts +1 -1
- package/esm/types/0_birthday.d.ts.map +1 -1
- package/esm/types/0_callback_query_answer.d.ts +1 -1
- package/esm/types/0_callback_query_answer.d.ts.map +1 -1
- package/esm/types/0_callback_query_question.js +2 -2
- package/esm/types/0_chat_administrator_rights.d.ts +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_member_rights.d.ts +1 -1
- package/esm/types/0_chat_member_rights.d.ts.map +1 -1
- package/esm/types/0_contact.d.ts +1 -1
- package/esm/types/0_contact.d.ts.map +1 -1
- package/esm/types/0_dice.d.ts +1 -1
- package/esm/types/0_dice.d.ts.map +1 -1
- package/esm/types/0_failed_invitation.d.ts +1 -1
- package/esm/types/0_failed_invitation.d.ts.map +1 -1
- package/esm/types/0_file_source.d.ts +1 -1
- package/esm/types/0_file_source.d.ts.map +1 -1
- package/esm/types/0_invoice.d.ts +1 -1
- package/esm/types/0_invoice.d.ts.map +1 -1
- package/esm/types/0_live_stream_channel.d.ts +1 -1
- package/esm/types/0_live_stream_channel.d.ts.map +1 -1
- package/esm/types/0_mask_position.d.ts +1 -1
- package/esm/types/0_mask_position.d.ts.map +1 -1
- package/esm/types/0_mask_position.js +1 -1
- package/esm/types/0_message_search_filter.d.ts +1 -1
- package/esm/types/0_message_search_filter.d.ts.map +1 -1
- package/esm/types/0_opening_hours.d.ts +1 -1
- package/esm/types/0_opening_hours.d.ts.map +1 -1
- package/esm/types/0_reaction.js +5 -5
- package/esm/types/0_refunded_payment.d.ts +1 -1
- package/esm/types/0_refunded_payment.d.ts.map +1 -1
- package/esm/types/0_restriction_reason.d.ts +1 -1
- package/esm/types/0_restriction_reason.d.ts.map +1 -1
- package/esm/types/0_self_destruct_option.js +3 -3
- package/esm/types/0_shipping_address.d.ts +1 -1
- package/esm/types/0_shipping_address.d.ts.map +1 -1
- package/esm/types/0_slow_mode_duration.js +2 -2
- package/esm/types/0_voice.d.ts +1 -1
- package/esm/types/0_voice.d.ts.map +1 -1
- package/esm/types/0_voice_transcription.d.ts +1 -1
- package/esm/types/0_voice_transcription.d.ts.map +1 -1
- package/esm/types/1_animation.d.ts +1 -1
- package/esm/types/1_animation.d.ts.map +1 -1
- package/esm/types/1_audio.d.ts +1 -1
- package/esm/types/1_audio.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.d.ts +2 -2
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_chat_p.d.ts +12 -2
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +6 -2
- package/esm/types/1_document.d.ts +1 -1
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_giveaway.d.ts +2 -2
- package/esm/types/1_giveaway.d.ts.map +1 -1
- package/esm/types/1_inline_keyboard_button.d.ts +3 -3
- package/esm/types/1_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_inline_keyboard_button.js +4 -4
- package/esm/types/1_inline_query_result_button.d.ts +1 -1
- package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
- package/esm/types/1_input_story_content.d.ts +1 -1
- package/esm/types/1_input_story_content.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +3 -3
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +1 -1
- package/esm/types/1_message_reaction.d.ts +1 -1
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +2 -2
- package/esm/types/1_mini_app_info.d.ts +2 -2
- package/esm/types/1_mini_app_info.d.ts.map +1 -1
- package/esm/types/1_network_statistics.d.ts +1 -1
- package/esm/types/1_network_statistics.d.ts.map +1 -1
- package/esm/types/1_order_info.d.ts +2 -2
- package/esm/types/1_order_info.d.ts.map +1 -1
- package/esm/types/1_photo.d.ts +1 -1
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_reaction_count.d.ts +2 -2
- package/esm/types/1_reaction_count.d.ts.map +1 -1
- package/esm/types/1_sticker.d.ts +3 -3
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +2 -2
- package/esm/types/1_story_reaction.d.ts +2 -2
- package/esm/types/1_story_reaction.d.ts.map +1 -1
- package/esm/types/1_venue.d.ts +1 -1
- package/esm/types/1_venue.d.ts.map +1 -1
- package/esm/types/1_video.d.ts +1 -1
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video_note.d.ts +1 -1
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/2_chat.d.ts +6 -9
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +10 -15
- package/esm/types/2_inactive_chat.d.ts +1 -1
- package/esm/types/2_inactive_chat.d.ts.map +1 -1
- package/esm/types/2_message_entity.d.ts +139 -0
- package/esm/types/2_message_entity.d.ts.map +1 -0
- package/esm/types/2_message_entity.js +183 -0
- package/esm/types/2_message_interactions.d.ts +1 -1
- package/esm/types/2_message_interactions.d.ts.map +1 -1
- package/esm/types/2_message_reaction_count.d.ts +4 -5
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reaction_count.js +4 -6
- package/esm/types/2_poll_answer.d.ts +3 -4
- package/esm/types/2_poll_answer.d.ts.map +1 -1
- package/esm/types/2_poll_answer.js +4 -5
- package/esm/types/2_reply_markup.d.ts +3 -3
- package/esm/types/2_reply_markup.d.ts.map +1 -1
- package/esm/types/2_sticker_set.d.ts +51 -0
- package/esm/types/2_sticker_set.d.ts.map +1 -0
- package/esm/types/2_sticker_set.js +91 -0
- package/esm/types/2_story_content.d.ts +2 -2
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_interactions.d.ts +2 -2
- package/esm/types/2_story_interactions.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.d.ts +6 -6
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +2 -2
- package/esm/types/2_story_privacy.d.ts +46 -0
- package/esm/types/2_story_privacy.d.ts.map +1 -0
- package/esm/types/2_story_privacy.js +76 -0
- package/esm/types/2_successful_payment.d.ts +2 -2
- package/esm/types/2_successful_payment.d.ts.map +1 -1
- package/esm/types/2_user.d.ts +65 -0
- package/esm/types/2_user.d.ts.map +1 -0
- package/esm/types/2_user.js +73 -0
- package/esm/types/3_business_connection.d.ts +37 -0
- package/esm/types/3_business_connection.d.ts.map +1 -0
- package/esm/types/3_business_connection.js +36 -0
- package/esm/types/3_chat_member.d.ts +70 -0
- package/esm/types/3_chat_member.d.ts.map +1 -0
- package/esm/types/3_chat_member.js +114 -0
- package/esm/types/3_chat_settings.d.ts +46 -0
- package/esm/types/3_chat_settings.d.ts.map +1 -0
- package/esm/types/3_chat_settings.js +51 -0
- package/esm/types/3_chosen_inline_result.d.ts +38 -0
- package/esm/types/3_chosen_inline_result.d.ts.map +1 -0
- package/esm/types/3_chosen_inline_result.js +37 -0
- package/esm/types/3_forward_header.d.ts +58 -0
- package/esm/types/3_forward_header.d.ts.map +1 -0
- package/esm/types/3_forward_header.js +73 -0
- package/esm/types/3_game.d.ts +40 -0
- package/esm/types/3_game.d.ts.map +1 -0
- package/esm/types/3_gift_upgraded_component.d.ts +95 -0
- package/esm/types/3_gift_upgraded_component.d.ts.map +1 -0
- package/esm/types/3_gift_upgraded_component.js +88 -0
- package/esm/types/3_inline_query.d.ts +40 -0
- package/esm/types/3_inline_query.d.ts.map +1 -0
- package/esm/types/3_inline_query.js +60 -0
- package/esm/types/3_input_media.d.ts +122 -0
- package/esm/types/3_input_media.d.ts.map +1 -0
- package/esm/types/3_invite_link.d.ts +47 -0
- package/esm/types/3_invite_link.d.ts.map +1 -0
- package/esm/types/3_invite_link.js +48 -0
- package/esm/types/3_message_reactions.d.ts +42 -0
- package/esm/types/3_message_reactions.d.ts.map +1 -0
- package/esm/types/3_message_reactions.js +54 -0
- package/esm/types/3_poll_option.d.ts +34 -0
- package/esm/types/3_poll_option.d.ts.map +1 -0
- package/esm/types/3_poll_option.js +29 -0
- package/esm/types/3_pre_checkout_query.d.ts +34 -0
- package/esm/types/3_pre_checkout_query.d.ts.map +1 -0
- package/esm/types/3_pre_checkout_query.js +39 -0
- package/esm/types/3_reply_quote.d.ts +32 -0
- package/esm/types/3_reply_quote.d.ts.map +1 -0
- package/esm/types/3_reply_quote.js +30 -0
- package/esm/types/3_story.d.ts +8 -9
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/3_story.js +6 -7
- package/esm/types/4_chat_member_updated.d.ts +43 -0
- package/esm/types/4_chat_member_updated.d.ts.map +1 -0
- package/esm/types/4_chat_member_updated.js +52 -0
- package/esm/types/4_gift.d.ts +94 -0
- package/esm/types/4_gift.d.ts.map +1 -0
- package/esm/types/4_gift.js +105 -0
- package/esm/types/4_join_request.d.ts +39 -0
- package/esm/types/4_join_request.d.ts.map +1 -0
- package/esm/types/4_join_request.js +62 -0
- package/esm/types/4_poll.d.ts +55 -0
- package/esm/types/4_poll.d.ts.map +1 -0
- package/esm/types/4_poll.js +43 -0
- package/esm/types/4_reply_to.d.ts +35 -0
- package/esm/types/4_reply_to.d.ts.map +1 -0
- package/esm/types/5_claimed_gift.d.ts +44 -0
- package/esm/types/5_claimed_gift.d.ts.map +1 -0
- package/esm/types/5_claimed_gift.js +48 -0
- package/esm/types/5_link_preview.d.ts +188 -0
- package/esm/types/5_link_preview.d.ts.map +1 -0
- package/esm/types/5_link_preview.js +218 -0
- package/esm/types/6_claimed_gifts.d.ts +33 -0
- package/esm/types/6_claimed_gifts.d.ts.map +1 -0
- package/esm/types/6_claimed_gifts.js +43 -0
- package/esm/types/6_message.d.ts +616 -0
- package/esm/types/6_message.d.ts.map +1 -0
- package/esm/types/6_message.js +520 -0
- package/esm/types/6_message_content.d.ts +119 -0
- package/esm/types/6_message_content.d.ts.map +1 -0
- package/esm/types/7_callback_query.d.ts +43 -0
- package/esm/types/7_callback_query.d.ts.map +1 -0
- package/esm/types/7_callback_query.js +59 -0
- package/esm/types/7_chat_list_item.d.ts +35 -0
- package/esm/types/7_chat_list_item.d.ts.map +1 -0
- package/esm/types/7_chat_list_item.js +87 -0
- package/esm/types/7_inline_query_result.d.ts +251 -0
- package/esm/types/7_inline_query_result.d.ts.map +1 -0
- package/esm/types/7_inline_query_result.js +380 -0
- package/esm/types/7_saved_chat.d.ts +35 -0
- package/esm/types/7_saved_chat.d.ts.map +1 -0
- package/esm/types/7_saved_chat.js +43 -0
- package/esm/types/7_topic.d.ts +34 -0
- package/esm/types/7_topic.d.ts.map +1 -0
- package/esm/types/7_topic.js +61 -0
- package/esm/types/8_inline_query_answer.d.ts +32 -0
- package/esm/types/8_inline_query_answer.d.ts.map +1 -0
- package/esm/types/8_inline_query_answer.js +28 -0
- package/esm/types/8_saved_chats.d.ts +33 -0
- package/esm/types/8_saved_chats.d.ts.map +1 -0
- package/esm/types/8_saved_chats.js +36 -0
- package/esm/types/8_update.d.ts +528 -0
- package/esm/types/8_update.d.ts.map +1 -0
- package/esm/types/_file_id.d.ts +61 -50
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +92 -73
- package/esm/types/_getters.d.ts +3 -10
- package/esm/types/_getters.d.ts.map +1 -1
- package/esm/utilities/0_bigint.js +5 -5
- package/esm/utilities/0_buffer.js +3 -3
- package/esm/utilities/0_env.js +1 -1
- package/esm/utilities/0_hash.d.ts +2 -2
- package/esm/utilities/0_hash.d.ts.map +1 -1
- package/esm/utilities/0_misc.d.ts +1 -0
- package/esm/utilities/0_misc.d.ts.map +1 -1
- package/esm/utilities/0_misc.js +18 -4
- package/esm/utilities/0_part_stream.d.ts +1 -1
- package/esm/utilities/0_part_stream.d.ts.map +1 -1
- package/esm/utilities/0_rle.js +1 -1
- package/esm/utilities/1_auth.js +1 -1
- package/esm/utilities/1_base64.js +1 -1
- package/esm/utilities/1_logger.js +2 -2
- package/esm/utilities/1_math.js +2 -2
- package/esm/utilities/2_queue.js +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +14 -12
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +20 -15
- package/script/3_types.d.ts +36 -33
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +36 -33
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.d.ts.map +1 -1
- package/script/4_errors.d.ts +2 -2
- package/script/4_errors.d.ts.map +1 -1
- package/script/_dnt.polyfills.d.ts +7 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +109 -0
- package/script/client/0_abortable_loop.d.ts +27 -0
- package/script/client/0_abortable_loop.d.ts.map +1 -0
- package/script/client/0_abortable_loop.js +53 -0
- package/script/client/0_client_abstract.d.ts +3 -3
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_filters.d.ts +10 -4
- package/script/client/0_filters.d.ts.map +1 -1
- package/script/client/0_filters.js +6 -3
- package/script/client/0_html.d.ts +1 -1
- package/script/client/0_html.d.ts.map +1 -1
- package/script/client/0_html.js +1 -1
- package/script/client/0_markdown.d.ts +1 -1
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +8 -8
- package/script/client/0_params.d.ts +42 -8
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.d.ts +2 -2
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +1 -1
- package/script/client/0_storage_operations.d.ts +55 -73
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +252 -249
- package/script/client/0_update_processor.d.ts +4 -4
- package/script/client/0_update_processor.d.ts.map +1 -1
- package/script/client/0_utilities.d.ts +2 -2
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +8 -8
- package/script/client/1_client_plain.d.ts +3 -3
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +2 -2
- package/script/client/1_composer.d.ts +3 -3
- package/script/client/1_composer.d.ts.map +1 -1
- package/script/client/1_composer.js +7 -7
- package/script/client/1_types.d.ts +5 -5
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_account_manager.d.ts +3 -3
- package/script/client/2_account_manager.d.ts.map +1 -1
- package/script/client/2_account_manager.js +7 -7
- package/script/client/2_bot_info_manager.d.ts +3 -3
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.d.ts +4 -4
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +3 -3
- package/script/client/2_client_encrypted.d.ts +3 -3
- package/script/client/2_client_encrypted.d.ts.map +1 -1
- package/script/client/2_file_manager.d.ts +3 -3
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +45 -31
- package/script/client/2_network_statistics_manager.d.ts +1 -1
- package/script/client/2_network_statistics_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.d.ts +5 -5
- 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 -4
- 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 +5 -5
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +20 -16
- package/script/client/2_update_manager.d.ts +6 -4
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +76 -94
- package/script/client/3_client_encrypted_pool.d.ts +1 -1
- package/script/client/3_client_encrypted_pool.d.ts.map +1 -1
- package/script/client/3_message_manager.d.ts +12 -9
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +165 -44
- package/script/client/3_video_chat_manager.d.ts +6 -6
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +7 -7
- package/script/client/4_callback_query_manager.d.ts +6 -6
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +3 -3
- package/script/client/4_chat_list_manager.d.ts +8 -9
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +17 -272
- package/script/client/4_chat_manager.d.ts +9 -9
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +11 -11
- package/script/client/4_forum_manager.d.ts +4 -4
- package/script/client/4_forum_manager.d.ts.map +1 -1
- package/script/client/4_gift_manager.d.ts +4 -4
- package/script/client/4_gift_manager.d.ts.map +1 -1
- package/script/client/4_gift_manager.js +4 -4
- package/script/client/4_inline_query_manager.d.ts +6 -6
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +4 -4
- package/script/client/4_link_preview_manager.d.ts +6 -6
- package/script/client/4_link_preview_manager.d.ts.map +1 -1
- package/script/client/4_link_preview_manager.js +3 -3
- package/script/client/4_poll_manager.d.ts +5 -5
- 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 +8 -8
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +9 -9
- package/script/client/5_client.d.ts +41 -23
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +474 -409
- package/script/connection/0_connection.d.ts +1 -1
- package/script/connection/0_connection.d.ts.map +1 -1
- package/script/connection/1_connection_tcp.node.d.ts +1 -1
- package/script/connection/1_connection_tcp.node.d.ts.map +1 -1
- package/script/connection/1_connection_tcp.node.js +4 -4
- package/script/connection/1_connection_web_socket.d.ts +1 -1
- package/script/connection/1_connection_web_socket.d.ts.map +1 -1
- package/script/connection/1_connection_web_socket.js +3 -3
- package/script/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +34 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.js +23 -0
- package/script/deps/jsr.io/@std/async/1.0.14/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/abortable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/deadline.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/debounce.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/delay.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/delay.js +116 -0
- package/script/deps/jsr.io/@std/async/1.0.14/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/mux_async_iterator.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/pool.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/retry.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/tee.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +72 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +144 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.js +85 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.js +113 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/_os.d.ts +2 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/_os.js +48 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/os.d.ts +3 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/os.js +8 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/assert_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/normalize_string.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/strip_trailing_separators.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/basename.js +38 -0
- package/script/deps/jsr.io/@std/path/1.1.2/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/extname.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.2/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/is_absolute.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.2/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/join.js +32 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/to_file_url.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/streams/1.0.11/to_array_buffer.d.ts.map +1 -0
- package/script/session/1_session.d.ts +2 -2
- package/script/session/1_session.d.ts.map +1 -1
- package/script/session/2_session_encrypted.d.ts +3 -3
- package/script/session/2_session_encrypted.d.ts.map +1 -1
- package/script/session/2_session_encrypted.js +75 -76
- package/script/session/2_session_plain.js +1 -1
- package/script/storage/0_storage.d.ts +2 -1
- package/script/storage/0_storage.d.ts.map +1 -1
- package/script/storage/1_utilities.d.ts +14 -11
- package/script/storage/1_utilities.d.ts.map +1 -1
- package/script/storage/1_utilities.js +39 -39
- package/script/storage/2_storage_indexed_db.d.ts +2 -1
- package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.js +6 -3
- package/script/storage/2_storage_local_storage.node.d.ts +2 -1
- package/script/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.node.js +6 -3
- package/script/storage/2_storage_memory.d.ts +3 -2
- package/script/storage/2_storage_memory.d.ts.map +1 -1
- package/script/storage/2_storage_memory.js +5 -2
- package/script/storage/2_storage_session_storage.d.ts +3 -2
- package/script/storage/2_storage_session_storage.d.ts.map +1 -1
- package/script/storage/2_storage_session_storage.js +6 -3
- package/script/tl/0_utilities.d.ts +1 -0
- package/script/tl/0_utilities.d.ts.map +1 -1
- package/script/tl/0_utilities.js +21 -1
- package/script/tl/1_telegram_api.d.ts +810 -254
- package/script/tl/1_telegram_api.d.ts.map +1 -1
- package/script/tl/1_telegram_api.js +912 -213
- package/script/tl/1_tl_reader.d.ts +3 -3
- package/script/tl/1_tl_reader.d.ts.map +1 -1
- package/script/tl/1_tl_reader.js +8 -8
- package/script/tl/1_tl_writer.d.ts +3 -3
- package/script/tl/1_tl_writer.d.ts.map +1 -1
- package/script/tl/1_tl_writer.js +6 -6
- package/script/tl/1_utilities.d.ts +1 -1
- package/script/tl/1_utilities.d.ts.map +1 -1
- package/script/tl/1_utilities.js +2 -2
- package/script/tl/2_message.js +1 -1
- package/script/tl/2_mtproto.d.ts +2 -2
- package/script/tl/2_mtproto.d.ts.map +1 -1
- package/script/tl/2_telegram.d.ts +1 -1
- package/script/tl/2_telegram.d.ts.map +1 -1
- package/script/transport/0_obfuscation.d.ts +1 -1
- package/script/transport/0_obfuscation.d.ts.map +1 -1
- package/script/transport/0_obfuscation.js +2 -2
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.d.ts.map +1 -1
- package/script/transport/1_transport_abridged.d.ts +1 -1
- package/script/transport/1_transport_abridged.d.ts.map +1 -1
- package/script/transport/1_transport_intermediate.d.ts +1 -1
- package/script/transport/1_transport_intermediate.d.ts.map +1 -1
- package/script/transport/1_transport_provider.d.ts +2 -2
- package/script/transport/1_transport_provider.d.ts.map +1 -1
- package/script/transport/2_transport_provider_tcp.d.ts +1 -1
- package/script/transport/2_transport_provider_tcp.d.ts.map +1 -1
- package/script/transport/2_transport_provider_web_socket.d.ts +1 -1
- package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -1
- package/script/transport/2_transport_provider_web_socket.js +1 -1
- package/script/types/0_birthday.d.ts +1 -1
- package/script/types/0_birthday.d.ts.map +1 -1
- package/script/types/0_callback_query_answer.d.ts +1 -1
- package/script/types/0_callback_query_answer.d.ts.map +1 -1
- package/script/types/0_callback_query_question.js +2 -2
- package/script/types/0_chat_administrator_rights.d.ts +1 -1
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_member_rights.d.ts +1 -1
- package/script/types/0_chat_member_rights.d.ts.map +1 -1
- package/script/types/0_contact.d.ts +1 -1
- package/script/types/0_contact.d.ts.map +1 -1
- package/script/types/0_dice.d.ts +1 -1
- package/script/types/0_dice.d.ts.map +1 -1
- package/script/types/0_failed_invitation.d.ts +1 -1
- package/script/types/0_failed_invitation.d.ts.map +1 -1
- package/script/types/0_file_source.d.ts +1 -1
- package/script/types/0_file_source.d.ts.map +1 -1
- package/script/types/0_invoice.d.ts +1 -1
- package/script/types/0_invoice.d.ts.map +1 -1
- package/script/types/0_live_stream_channel.d.ts +1 -1
- package/script/types/0_live_stream_channel.d.ts.map +1 -1
- package/script/types/0_mask_position.d.ts +1 -1
- package/script/types/0_mask_position.d.ts.map +1 -1
- package/script/types/0_mask_position.js +1 -1
- package/script/types/0_message_search_filter.d.ts +1 -1
- package/script/types/0_message_search_filter.d.ts.map +1 -1
- package/script/types/0_opening_hours.d.ts +1 -1
- package/script/types/0_opening_hours.d.ts.map +1 -1
- package/script/types/0_reaction.js +5 -5
- package/script/types/0_refunded_payment.d.ts +1 -1
- package/script/types/0_refunded_payment.d.ts.map +1 -1
- package/script/types/0_restriction_reason.d.ts +1 -1
- package/script/types/0_restriction_reason.d.ts.map +1 -1
- package/script/types/0_self_destruct_option.js +3 -3
- package/script/types/0_shipping_address.d.ts +1 -1
- package/script/types/0_shipping_address.d.ts.map +1 -1
- package/script/types/0_slow_mode_duration.js +2 -2
- package/script/types/0_voice.d.ts +1 -1
- package/script/types/0_voice.d.ts.map +1 -1
- package/script/types/0_voice_transcription.d.ts +1 -1
- package/script/types/0_voice_transcription.d.ts.map +1 -1
- package/script/types/1_animation.d.ts +1 -1
- package/script/types/1_animation.d.ts.map +1 -1
- package/script/types/1_audio.d.ts +1 -1
- package/script/types/1_audio.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.d.ts +2 -2
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_chat_p.d.ts +12 -2
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +7 -2
- package/script/types/1_document.d.ts +1 -1
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_giveaway.d.ts +2 -2
- package/script/types/1_giveaway.d.ts.map +1 -1
- package/script/types/1_inline_keyboard_button.d.ts +3 -3
- package/script/types/1_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/1_inline_keyboard_button.js +4 -4
- package/script/types/1_inline_query_result_button.d.ts +1 -1
- package/script/types/1_inline_query_result_button.d.ts.map +1 -1
- package/script/types/1_input_story_content.d.ts +1 -1
- package/script/types/1_input_story_content.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +3 -3
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +1 -1
- package/script/types/1_message_reaction.d.ts +1 -1
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +2 -2
- package/script/types/1_mini_app_info.d.ts +2 -2
- package/script/types/1_mini_app_info.d.ts.map +1 -1
- package/script/types/1_network_statistics.d.ts +1 -1
- package/script/types/1_network_statistics.d.ts.map +1 -1
- package/script/types/1_order_info.d.ts +2 -2
- package/script/types/1_order_info.d.ts.map +1 -1
- package/script/types/1_photo.d.ts +1 -1
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_reaction_count.d.ts +2 -2
- package/script/types/1_reaction_count.d.ts.map +1 -1
- package/script/types/1_sticker.d.ts +3 -3
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +2 -2
- package/script/types/1_story_reaction.d.ts +2 -2
- package/script/types/1_story_reaction.d.ts.map +1 -1
- package/script/types/1_venue.d.ts +1 -1
- package/script/types/1_venue.d.ts.map +1 -1
- package/script/types/1_video.d.ts +1 -1
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video_note.d.ts +1 -1
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/2_chat.d.ts +6 -9
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +10 -15
- package/script/types/2_inactive_chat.d.ts +1 -1
- package/script/types/2_inactive_chat.d.ts.map +1 -1
- package/script/types/2_message_entity.d.ts +139 -0
- package/script/types/2_message_entity.d.ts.map +1 -0
- package/script/types/2_message_entity.js +188 -0
- package/script/types/2_message_interactions.d.ts +1 -1
- package/script/types/2_message_interactions.d.ts.map +1 -1
- package/script/types/2_message_reaction_count.d.ts +4 -5
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reaction_count.js +4 -6
- package/script/types/2_poll_answer.d.ts +3 -4
- package/script/types/2_poll_answer.d.ts.map +1 -1
- package/script/types/2_poll_answer.js +4 -5
- package/script/types/2_reply_markup.d.ts +3 -3
- package/script/types/2_reply_markup.d.ts.map +1 -1
- package/script/types/2_sticker_set.d.ts +51 -0
- package/script/types/2_sticker_set.d.ts.map +1 -0
- package/script/types/2_sticker_set.js +94 -0
- package/script/types/2_story_content.d.ts +2 -2
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_interactions.d.ts +2 -2
- package/script/types/2_story_interactions.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.d.ts +6 -6
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +2 -2
- package/script/types/2_story_privacy.d.ts +46 -0
- package/script/types/2_story_privacy.d.ts.map +1 -0
- package/script/types/2_story_privacy.js +80 -0
- package/script/types/2_successful_payment.d.ts +2 -2
- package/script/types/2_successful_payment.d.ts.map +1 -1
- package/script/types/2_user.d.ts +65 -0
- package/script/types/2_user.d.ts.map +1 -0
- package/script/types/2_user.js +77 -0
- package/script/types/3_business_connection.d.ts +37 -0
- package/script/types/3_business_connection.d.ts.map +1 -0
- package/script/types/3_business_connection.js +39 -0
- package/script/types/3_chat_member.d.ts +70 -0
- package/script/types/3_chat_member.d.ts.map +1 -0
- package/script/types/3_chat_member.js +117 -0
- package/script/types/3_chat_settings.d.ts +46 -0
- package/script/types/3_chat_settings.d.ts.map +1 -0
- package/script/types/3_chat_settings.js +54 -0
- package/script/types/3_chosen_inline_result.d.ts +38 -0
- package/script/types/3_chosen_inline_result.d.ts.map +1 -0
- package/script/types/3_chosen_inline_result.js +40 -0
- package/script/types/3_forward_header.d.ts +58 -0
- package/script/types/3_forward_header.d.ts.map +1 -0
- package/script/types/3_forward_header.js +76 -0
- package/script/types/3_game.d.ts +40 -0
- package/script/types/3_game.d.ts.map +1 -0
- package/script/types/3_gift_upgraded_component.d.ts +95 -0
- package/script/types/3_gift_upgraded_component.d.ts.map +1 -0
- package/script/types/3_gift_upgraded_component.js +91 -0
- package/script/types/3_inline_query.d.ts +40 -0
- package/script/types/3_inline_query.d.ts.map +1 -0
- package/script/types/3_inline_query.js +63 -0
- package/script/types/3_input_media.d.ts +122 -0
- package/script/types/3_input_media.d.ts.map +1 -0
- package/script/types/3_invite_link.d.ts +47 -0
- package/script/types/3_invite_link.d.ts.map +1 -0
- package/script/types/3_invite_link.js +51 -0
- package/script/types/3_message_reactions.d.ts +42 -0
- package/script/types/3_message_reactions.d.ts.map +1 -0
- package/script/types/3_message_reactions.js +57 -0
- package/script/types/3_poll_option.d.ts +34 -0
- package/script/types/3_poll_option.d.ts.map +1 -0
- package/script/types/3_poll_option.js +32 -0
- package/script/types/3_pre_checkout_query.d.ts +34 -0
- package/script/types/3_pre_checkout_query.d.ts.map +1 -0
- package/script/types/3_pre_checkout_query.js +42 -0
- package/script/types/3_reply_quote.d.ts +32 -0
- package/script/types/3_reply_quote.d.ts.map +1 -0
- package/script/types/3_reply_quote.js +33 -0
- package/script/types/3_story.d.ts +8 -9
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/3_story.js +8 -9
- package/script/types/4_chat_member_updated.d.ts +43 -0
- package/script/types/4_chat_member_updated.d.ts.map +1 -0
- package/script/types/4_chat_member_updated.js +55 -0
- package/script/types/4_gift.d.ts +94 -0
- package/script/types/4_gift.d.ts.map +1 -0
- package/script/types/4_gift.js +110 -0
- package/script/types/4_join_request.d.ts +39 -0
- package/script/types/4_join_request.d.ts.map +1 -0
- package/script/types/4_join_request.js +66 -0
- package/script/types/4_poll.d.ts +55 -0
- package/script/types/4_poll.d.ts.map +1 -0
- package/script/types/4_poll.js +46 -0
- package/script/types/4_reply_to.d.ts +35 -0
- package/script/types/4_reply_to.d.ts.map +1 -0
- package/script/types/5_claimed_gift.d.ts +44 -0
- package/script/types/5_claimed_gift.d.ts.map +1 -0
- package/script/types/5_claimed_gift.js +51 -0
- package/script/types/5_link_preview.d.ts +188 -0
- package/script/types/5_link_preview.d.ts.map +1 -0
- package/script/types/5_link_preview.js +221 -0
- package/script/types/6_claimed_gifts.d.ts +33 -0
- package/script/types/6_claimed_gifts.d.ts.map +1 -0
- package/script/types/6_claimed_gifts.js +46 -0
- package/script/types/6_message.d.ts +616 -0
- package/script/types/6_message.d.ts.map +1 -0
- package/script/types/6_message.js +525 -0
- package/script/types/6_message_content.d.ts +119 -0
- package/script/types/6_message_content.d.ts.map +1 -0
- package/script/types/7_callback_query.d.ts +43 -0
- package/script/types/7_callback_query.d.ts.map +1 -0
- package/script/types/7_callback_query.js +63 -0
- package/script/types/7_chat_list_item.d.ts +35 -0
- package/script/types/7_chat_list_item.d.ts.map +1 -0
- package/script/types/7_chat_list_item.js +94 -0
- package/script/types/7_inline_query_result.d.ts +251 -0
- package/script/types/7_inline_query_result.d.ts.map +1 -0
- package/script/types/7_inline_query_result.js +384 -0
- package/script/types/7_saved_chat.d.ts +35 -0
- package/script/types/7_saved_chat.d.ts.map +1 -0
- package/script/types/7_saved_chat.js +46 -0
- package/script/types/7_topic.d.ts +34 -0
- package/script/types/7_topic.d.ts.map +1 -0
- package/script/types/7_topic.js +64 -0
- package/script/types/8_inline_query_answer.d.ts +32 -0
- package/script/types/8_inline_query_answer.d.ts.map +1 -0
- package/script/types/8_inline_query_answer.js +31 -0
- package/script/types/8_saved_chats.d.ts +33 -0
- package/script/types/8_saved_chats.d.ts.map +1 -0
- package/script/types/8_saved_chats.js +39 -0
- package/script/types/8_update.d.ts +528 -0
- package/script/types/8_update.d.ts.map +1 -0
- package/script/types/_file_id.d.ts +61 -50
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +155 -136
- package/script/types/_getters.d.ts +3 -10
- package/script/types/_getters.d.ts.map +1 -1
- package/script/utilities/0_bigint.js +5 -5
- package/script/utilities/0_buffer.js +3 -3
- package/script/utilities/0_env.js +1 -1
- package/script/utilities/0_hash.d.ts +2 -2
- package/script/utilities/0_hash.d.ts.map +1 -1
- package/script/utilities/0_misc.d.ts +1 -0
- package/script/utilities/0_misc.d.ts.map +1 -1
- package/script/utilities/0_misc.js +18 -3
- package/script/utilities/0_part_stream.d.ts +1 -1
- package/script/utilities/0_part_stream.d.ts.map +1 -1
- package/script/utilities/0_rle.js +1 -1
- package/script/utilities/1_auth.js +1 -1
- package/script/utilities/1_base64.js +1 -1
- package/script/utilities/1_logger.js +2 -2
- package/script/utilities/1_math.js +2 -2
- package/script/utilities/2_queue.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/abortable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/deadline.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/debounce.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/delay.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/delay.js +0 -65
- package/esm/deps/jsr.io/@std/async/1.0.13/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/pool.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/retry.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/tee.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/assert_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/normalize_string.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/strip_trailing_separators.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_os.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_os.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/basename.js +0 -35
- package/esm/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/extname.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.0/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/is_absolute.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/join.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/to_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +0 -1
- package/esm/types/0_message_entity.d.ts +0 -139
- package/esm/types/0_message_entity.d.ts.map +0 -1
- package/esm/types/0_message_entity.js +0 -183
- package/esm/types/1_input_media.d.ts +0 -122
- package/esm/types/1_input_media.d.ts.map +0 -1
- package/esm/types/1_poll_option.d.ts +0 -34
- package/esm/types/1_poll_option.d.ts.map +0 -1
- package/esm/types/1_poll_option.js +0 -29
- package/esm/types/1_reply_quote.d.ts +0 -32
- package/esm/types/1_reply_quote.d.ts.map +0 -1
- package/esm/types/1_reply_quote.js +0 -30
- package/esm/types/1_story_privacy.d.ts +0 -46
- package/esm/types/1_story_privacy.d.ts.map +0 -1
- package/esm/types/1_story_privacy.js +0 -76
- package/esm/types/1_user.d.ts +0 -61
- package/esm/types/1_user.d.ts.map +0 -1
- package/esm/types/1_user.js +0 -49
- package/esm/types/2_business_connection.d.ts +0 -37
- package/esm/types/2_business_connection.d.ts.map +0 -1
- package/esm/types/2_business_connection.js +0 -29
- package/esm/types/2_chat_member.d.ts +0 -68
- package/esm/types/2_chat_member.d.ts.map +0 -1
- package/esm/types/2_chat_member.js +0 -114
- package/esm/types/2_chat_settings.d.ts +0 -46
- package/esm/types/2_chat_settings.d.ts.map +0 -1
- package/esm/types/2_chat_settings.js +0 -51
- package/esm/types/2_chosen_inline_result.d.ts +0 -38
- package/esm/types/2_chosen_inline_result.d.ts.map +0 -1
- package/esm/types/2_chosen_inline_result.js +0 -37
- package/esm/types/2_forward_header.d.ts +0 -59
- package/esm/types/2_forward_header.d.ts.map +0 -1
- package/esm/types/2_forward_header.js +0 -74
- package/esm/types/2_game.d.ts +0 -40
- package/esm/types/2_game.d.ts.map +0 -1
- package/esm/types/2_gift_upgraded_component.d.ts +0 -95
- package/esm/types/2_gift_upgraded_component.d.ts.map +0 -1
- package/esm/types/2_gift_upgraded_component.js +0 -88
- package/esm/types/2_inline_query.d.ts +0 -40
- package/esm/types/2_inline_query.d.ts.map +0 -1
- package/esm/types/2_inline_query.js +0 -60
- package/esm/types/2_invite_link.d.ts +0 -47
- package/esm/types/2_invite_link.d.ts.map +0 -1
- package/esm/types/2_invite_link.js +0 -48
- package/esm/types/2_message_reactions.d.ts +0 -43
- package/esm/types/2_message_reactions.d.ts.map +0 -1
- package/esm/types/2_message_reactions.js +0 -56
- package/esm/types/2_poll.d.ts +0 -55
- package/esm/types/2_poll.d.ts.map +0 -1
- package/esm/types/2_poll.js +0 -43
- package/esm/types/2_pre_checkout_query.d.ts +0 -34
- package/esm/types/2_pre_checkout_query.d.ts.map +0 -1
- package/esm/types/2_pre_checkout_query.js +0 -39
- package/esm/types/2_reply_to.d.ts +0 -35
- package/esm/types/2_reply_to.d.ts.map +0 -1
- package/esm/types/3_chat_member_updated.d.ts +0 -44
- package/esm/types/3_chat_member_updated.d.ts.map +0 -1
- package/esm/types/3_chat_member_updated.js +0 -53
- package/esm/types/3_gift.d.ts +0 -94
- package/esm/types/3_gift.d.ts.map +0 -1
- package/esm/types/3_gift.js +0 -105
- package/esm/types/3_join_request.d.ts +0 -40
- package/esm/types/3_join_request.d.ts.map +0 -1
- package/esm/types/3_join_request.js +0 -63
- package/esm/types/4_claimed_gift.d.ts +0 -45
- package/esm/types/4_claimed_gift.d.ts.map +0 -1
- package/esm/types/4_claimed_gift.js +0 -48
- package/esm/types/4_link_preview.d.ts +0 -188
- package/esm/types/4_link_preview.d.ts.map +0 -1
- package/esm/types/4_link_preview.js +0 -218
- package/esm/types/5_claimed_gifts.d.ts +0 -33
- package/esm/types/5_claimed_gifts.d.ts.map +0 -1
- package/esm/types/5_claimed_gifts.js +0 -43
- package/esm/types/5_message.d.ts +0 -617
- package/esm/types/5_message.d.ts.map +0 -1
- package/esm/types/5_message.js +0 -545
- package/esm/types/5_message_content.d.ts +0 -119
- package/esm/types/5_message_content.d.ts.map +0 -1
- package/esm/types/6_callback_query.d.ts +0 -43
- package/esm/types/6_callback_query.d.ts.map +0 -1
- package/esm/types/6_callback_query.js +0 -59
- package/esm/types/6_chat_list_item.d.ts +0 -36
- package/esm/types/6_chat_list_item.d.ts.map +0 -1
- package/esm/types/6_chat_list_item.js +0 -87
- package/esm/types/6_inline_query_result.d.ts +0 -251
- package/esm/types/6_inline_query_result.d.ts.map +0 -1
- package/esm/types/6_inline_query_result.js +0 -380
- package/esm/types/6_topic.d.ts +0 -34
- package/esm/types/6_topic.d.ts.map +0 -1
- package/esm/types/6_topic.js +0 -61
- package/esm/types/7_inline_query_answer.d.ts +0 -32
- package/esm/types/7_inline_query_answer.d.ts.map +0 -1
- package/esm/types/7_inline_query_answer.js +0 -28
- package/esm/types/7_update.d.ts +0 -509
- package/esm/types/7_update.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/assert.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/abortable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/deadline.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/debounce.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/delay.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/delay.js +0 -101
- package/script/deps/jsr.io/@std/async/1.0.13/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/pool.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/retry.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/tee.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/assert_path.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/constants.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/normalize_string.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/strip_trailing_separators.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_os.d.ts +0 -2
- package/script/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_os.js +0 -45
- package/script/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/basename.js +0 -38
- package/script/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/extname.js +0 -31
- package/script/deps/jsr.io/@std/path/1.1.0/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/is_absolute.js +0 -31
- package/script/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/join.js +0 -32
- package/script/deps/jsr.io/@std/path/1.1.0/posix/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/to_file_url.js +0 -31
- package/script/deps/jsr.io/@std/path/1.1.0/windows/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +0 -1
- package/script/types/0_message_entity.d.ts +0 -139
- package/script/types/0_message_entity.d.ts.map +0 -1
- package/script/types/0_message_entity.js +0 -188
- package/script/types/1_input_media.d.ts +0 -122
- package/script/types/1_input_media.d.ts.map +0 -1
- package/script/types/1_poll_option.d.ts +0 -34
- package/script/types/1_poll_option.d.ts.map +0 -1
- package/script/types/1_poll_option.js +0 -32
- package/script/types/1_reply_quote.d.ts +0 -32
- package/script/types/1_reply_quote.d.ts.map +0 -1
- package/script/types/1_reply_quote.js +0 -33
- package/script/types/1_story_privacy.d.ts +0 -46
- package/script/types/1_story_privacy.d.ts.map +0 -1
- package/script/types/1_story_privacy.js +0 -80
- package/script/types/1_user.d.ts +0 -61
- package/script/types/1_user.d.ts.map +0 -1
- package/script/types/1_user.js +0 -52
- package/script/types/2_business_connection.d.ts +0 -37
- package/script/types/2_business_connection.d.ts.map +0 -1
- package/script/types/2_business_connection.js +0 -32
- package/script/types/2_chat_member.d.ts +0 -68
- package/script/types/2_chat_member.d.ts.map +0 -1
- package/script/types/2_chat_member.js +0 -117
- package/script/types/2_chat_settings.d.ts +0 -46
- package/script/types/2_chat_settings.d.ts.map +0 -1
- package/script/types/2_chat_settings.js +0 -54
- package/script/types/2_chosen_inline_result.d.ts +0 -38
- package/script/types/2_chosen_inline_result.d.ts.map +0 -1
- package/script/types/2_chosen_inline_result.js +0 -40
- package/script/types/2_forward_header.d.ts +0 -59
- package/script/types/2_forward_header.d.ts.map +0 -1
- package/script/types/2_forward_header.js +0 -77
- package/script/types/2_game.d.ts +0 -40
- package/script/types/2_game.d.ts.map +0 -1
- package/script/types/2_gift_upgraded_component.d.ts +0 -95
- package/script/types/2_gift_upgraded_component.d.ts.map +0 -1
- package/script/types/2_gift_upgraded_component.js +0 -91
- package/script/types/2_inline_query.d.ts +0 -40
- package/script/types/2_inline_query.d.ts.map +0 -1
- package/script/types/2_inline_query.js +0 -63
- package/script/types/2_invite_link.d.ts +0 -47
- package/script/types/2_invite_link.d.ts.map +0 -1
- package/script/types/2_invite_link.js +0 -51
- package/script/types/2_message_reactions.d.ts +0 -43
- package/script/types/2_message_reactions.d.ts.map +0 -1
- package/script/types/2_message_reactions.js +0 -59
- package/script/types/2_poll.d.ts +0 -55
- package/script/types/2_poll.d.ts.map +0 -1
- package/script/types/2_poll.js +0 -46
- package/script/types/2_pre_checkout_query.d.ts +0 -34
- package/script/types/2_pre_checkout_query.d.ts.map +0 -1
- package/script/types/2_pre_checkout_query.js +0 -42
- package/script/types/2_reply_to.d.ts +0 -35
- package/script/types/2_reply_to.d.ts.map +0 -1
- package/script/types/3_chat_member_updated.d.ts +0 -44
- package/script/types/3_chat_member_updated.d.ts.map +0 -1
- package/script/types/3_chat_member_updated.js +0 -56
- package/script/types/3_gift.d.ts +0 -94
- package/script/types/3_gift.d.ts.map +0 -1
- package/script/types/3_gift.js +0 -110
- package/script/types/3_join_request.d.ts +0 -40
- package/script/types/3_join_request.d.ts.map +0 -1
- package/script/types/3_join_request.js +0 -67
- package/script/types/4_claimed_gift.d.ts +0 -45
- package/script/types/4_claimed_gift.d.ts.map +0 -1
- package/script/types/4_claimed_gift.js +0 -51
- package/script/types/4_link_preview.d.ts +0 -188
- package/script/types/4_link_preview.d.ts.map +0 -1
- package/script/types/4_link_preview.js +0 -221
- package/script/types/5_claimed_gifts.d.ts +0 -33
- package/script/types/5_claimed_gifts.d.ts.map +0 -1
- package/script/types/5_claimed_gifts.js +0 -46
- package/script/types/5_message.d.ts +0 -617
- package/script/types/5_message.d.ts.map +0 -1
- package/script/types/5_message.js +0 -550
- package/script/types/5_message_content.d.ts +0 -119
- package/script/types/5_message_content.d.ts.map +0 -1
- package/script/types/6_callback_query.d.ts +0 -43
- package/script/types/6_callback_query.d.ts.map +0 -1
- package/script/types/6_callback_query.js +0 -63
- package/script/types/6_chat_list_item.d.ts +0 -36
- package/script/types/6_chat_list_item.d.ts.map +0 -1
- package/script/types/6_chat_list_item.js +0 -94
- package/script/types/6_inline_query_result.d.ts +0 -251
- package/script/types/6_inline_query_result.d.ts.map +0 -1
- package/script/types/6_inline_query_result.js +0 -384
- package/script/types/6_topic.d.ts +0 -34
- package/script/types/6_topic.d.ts.map +0 -1
- package/script/types/6_topic.js +0 -64
- package/script/types/7_inline_query_answer.d.ts +0 -32
- package/script/types/7_inline_query_answer.d.ts.map +0 -1
- package/script/types/7_inline_query_answer.js +0 -31
- package/script/types/7_update.d.ts +0 -509
- package/script/types/7_update.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.js +0 -0
- /package/esm/types/{2_game.js → 3_game.js} +0 -0
- /package/esm/types/{1_input_media.js → 3_input_media.js} +0 -0
- /package/esm/types/{2_reply_to.js → 4_reply_to.js} +0 -0
- /package/esm/types/{5_message_content.js → 6_message_content.js} +0 -0
- /package/esm/types/{7_update.js → 8_update.js} +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.js +0 -0
- /package/script/types/{2_game.js → 3_game.js} +0 -0
- /package/script/types/{1_input_media.js → 3_input_media.js} +0 -0
- /package/script/types/{2_reply_to.js → 4_reply_to.js} +0 -0
- /package/script/types/{5_message_content.js → 6_message_content.js} +0 -0
- /package/script/types/{7_update.js → 8_update.js} +0 -0
package/esm/client/5_client.js
CHANGED
|
@@ -21,12 +21,14 @@ import { delay, MINUTE, SECOND, unreachable } from "../0_deps.js";
|
|
|
21
21
|
import { AccessError, ConnectionError, InputError } from "../0_errors.js";
|
|
22
22
|
import { cleanObject, drop, getLogger, mustPrompt, mustPromptOneOf, Mutex, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
23
23
|
import { StorageMemory } from "../2_storage.js";
|
|
24
|
-
import { Api, Mtproto } from "../2_tl.js";
|
|
24
|
+
import { Api, Mtproto, toJSON } from "../2_tl.js";
|
|
25
25
|
import { getDcId } from "../3_transport.js";
|
|
26
|
-
import {
|
|
26
|
+
import { constructChatP, constructUser2 } from "../3_types.js";
|
|
27
27
|
import { APP_VERSION, DEVICE_MODEL, INITIAL_DC, LANG_CODE, LANG_PACK, MAX_CHANNEL_ID, MAX_CHAT_ID, SYSTEM_LANG_CODE, SYSTEM_VERSION, USERNAME_TTL } from "../4_constants.js";
|
|
28
28
|
import { AuthKeyUnregistered, FloodWait, Migrate, PasswordHashInvalid, PhoneNumberInvalid, SessionPasswordNeeded, SessionRevoked } from "../4_errors.js";
|
|
29
29
|
import { PhoneCodeInvalid } from "../4_errors.js";
|
|
30
|
+
import { peerToChatId } from "../tl/2_telegram.js";
|
|
31
|
+
import { AbortableLoop } from "./0_abortable_loop.js";
|
|
30
32
|
import { checkPassword } from "./0_password.js";
|
|
31
33
|
import { StorageOperations } from "./0_storage_operations.js";
|
|
32
34
|
import { canBeInputChannel, canBeInputUser, DOWNLOAD_POOL_SIZE, getUsername, resolve, toInputChannel, toInputUser } from "./0_utilities.js";
|
|
@@ -62,7 +64,8 @@ export const restartAuth = Symbol("restartAuth");
|
|
|
62
64
|
export const handleMigrationError = Symbol("handleMigrationError");
|
|
63
65
|
// global Client ID counter for logs
|
|
64
66
|
let id = 0;
|
|
65
|
-
const
|
|
67
|
+
const getPeer = Symbol();
|
|
68
|
+
const mustGetPeer = Symbol();
|
|
66
69
|
/**
|
|
67
70
|
* An MTKruto client.
|
|
68
71
|
*/
|
|
@@ -147,6 +150,7 @@ export class Client extends Composer {
|
|
|
147
150
|
#L;
|
|
148
151
|
#LsignIn;
|
|
149
152
|
#LupdateGapRecoveryLoop;
|
|
153
|
+
#LstorageWriteLoop;
|
|
150
154
|
#LhandleMigrationError;
|
|
151
155
|
#Lmin;
|
|
152
156
|
/**
|
|
@@ -186,6 +190,7 @@ export class Client extends Composer {
|
|
|
186
190
|
const L = this.#L = getLogger("Client").client(id++);
|
|
187
191
|
this.#LsignIn = L.branch("signIn");
|
|
188
192
|
this.#LupdateGapRecoveryLoop = L.branch("updateGapRecoveryLoop");
|
|
193
|
+
this.#LstorageWriteLoop = L.branch("storageWriteLoop");
|
|
189
194
|
this.#LhandleMigrationError = L.branch("[handleMigrationError]");
|
|
190
195
|
this.#Lmin = L.branch("min");
|
|
191
196
|
const c = {
|
|
@@ -213,7 +218,7 @@ export class Client extends Composer {
|
|
|
213
218
|
getInputChannel: this.getInputChannel.bind(this),
|
|
214
219
|
getInputUser: this.getInputUser.bind(this),
|
|
215
220
|
getInputPeerChatId: this.#getInputPeerChatId.bind(this),
|
|
216
|
-
|
|
221
|
+
getPeer: this[mustGetPeer].bind(this),
|
|
217
222
|
handleUpdate: this.#queueHandleCtxUpdate.bind(this),
|
|
218
223
|
parseMode: this.#parseMode,
|
|
219
224
|
outgoingMessages: this.#outgoingMessages,
|
|
@@ -312,22 +317,21 @@ export class Client extends Composer {
|
|
|
312
317
|
return this.#client?.disconnected ?? true;
|
|
313
318
|
}
|
|
314
319
|
#constructContext = async (update) => {
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
if (msg !== undefined) {
|
|
319
|
-
return { chatId: msg.chat.id, messageId: msg.id, businessConnectionId: msg.businessConnectionId, senderId: msg.from?.id, userId: msg.from?.id };
|
|
320
|
+
const mustGetMsg = (ctx) => {
|
|
321
|
+
if (ctx.msg !== undefined) {
|
|
322
|
+
return { chatId: ctx.msg.chat.id, messageId: ctx.msg.id, businessConnectionId: ctx.msg.businessConnectionId, senderId: ctx.msg.from?.id, userId: ctx.msg.from?.id };
|
|
320
323
|
}
|
|
321
|
-
|
|
324
|
+
const reactions = "messageInteractions" in update ? update.messageInteractions : undefined;
|
|
325
|
+
if (reactions !== undefined) {
|
|
322
326
|
return { chatId: reactions.chatId, messageId: reactions.messageId };
|
|
323
327
|
}
|
|
324
328
|
else {
|
|
325
329
|
unreachable();
|
|
326
330
|
}
|
|
327
331
|
};
|
|
328
|
-
const mustGetUserId = () => {
|
|
329
|
-
if (msg?.from) {
|
|
330
|
-
return msg.from.id;
|
|
332
|
+
const mustGetUserId = (ctx) => {
|
|
333
|
+
if (ctx.msg?.from) {
|
|
334
|
+
return ctx.msg.from.id;
|
|
331
335
|
}
|
|
332
336
|
else if ("callbackQuery" in update) {
|
|
333
337
|
return update.callbackQuery.from.id;
|
|
@@ -352,9 +356,6 @@ export class Client extends Composer {
|
|
|
352
356
|
}
|
|
353
357
|
unreachable();
|
|
354
358
|
};
|
|
355
|
-
const chat_ = "messageReactions" in update ? update.messageReactions.chat : "messageReactionCount" in update ? update.messageReactionCount.chat : "chatMember" in update ? update.chatMember.chat : "myChatMember" in update ? update.myChatMember.chat : "joinRequest" in update ? update.joinRequest.chat : "story" in update ? update.story.chat : undefined;
|
|
356
|
-
const chat = chat_ ?? msg?.chat;
|
|
357
|
-
const from = "callbackQuery" in update ? update.callbackQuery.from : "inlineQuery" in update ? update.inlineQuery.from : "chatMember" in update ? update.chatMember.from : "myChatMember" in update ? update.myChatMember.from : "messageReactions" in update ? update.messageReactions.user : "preCheckoutQuery" in update ? update.preCheckoutQuery.from : "joinRequest" in update ? update.joinRequest.from : "businessConnection" in update ? update.businessConnection.user : "pollAnswer" in update ? update.pollAnswer.from : msg?.from ? msg.from : undefined;
|
|
358
359
|
const getReplyTo = (quote, chatId, messageId) => {
|
|
359
360
|
if ("story" in update) {
|
|
360
361
|
return { chatId: update.story.chat.id, storyId: update.story.id };
|
|
@@ -363,350 +364,368 @@ export class Client extends Composer {
|
|
|
363
364
|
const shouldQuote = quote === undefined ? !isPrivate : quote;
|
|
364
365
|
return shouldQuote ? { messageId } : undefined;
|
|
365
366
|
};
|
|
366
|
-
|
|
367
|
+
if (this.#lastGetMe === null && !("connectionState" in update) && (!("authorizationState" in update) || ("authorizationState" in update && update.authorizationState.authorized))) {
|
|
368
|
+
await this.#getMe();
|
|
369
|
+
}
|
|
367
370
|
const context = {
|
|
368
371
|
...update,
|
|
369
372
|
client: this,
|
|
370
|
-
me
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
get me() {
|
|
374
|
+
return this.client.#lastGetMe === null ? undefined : this.client.#lastGetMe;
|
|
375
|
+
},
|
|
376
|
+
get msg() {
|
|
377
|
+
return "message" in update ? update.message : "editedMessage" in update ? update.editedMessage : "scheduledMessage" in update ? update.scheduledMessage : "callbackQuery" in update ? update.callbackQuery.message : undefined;
|
|
378
|
+
},
|
|
379
|
+
get chat() {
|
|
380
|
+
return this.msg?.chat ?? ("messageReactions" in update ? update.messageReactions.chat : "messageReactionCount" in update ? update.messageReactionCount.chat : "chatMember" in update ? update.chatMember.chat : "myChatMember" in update ? update.myChatMember.chat : "joinRequest" in update ? update.joinRequest.chat : "story" in update ? update.story.chat : undefined);
|
|
381
|
+
},
|
|
382
|
+
get from() {
|
|
383
|
+
const from = "callbackQuery" in update ? update.callbackQuery.from : "inlineQuery" in update ? update.inlineQuery.from : "chatMember" in update ? update.chatMember.from : "myChatMember" in update ? update.myChatMember.from : "messageReactions" in update ? update.messageReactions.user : "preCheckoutQuery" in update ? update.preCheckoutQuery.from : "joinRequest" in update ? update.joinRequest.from : "businessConnection" in update ? update.businessConnection.user : "pollAnswer" in update ? update.pollAnswer.from : this.msg?.from;
|
|
384
|
+
return from;
|
|
385
|
+
},
|
|
386
|
+
toJSON() {
|
|
387
|
+
if ("update" in update) {
|
|
388
|
+
return { update: toJSON(update.update) };
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
return update;
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
reply(text, params) {
|
|
395
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
379
396
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
380
|
-
return this.sendMessage(chatId, text, { ...params, replyTo, businessConnectionId });
|
|
397
|
+
return this.client.sendMessage(chatId, text, { ...params, replyTo, businessConnectionId });
|
|
381
398
|
},
|
|
382
|
-
replyPoll
|
|
383
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
399
|
+
replyPoll(question, options, params) {
|
|
400
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
384
401
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
385
|
-
return this.sendPoll(chatId, question, options, { ...params, replyTo, businessConnectionId });
|
|
402
|
+
return this.client.sendPoll(chatId, question, options, { ...params, replyTo, businessConnectionId });
|
|
386
403
|
},
|
|
387
|
-
replyPhoto
|
|
388
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
404
|
+
replyPhoto(photo, params) {
|
|
405
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
389
406
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
390
|
-
return this.sendPhoto(chatId, photo, { ...params, replyTo, businessConnectionId });
|
|
407
|
+
return this.client.sendPhoto(chatId, photo, { ...params, replyTo, businessConnectionId });
|
|
391
408
|
},
|
|
392
|
-
replyMediaGroup
|
|
393
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
409
|
+
replyMediaGroup(media, params) {
|
|
410
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
394
411
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
395
|
-
return this.sendMediaGroup(chatId, media, { ...params, replyTo, businessConnectionId });
|
|
412
|
+
return this.client.sendMediaGroup(chatId, media, { ...params, replyTo, businessConnectionId });
|
|
396
413
|
},
|
|
397
|
-
replyInvoice
|
|
398
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
414
|
+
replyInvoice(title, description, payload, currency, prices, params) {
|
|
415
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
399
416
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
400
|
-
return this.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, replyTo, businessConnectionId });
|
|
417
|
+
return this.client.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, replyTo, businessConnectionId });
|
|
401
418
|
},
|
|
402
|
-
replyDocument
|
|
403
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
419
|
+
replyDocument(document, params) {
|
|
420
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
404
421
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
405
|
-
return this.sendDocument(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
422
|
+
return this.client.sendDocument(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
406
423
|
},
|
|
407
|
-
replySticker
|
|
408
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
424
|
+
replySticker(sticker, params) {
|
|
425
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
409
426
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
410
|
-
return this.sendSticker(chatId, sticker, { ...params, replyTo, businessConnectionId });
|
|
427
|
+
return this.client.sendSticker(chatId, sticker, { ...params, replyTo, businessConnectionId });
|
|
411
428
|
},
|
|
412
|
-
replyContact
|
|
413
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
429
|
+
replyContact(firstName, number, params) {
|
|
430
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
414
431
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
415
|
-
return this.sendContact(chatId, firstName, number, { ...params, replyTo, businessConnectionId });
|
|
432
|
+
return this.client.sendContact(chatId, firstName, number, { ...params, replyTo, businessConnectionId });
|
|
416
433
|
},
|
|
417
|
-
replyLocation
|
|
418
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
434
|
+
replyLocation(latitude, longitude, params) {
|
|
435
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
419
436
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
420
|
-
return this.sendLocation(chatId, latitude, longitude, { ...params, replyTo, businessConnectionId });
|
|
437
|
+
return this.client.sendLocation(chatId, latitude, longitude, { ...params, replyTo, businessConnectionId });
|
|
421
438
|
},
|
|
422
|
-
replyDice
|
|
423
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
439
|
+
replyDice(params) {
|
|
440
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
424
441
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
425
|
-
return this.sendDice(chatId, { ...params, replyTo, businessConnectionId });
|
|
442
|
+
return this.client.sendDice(chatId, { ...params, replyTo, businessConnectionId });
|
|
426
443
|
},
|
|
427
|
-
replyVenue
|
|
428
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
444
|
+
replyVenue(latitude, longitude, title, address, params) {
|
|
445
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
429
446
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
430
|
-
return this.sendVenue(chatId, latitude, longitude, title, address, { ...params, replyTo, businessConnectionId });
|
|
447
|
+
return this.client.sendVenue(chatId, latitude, longitude, title, address, { ...params, replyTo, businessConnectionId });
|
|
431
448
|
},
|
|
432
|
-
replyVideo
|
|
433
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
449
|
+
replyVideo(video, params) {
|
|
450
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
434
451
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
435
|
-
return this.sendVideo(chatId, video, { ...params, replyTo, businessConnectionId });
|
|
452
|
+
return this.client.sendVideo(chatId, video, { ...params, replyTo, businessConnectionId });
|
|
436
453
|
},
|
|
437
|
-
replyAnimation
|
|
438
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
454
|
+
replyAnimation(document, params) {
|
|
455
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
439
456
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
440
|
-
return this.sendAnimation(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
457
|
+
return this.client.sendAnimation(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
441
458
|
},
|
|
442
|
-
replyVoice
|
|
443
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
459
|
+
replyVoice(document, params) {
|
|
460
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
444
461
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
445
|
-
return this.sendVoice(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
462
|
+
return this.client.sendVoice(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
446
463
|
},
|
|
447
|
-
replyAudio
|
|
448
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
464
|
+
replyAudio(document, params) {
|
|
465
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
449
466
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
450
|
-
return this.sendAudio(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
467
|
+
return this.client.sendAudio(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
451
468
|
},
|
|
452
|
-
replyVideoNote
|
|
453
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
469
|
+
replyVideoNote(videoNote, params) {
|
|
470
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
454
471
|
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
455
|
-
return this.sendVideoNote(chatId, videoNote, { ...params, replyTo, businessConnectionId });
|
|
472
|
+
return this.client.sendVideoNote(chatId, videoNote, { ...params, replyTo, businessConnectionId });
|
|
456
473
|
},
|
|
457
|
-
delete
|
|
458
|
-
const { chatId, messageId } = mustGetMsg();
|
|
459
|
-
return this.deleteMessage(chatId, messageId);
|
|
474
|
+
delete() {
|
|
475
|
+
const { chatId, messageId } = mustGetMsg(this);
|
|
476
|
+
return this.client.deleteMessage(chatId, messageId);
|
|
460
477
|
},
|
|
461
|
-
forward
|
|
462
|
-
const { chatId, messageId } = mustGetMsg();
|
|
463
|
-
return this.forwardMessage(chatId, to, messageId, params);
|
|
478
|
+
forward(to, params) {
|
|
479
|
+
const { chatId, messageId } = mustGetMsg(this);
|
|
480
|
+
return this.client.forwardMessage(chatId, to, messageId, params);
|
|
464
481
|
},
|
|
465
|
-
pin
|
|
466
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
467
|
-
return this.pinMessage(chatId, messageId, { ...params, businessConnectionId });
|
|
482
|
+
pin(params) {
|
|
483
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
484
|
+
return this.client.pinMessage(chatId, messageId, { ...params, businessConnectionId });
|
|
468
485
|
},
|
|
469
|
-
unpin
|
|
470
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
471
|
-
return this.unpinMessage(chatId, messageId, { businessConnectionId });
|
|
486
|
+
unpin() {
|
|
487
|
+
const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
|
|
488
|
+
return this.client.unpinMessage(chatId, messageId, { businessConnectionId });
|
|
472
489
|
},
|
|
473
|
-
banSender
|
|
474
|
-
const { chatId, senderId } = mustGetMsg();
|
|
490
|
+
banSender(params) {
|
|
491
|
+
const { chatId, senderId } = mustGetMsg(this);
|
|
475
492
|
if (!senderId) {
|
|
476
493
|
unreachable();
|
|
477
494
|
}
|
|
478
|
-
return this.banChatMember(chatId, senderId, params);
|
|
495
|
+
return this.client.banChatMember(chatId, senderId, params);
|
|
479
496
|
},
|
|
480
|
-
kickSender
|
|
481
|
-
const { chatId, senderId } = mustGetMsg();
|
|
497
|
+
kickSender() {
|
|
498
|
+
const { chatId, senderId } = mustGetMsg(this);
|
|
482
499
|
if (!senderId) {
|
|
483
500
|
unreachable();
|
|
484
501
|
}
|
|
485
|
-
return this.kickChatMember(chatId, senderId);
|
|
502
|
+
return this.client.kickChatMember(chatId, senderId);
|
|
486
503
|
},
|
|
487
|
-
setSenderRights
|
|
488
|
-
const { chatId, senderId } = mustGetMsg();
|
|
504
|
+
setSenderRights(params) {
|
|
505
|
+
const { chatId, senderId } = mustGetMsg(this);
|
|
489
506
|
if (!senderId) {
|
|
490
507
|
unreachable();
|
|
491
508
|
}
|
|
492
|
-
return this.setChatMemberRights(chatId, senderId, params);
|
|
509
|
+
return this.client.setChatMemberRights(chatId, senderId, params);
|
|
493
510
|
},
|
|
494
|
-
getChatAdministrators
|
|
495
|
-
const { chatId } = mustGetMsg();
|
|
496
|
-
return this.getChatAdministrators(chatId);
|
|
511
|
+
getChatAdministrators() {
|
|
512
|
+
const { chatId } = mustGetMsg(this);
|
|
513
|
+
return this.client.getChatAdministrators(chatId);
|
|
497
514
|
},
|
|
498
|
-
react
|
|
499
|
-
const { chatId, messageId } = mustGetMsg();
|
|
500
|
-
return this.setReactions(chatId, messageId, reactions, params);
|
|
515
|
+
react(reactions, params) {
|
|
516
|
+
const { chatId, messageId } = mustGetMsg(this);
|
|
517
|
+
return this.client.setReactions(chatId, messageId, reactions, params);
|
|
501
518
|
},
|
|
502
|
-
answerCallbackQuery
|
|
519
|
+
answerCallbackQuery(params) {
|
|
503
520
|
if (!("callbackQuery" in update)) {
|
|
504
521
|
unreachable();
|
|
505
522
|
}
|
|
506
|
-
return this.answerCallbackQuery(update.callbackQuery.id, params);
|
|
523
|
+
return this.client.answerCallbackQuery(update.callbackQuery.id, params);
|
|
507
524
|
},
|
|
508
|
-
answerInlineQuery
|
|
525
|
+
answerInlineQuery(results, params) {
|
|
509
526
|
if (!("inlineQuery" in update)) {
|
|
510
527
|
unreachable();
|
|
511
528
|
}
|
|
512
|
-
return this.answerInlineQuery(update.inlineQuery.id, results, params);
|
|
529
|
+
return this.client.answerInlineQuery(update.inlineQuery.id, results, params);
|
|
513
530
|
},
|
|
514
|
-
sendChatAction
|
|
515
|
-
const { chatId } = mustGetMsg();
|
|
516
|
-
return this.sendChatAction(chatId, chatAction, params);
|
|
531
|
+
sendChatAction(chatAction, params) {
|
|
532
|
+
const { chatId } = mustGetMsg(this);
|
|
533
|
+
return this.client.sendChatAction(chatId, chatAction, params);
|
|
517
534
|
},
|
|
518
|
-
editInlineMessageText
|
|
535
|
+
editInlineMessageText(text, params) {
|
|
519
536
|
const inlineMessageId = mustGetInlineMsgId();
|
|
520
|
-
return this.editInlineMessageText(inlineMessageId, text, params);
|
|
537
|
+
return this.client.editInlineMessageText(inlineMessageId, text, params);
|
|
521
538
|
},
|
|
522
|
-
editInlineMessageMedia
|
|
539
|
+
editInlineMessageMedia(media, params) {
|
|
523
540
|
const inlineMessageId = mustGetInlineMsgId();
|
|
524
|
-
return this.editInlineMessageMedia(inlineMessageId, media, params);
|
|
541
|
+
return this.client.editInlineMessageMedia(inlineMessageId, media, params);
|
|
525
542
|
},
|
|
526
|
-
editInlineMessageCaption
|
|
543
|
+
editInlineMessageCaption(params) {
|
|
527
544
|
const inlineMessageId = mustGetInlineMsgId();
|
|
528
|
-
return this.editInlineMessageCaption(inlineMessageId, params);
|
|
545
|
+
return this.client.editInlineMessageCaption(inlineMessageId, params);
|
|
529
546
|
},
|
|
530
|
-
editInlineMessageLiveLocation
|
|
547
|
+
editInlineMessageLiveLocation(latitude, longitude, params) {
|
|
531
548
|
const inlineMessageId = mustGetInlineMsgId();
|
|
532
|
-
return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
549
|
+
return this.client.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
533
550
|
},
|
|
534
|
-
editInlineMessageReplyMarkup
|
|
551
|
+
editInlineMessageReplyMarkup(params) {
|
|
535
552
|
const inlineMessageId = mustGetInlineMsgId();
|
|
536
|
-
return this.editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
553
|
+
return this.client.editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
537
554
|
},
|
|
538
|
-
editMessageText
|
|
539
|
-
const { chatId } = mustGetMsg();
|
|
540
|
-
return this.editMessageText(chatId, messageId, text, params);
|
|
555
|
+
editMessageText(messageId, text, params) {
|
|
556
|
+
const { chatId } = mustGetMsg(this);
|
|
557
|
+
return this.client.editMessageText(chatId, messageId, text, params);
|
|
541
558
|
},
|
|
542
|
-
editMessageCaption
|
|
543
|
-
const { chatId } = mustGetMsg();
|
|
544
|
-
return this.editMessageCaption(chatId, messageId, params);
|
|
559
|
+
editMessageCaption(messageId, params) {
|
|
560
|
+
const { chatId } = mustGetMsg(this);
|
|
561
|
+
return this.client.editMessageCaption(chatId, messageId, params);
|
|
545
562
|
},
|
|
546
|
-
editMessageMedia
|
|
547
|
-
const { chatId } = mustGetMsg();
|
|
548
|
-
return this.editMessageMedia(chatId, messageId, media, params);
|
|
563
|
+
editMessageMedia(messageId, media, params) {
|
|
564
|
+
const { chatId } = mustGetMsg(this);
|
|
565
|
+
return this.client.editMessageMedia(chatId, messageId, media, params);
|
|
549
566
|
},
|
|
550
|
-
editMessageLiveLocation
|
|
551
|
-
const { chatId } = mustGetMsg();
|
|
552
|
-
return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
567
|
+
editMessageLiveLocation(messageId, latitude, longitude, params) {
|
|
568
|
+
const { chatId } = mustGetMsg(this);
|
|
569
|
+
return this.client.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
553
570
|
},
|
|
554
|
-
editMessageReplyMarkup
|
|
555
|
-
const { chatId } = mustGetMsg();
|
|
556
|
-
return this.editMessageReplyMarkup(chatId, messageId, params);
|
|
571
|
+
editMessageReplyMarkup(messageId, params) {
|
|
572
|
+
const { chatId } = mustGetMsg(this);
|
|
573
|
+
return this.client.editMessageReplyMarkup(chatId, messageId, params);
|
|
557
574
|
},
|
|
558
|
-
getMessage
|
|
559
|
-
const { chatId } = mustGetMsg();
|
|
560
|
-
return this.getMessage(chatId, messageId);
|
|
575
|
+
getMessage(messageId) {
|
|
576
|
+
const { chatId } = mustGetMsg(this);
|
|
577
|
+
return this.client.getMessage(chatId, messageId);
|
|
561
578
|
},
|
|
562
|
-
getMessages
|
|
563
|
-
const { chatId } = mustGetMsg();
|
|
564
|
-
return this.getMessages(chatId, messageIds);
|
|
579
|
+
getMessages(messageIds) {
|
|
580
|
+
const { chatId } = mustGetMsg(this);
|
|
581
|
+
return this.client.getMessages(chatId, messageIds);
|
|
565
582
|
},
|
|
566
|
-
forwardMessage
|
|
567
|
-
const { chatId } = mustGetMsg();
|
|
568
|
-
return this.forwardMessage(chatId, to, messageId, params);
|
|
583
|
+
forwardMessage(to, messageId, params) {
|
|
584
|
+
const { chatId } = mustGetMsg(this);
|
|
585
|
+
return this.client.forwardMessage(chatId, to, messageId, params);
|
|
569
586
|
},
|
|
570
|
-
forwardMessages
|
|
571
|
-
const { chatId } = mustGetMsg();
|
|
572
|
-
return this.forwardMessages(chatId, to, messageIds, params);
|
|
587
|
+
forwardMessages(to, messageIds, params) {
|
|
588
|
+
const { chatId } = mustGetMsg(this);
|
|
589
|
+
return this.client.forwardMessages(chatId, to, messageIds, params);
|
|
573
590
|
},
|
|
574
|
-
deleteMessage
|
|
575
|
-
const { chatId } = mustGetMsg();
|
|
576
|
-
return this.deleteMessage(chatId, messageId, params);
|
|
591
|
+
deleteMessage(messageId, params) {
|
|
592
|
+
const { chatId } = mustGetMsg(this);
|
|
593
|
+
return this.client.deleteMessage(chatId, messageId, params);
|
|
577
594
|
},
|
|
578
|
-
deleteMessages
|
|
579
|
-
const { chatId } = mustGetMsg();
|
|
580
|
-
return this.deleteMessages(chatId, messageIds, params);
|
|
595
|
+
deleteMessages(messageIds, params) {
|
|
596
|
+
const { chatId } = mustGetMsg(this);
|
|
597
|
+
return this.client.deleteMessages(chatId, messageIds, params);
|
|
581
598
|
},
|
|
582
|
-
pinMessage
|
|
583
|
-
const { chatId } = mustGetMsg();
|
|
584
|
-
return this.pinMessage(chatId, messageId, params);
|
|
599
|
+
pinMessage(messageId, params) {
|
|
600
|
+
const { chatId } = mustGetMsg(this);
|
|
601
|
+
return this.client.pinMessage(chatId, messageId, params);
|
|
585
602
|
},
|
|
586
|
-
unpinMessage
|
|
587
|
-
const { chatId } = mustGetMsg();
|
|
588
|
-
return this.unpinMessage(chatId, messageId);
|
|
603
|
+
unpinMessage(messageId) {
|
|
604
|
+
const { chatId } = mustGetMsg(this);
|
|
605
|
+
return this.client.unpinMessage(chatId, messageId);
|
|
589
606
|
},
|
|
590
|
-
unpinMessages
|
|
591
|
-
const { chatId } = mustGetMsg();
|
|
592
|
-
return this.unpinMessages(chatId);
|
|
607
|
+
unpinMessages() {
|
|
608
|
+
const { chatId } = mustGetMsg(this);
|
|
609
|
+
return this.client.unpinMessages(chatId);
|
|
593
610
|
},
|
|
594
|
-
setAvailableReactions
|
|
595
|
-
const { chatId } = mustGetMsg();
|
|
596
|
-
return this.setAvailableReactions(chatId, availableReactions);
|
|
611
|
+
setAvailableReactions(availableReactions) {
|
|
612
|
+
const { chatId } = mustGetMsg(this);
|
|
613
|
+
return this.client.setAvailableReactions(chatId, availableReactions);
|
|
597
614
|
},
|
|
598
|
-
addReaction
|
|
599
|
-
const { chatId } = mustGetMsg();
|
|
600
|
-
return this.addReaction(chatId, messageId, reaction, params);
|
|
615
|
+
addReaction(messageId, reaction, params) {
|
|
616
|
+
const { chatId } = mustGetMsg(this);
|
|
617
|
+
return this.client.addReaction(chatId, messageId, reaction, params);
|
|
601
618
|
},
|
|
602
|
-
removeReaction
|
|
603
|
-
const { chatId } = mustGetMsg();
|
|
604
|
-
return this.removeReaction(chatId, messageId, reaction);
|
|
619
|
+
removeReaction(messageId, reaction) {
|
|
620
|
+
const { chatId } = mustGetMsg(this);
|
|
621
|
+
return this.client.removeReaction(chatId, messageId, reaction);
|
|
605
622
|
},
|
|
606
|
-
setReactions
|
|
607
|
-
const { chatId } = mustGetMsg();
|
|
608
|
-
return this.setReactions(chatId, messageId, reactions, params);
|
|
623
|
+
setReactions(messageId, reactions, params) {
|
|
624
|
+
const { chatId } = mustGetMsg(this);
|
|
625
|
+
return this.client.setReactions(chatId, messageId, reactions, params);
|
|
609
626
|
},
|
|
610
|
-
read
|
|
611
|
-
const { chatId, messageId } = mustGetMsg();
|
|
612
|
-
return this.readMessages(chatId, messageId);
|
|
627
|
+
read() {
|
|
628
|
+
const { chatId, messageId } = mustGetMsg(this);
|
|
629
|
+
return this.client.readMessages(chatId, messageId);
|
|
613
630
|
},
|
|
614
|
-
setChatPhoto
|
|
615
|
-
const { chatId } = mustGetMsg();
|
|
616
|
-
return this.setChatPhoto(chatId, photo, params);
|
|
631
|
+
setChatPhoto(photo, params) {
|
|
632
|
+
const { chatId } = mustGetMsg(this);
|
|
633
|
+
return this.client.setChatPhoto(chatId, photo, params);
|
|
617
634
|
},
|
|
618
|
-
deleteChatPhoto
|
|
619
|
-
const { chatId } = mustGetMsg();
|
|
620
|
-
return this.deleteChatPhoto(chatId);
|
|
635
|
+
deleteChatPhoto() {
|
|
636
|
+
const { chatId } = mustGetMsg(this);
|
|
637
|
+
return this.client.deleteChatPhoto(chatId);
|
|
621
638
|
},
|
|
622
|
-
banChatMember
|
|
623
|
-
const { chatId } = mustGetMsg();
|
|
624
|
-
return this.banChatMember(chatId, memberId, params);
|
|
639
|
+
banChatMember(memberId, params) {
|
|
640
|
+
const { chatId } = mustGetMsg(this);
|
|
641
|
+
return this.client.banChatMember(chatId, memberId, params);
|
|
625
642
|
},
|
|
626
|
-
unbanChatMember
|
|
627
|
-
const { chatId } = mustGetMsg();
|
|
628
|
-
return this.unbanChatMember(chatId, memberId);
|
|
643
|
+
unbanChatMember(memberId) {
|
|
644
|
+
const { chatId } = mustGetMsg(this);
|
|
645
|
+
return this.client.unbanChatMember(chatId, memberId);
|
|
629
646
|
},
|
|
630
|
-
kickChatMember
|
|
631
|
-
const { chatId } = mustGetMsg();
|
|
632
|
-
return this.kickChatMember(chatId, memberId);
|
|
647
|
+
kickChatMember(memberId) {
|
|
648
|
+
const { chatId } = mustGetMsg(this);
|
|
649
|
+
return this.client.kickChatMember(chatId, memberId);
|
|
633
650
|
},
|
|
634
|
-
setChatMemberRights
|
|
635
|
-
const { chatId } = mustGetMsg();
|
|
636
|
-
return this.setChatMemberRights(chatId, memberId, params);
|
|
651
|
+
setChatMemberRights(memberId, params) {
|
|
652
|
+
const { chatId } = mustGetMsg(this);
|
|
653
|
+
return this.client.setChatMemberRights(chatId, memberId, params);
|
|
637
654
|
},
|
|
638
|
-
deleteChatMemberMessages
|
|
639
|
-
const { chatId } = mustGetMsg();
|
|
640
|
-
return this.deleteChatMemberMessages(chatId, userId);
|
|
655
|
+
deleteChatMemberMessages(userId) {
|
|
656
|
+
const { chatId } = mustGetMsg(this);
|
|
657
|
+
return this.client.deleteChatMemberMessages(chatId, userId);
|
|
641
658
|
},
|
|
642
|
-
searchMessages
|
|
643
|
-
const { chatId } = mustGetMsg();
|
|
644
|
-
|
|
659
|
+
searchMessages(params) {
|
|
660
|
+
const { chatId } = mustGetMsg(this);
|
|
661
|
+
params ??= {};
|
|
662
|
+
params.chatId = chatId;
|
|
663
|
+
return this.client.searchMessages(params);
|
|
645
664
|
},
|
|
646
|
-
setBoostsRequiredToCircumventRestrictions
|
|
647
|
-
const { chatId } = mustGetMsg();
|
|
648
|
-
return this.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
|
|
665
|
+
setBoostsRequiredToCircumventRestrictions(boosts) {
|
|
666
|
+
const { chatId } = mustGetMsg(this);
|
|
667
|
+
return this.client.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
|
|
649
668
|
},
|
|
650
|
-
createInviteLink
|
|
651
|
-
const { chatId } = mustGetMsg();
|
|
652
|
-
return this.createInviteLink(chatId, params);
|
|
669
|
+
createInviteLink(params) {
|
|
670
|
+
const { chatId } = mustGetMsg(this);
|
|
671
|
+
return this.client.createInviteLink(chatId, params);
|
|
653
672
|
},
|
|
654
|
-
getCreatedInviteLinks
|
|
655
|
-
const { chatId } = mustGetMsg();
|
|
656
|
-
return this.getCreatedInviteLinks(chatId, params);
|
|
673
|
+
getCreatedInviteLinks(params) {
|
|
674
|
+
const { chatId } = mustGetMsg(this);
|
|
675
|
+
return this.client.getCreatedInviteLinks(chatId, params);
|
|
657
676
|
},
|
|
658
|
-
leave
|
|
659
|
-
const { chatId } = mustGetMsg();
|
|
660
|
-
return this.leaveChat(chatId);
|
|
677
|
+
leave() {
|
|
678
|
+
const { chatId } = mustGetMsg(this);
|
|
679
|
+
return this.client.leaveChat(chatId);
|
|
661
680
|
},
|
|
662
|
-
block
|
|
663
|
-
return this.blockUser(mustGetUserId());
|
|
681
|
+
block() {
|
|
682
|
+
return this.client.blockUser(mustGetUserId(this));
|
|
664
683
|
},
|
|
665
|
-
unblock
|
|
666
|
-
return this.unblockUser(mustGetUserId());
|
|
684
|
+
unblock() {
|
|
685
|
+
return this.client.unblockUser(mustGetUserId(this));
|
|
667
686
|
},
|
|
668
|
-
getChatMember
|
|
669
|
-
const { chatId } = mustGetMsg();
|
|
670
|
-
return this.getChatMember(chatId, userId);
|
|
687
|
+
getChatMember(userId) {
|
|
688
|
+
const { chatId } = mustGetMsg(this);
|
|
689
|
+
return this.client.getChatMember(chatId, userId);
|
|
671
690
|
},
|
|
672
|
-
getChatMembers
|
|
673
|
-
const { chatId } = mustGetMsg();
|
|
674
|
-
return this.getChatMembers(chatId, params);
|
|
691
|
+
getChatMembers(params) {
|
|
692
|
+
const { chatId } = mustGetMsg(this);
|
|
693
|
+
return this.client.getChatMembers(chatId, params);
|
|
675
694
|
},
|
|
676
|
-
setChatStickerSet
|
|
677
|
-
const { chatId } = mustGetMsg();
|
|
678
|
-
return this.setChatStickerSet(chatId, setName);
|
|
695
|
+
setChatStickerSet(setName) {
|
|
696
|
+
const { chatId } = mustGetMsg(this);
|
|
697
|
+
return this.client.setChatStickerSet(chatId, setName);
|
|
679
698
|
},
|
|
680
|
-
deleteChatStickerSet
|
|
681
|
-
const { chatId } = mustGetMsg();
|
|
682
|
-
return this.deleteChatStickerSet(chatId);
|
|
699
|
+
deleteChatStickerSet() {
|
|
700
|
+
const { chatId } = mustGetMsg(this);
|
|
701
|
+
return this.client.deleteChatStickerSet(chatId);
|
|
683
702
|
},
|
|
684
|
-
getBusinessConnection
|
|
685
|
-
const { businessConnectionId } = mustGetMsg();
|
|
703
|
+
getBusinessConnection() {
|
|
704
|
+
const { businessConnectionId } = mustGetMsg(this);
|
|
686
705
|
if (!businessConnectionId) {
|
|
687
706
|
unreachable();
|
|
688
707
|
}
|
|
689
|
-
return this.getBusinessConnection(businessConnectionId);
|
|
708
|
+
return this.client.getBusinessConnection(businessConnectionId);
|
|
690
709
|
},
|
|
691
|
-
answerPreCheckoutQuery
|
|
710
|
+
answerPreCheckoutQuery(ok, params) {
|
|
692
711
|
if (!("preCheckoutQuery" in update)) {
|
|
693
712
|
unreachable();
|
|
694
713
|
}
|
|
695
|
-
return this.answerPreCheckoutQuery(update.preCheckoutQuery.id, ok, params);
|
|
714
|
+
return this.client.answerPreCheckoutQuery(update.preCheckoutQuery.id, ok, params);
|
|
696
715
|
},
|
|
697
|
-
approveJoinRequest
|
|
698
|
-
const { chatId, userId } = mustGetMsg();
|
|
716
|
+
approveJoinRequest() {
|
|
717
|
+
const { chatId, userId } = mustGetMsg(this);
|
|
699
718
|
if (!userId) {
|
|
700
719
|
unreachable();
|
|
701
720
|
}
|
|
702
|
-
return this.approveJoinRequest(chatId, userId);
|
|
721
|
+
return this.client.approveJoinRequest(chatId, userId);
|
|
703
722
|
},
|
|
704
|
-
declineJoinRequest
|
|
705
|
-
const { chatId, userId } = mustGetMsg();
|
|
723
|
+
declineJoinRequest() {
|
|
724
|
+
const { chatId, userId } = mustGetMsg(this);
|
|
706
725
|
if (!userId) {
|
|
707
726
|
unreachable();
|
|
708
727
|
}
|
|
709
|
-
return this.declineJoinRequest(chatId, userId);
|
|
728
|
+
return this.client.declineJoinRequest(chatId, userId);
|
|
710
729
|
},
|
|
711
730
|
};
|
|
712
731
|
return cleanObject(context);
|
|
@@ -718,7 +737,7 @@ export class Client extends Composer {
|
|
|
718
737
|
#lastPropagatedConnectionState = null;
|
|
719
738
|
#stateChangeHandler = ((connected) => {
|
|
720
739
|
const connectionState = connected ? "ready" : "notConnected";
|
|
721
|
-
if (this.#lastPropagatedConnectionState
|
|
740
|
+
if (this.#lastPropagatedConnectionState !== connectionState) {
|
|
722
741
|
this.#propagateConnectionState(connectionState);
|
|
723
742
|
}
|
|
724
743
|
}).bind(this);
|
|
@@ -728,6 +747,7 @@ export class Client extends Composer {
|
|
|
728
747
|
await this.storage.initialize();
|
|
729
748
|
if (!this.#guaranteeUpdateDelivery) {
|
|
730
749
|
await this.storage.deleteUpdates();
|
|
750
|
+
await this.storage.commit(true);
|
|
731
751
|
}
|
|
732
752
|
this.#storageInited = true;
|
|
733
753
|
}
|
|
@@ -748,28 +768,39 @@ export class Client extends Composer {
|
|
|
748
768
|
if (this.#authString && !this.#authStringImported) {
|
|
749
769
|
await this.importAuthString(this.#authString);
|
|
750
770
|
}
|
|
751
|
-
const
|
|
752
|
-
if (authKey
|
|
753
|
-
if (!this.#client || this.#client.dc
|
|
771
|
+
const auth = this.storage.auth.mustGet();
|
|
772
|
+
if (auth.authKey !== null && auth.dc !== null) {
|
|
773
|
+
if (!this.#client || this.#client.dc !== auth.dc) {
|
|
754
774
|
this.#client?.disconnect();
|
|
755
|
-
this.#setMainClient(this.#newClient(dc, true, false));
|
|
775
|
+
this.#setMainClient(this.#newClient(auth.dc, true, false));
|
|
756
776
|
}
|
|
757
|
-
await this.#client.setAuthKey(authKey);
|
|
758
|
-
if (this.#client.serverSalt
|
|
777
|
+
await this.#client.setAuthKey(auth.authKey);
|
|
778
|
+
if (this.#client.serverSalt === 0n) {
|
|
759
779
|
this.#client.serverSalt = await this.storage.getServerSalt() ?? 0n;
|
|
760
780
|
}
|
|
761
781
|
}
|
|
762
782
|
else {
|
|
763
|
-
const dc =
|
|
764
|
-
if (!this.#client || this.#client.dc
|
|
783
|
+
const dc = auth.dc ?? this.#initialDc;
|
|
784
|
+
if (!this.#client || this.#client.dc !== dc) {
|
|
765
785
|
this.#client?.disconnect();
|
|
766
786
|
this.#setMainClient(this.#newClient(dc, true, false));
|
|
767
787
|
}
|
|
768
788
|
}
|
|
769
789
|
await this.#client.connect();
|
|
770
|
-
await
|
|
771
|
-
|
|
772
|
-
|
|
790
|
+
await this.storage.auth.update((v) => {
|
|
791
|
+
v.authKey = this.#client.authKey;
|
|
792
|
+
v.dc = this.#client.dc;
|
|
793
|
+
});
|
|
794
|
+
await this.storage.setServerSalt(this.#client.serverSalt);
|
|
795
|
+
this.#updateGapRecoveryLoop.start();
|
|
796
|
+
this.#clientDisconnectionLoop.start();
|
|
797
|
+
if (!this.#messageStorage_.isMemory) {
|
|
798
|
+
this.#storageWriteLoop.start();
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
this.#L.debug("not starting storageWriteLoop");
|
|
802
|
+
}
|
|
803
|
+
await this.storage.commit(true);
|
|
773
804
|
}
|
|
774
805
|
finally {
|
|
775
806
|
unlock();
|
|
@@ -781,101 +812,87 @@ export class Client extends Composer {
|
|
|
781
812
|
newDc += "-test";
|
|
782
813
|
}
|
|
783
814
|
this.disconnect();
|
|
784
|
-
await this.storage.
|
|
785
|
-
|
|
815
|
+
await this.storage.auth.update((v) => {
|
|
816
|
+
v.authKey = null;
|
|
817
|
+
v.dc = newDc;
|
|
818
|
+
});
|
|
786
819
|
await this.connect();
|
|
787
820
|
this.#LhandleMigrationError.debug(`migrated to DC${newDc}`);
|
|
788
821
|
}
|
|
789
|
-
disconnect() {
|
|
822
|
+
async disconnect() {
|
|
790
823
|
this.#disconnectAllClients();
|
|
791
|
-
this.#
|
|
792
|
-
this.#
|
|
824
|
+
this.#clientDisconnectionLoop.abort();
|
|
825
|
+
this.#updateGapRecoveryLoop.abort();
|
|
826
|
+
this.#storageWriteLoop.abort();
|
|
793
827
|
this.#updateManager.closeAllChats();
|
|
828
|
+
await this.messageStorage.commit(true);
|
|
794
829
|
}
|
|
795
830
|
#lastPropagatedAuthorizationState = null;
|
|
796
831
|
async #propagateAuthorizationState(authorized) {
|
|
797
|
-
if (this.#lastPropagatedAuthorizationState
|
|
832
|
+
if (this.#lastPropagatedAuthorizationState !== authorized) {
|
|
798
833
|
await this.#handleCtxUpdate({ authorizationState: { authorized } });
|
|
799
834
|
this.#lastPropagatedAuthorizationState = authorized;
|
|
800
835
|
}
|
|
801
836
|
}
|
|
802
837
|
async #getSelfId() {
|
|
803
838
|
const id = await this.storage.getAccountId();
|
|
804
|
-
if (id
|
|
839
|
+
if (id === null) {
|
|
805
840
|
throw new Error("Unauthorized");
|
|
806
841
|
}
|
|
807
842
|
return id;
|
|
808
843
|
}
|
|
809
844
|
async #getIsPremium() {
|
|
810
845
|
const maybeIsPremium = await this.storage.getIsPremium();
|
|
811
|
-
if (maybeIsPremium
|
|
846
|
+
if (maybeIsPremium !== null) {
|
|
812
847
|
return maybeIsPremium;
|
|
813
848
|
}
|
|
814
849
|
return this.#lastGetMe?.isPremium ?? false;
|
|
815
850
|
}
|
|
816
851
|
#lastUpdates = new Date();
|
|
817
|
-
#
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
this.#updateGapRecoveryLoopAbortController?.abort();
|
|
823
|
-
const controller = this.#updateGapRecoveryLoopAbortController = new AbortController();
|
|
824
|
-
while (this.connected) {
|
|
825
|
-
try {
|
|
826
|
-
await delay(60 * SECOND, { signal: controller.signal });
|
|
827
|
-
if (!this.connected) {
|
|
828
|
-
break;
|
|
829
|
-
}
|
|
830
|
-
controller.signal.throwIfAborted();
|
|
831
|
-
if (Date.now() - this.#lastUpdates.getTime() >= 15 * MINUTE) {
|
|
832
|
-
drop(this.#updateManager.recoverUpdateGap("lastUpdates").then(() => {
|
|
833
|
-
this.#lastUpdates = new Date();
|
|
834
|
-
}));
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
catch (err) {
|
|
838
|
-
if (err instanceof DOMException && err.name == "AbortError") {
|
|
839
|
-
break;
|
|
840
|
-
}
|
|
841
|
-
else if (!this.connected) {
|
|
842
|
-
break;
|
|
843
|
-
}
|
|
844
|
-
this.#LupdateGapRecoveryLoop.error(err);
|
|
845
|
-
}
|
|
852
|
+
#updateGapRecoveryLoop = new AbortableLoop(async (signal) => {
|
|
853
|
+
await delay(60 * SECOND, { signal });
|
|
854
|
+
if (!this.connected) {
|
|
855
|
+
this.#updateGapRecoveryLoop.abort();
|
|
856
|
+
return;
|
|
846
857
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
break;
|
|
872
|
-
}
|
|
873
|
-
else if (!this.connected) {
|
|
874
|
-
break;
|
|
875
|
-
}
|
|
858
|
+
if (Date.now() - this.#lastUpdates.getTime() >= 15 * MINUTE) {
|
|
859
|
+
drop(this.#updateManager.recoverUpdateGap("lastUpdates").then(() => {
|
|
860
|
+
this.#lastUpdates = new Date();
|
|
861
|
+
}));
|
|
862
|
+
}
|
|
863
|
+
}, (err) => {
|
|
864
|
+
if (!this.connected) {
|
|
865
|
+
this.#updateGapRecoveryLoop.abort();
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
this.#LupdateGapRecoveryLoop.error(err);
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
#clientDisconnectionLoop = new AbortableLoop(async (signal) => {
|
|
872
|
+
await delay(60 * SECOND, { signal });
|
|
873
|
+
if (!this.connected) {
|
|
874
|
+
this.#clientDisconnectionLoop.abort();
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
const now = Date.now();
|
|
878
|
+
const disconnectAfter = 5 * MINUTE;
|
|
879
|
+
for (const [i, client] of this.#clients.entries()) {
|
|
880
|
+
if (i > 0 && !client.disconnected && client.lastRequest && now - client.lastRequest.getTime() >= disconnectAfter) {
|
|
881
|
+
client?.disconnect();
|
|
876
882
|
}
|
|
877
883
|
}
|
|
878
|
-
}
|
|
884
|
+
}, () => {
|
|
885
|
+
if (!this.connected) {
|
|
886
|
+
this.#clientDisconnectionLoop.abort();
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
#storageWriteLoop = new AbortableLoop(async (signal) => {
|
|
890
|
+
await delay(60 * SECOND, { signal });
|
|
891
|
+
await this.messageStorage.commit();
|
|
892
|
+
await this.storage.commit();
|
|
893
|
+
}, (err) => {
|
|
894
|
+
this.#LstorageWriteLoop.error(err);
|
|
895
|
+
});
|
|
879
896
|
/**
|
|
880
897
|
* Signs in using the provided parameters if not already signed in.
|
|
881
898
|
* If no parameters are provided, the credentials will be prompted in runtime.
|
|
@@ -905,7 +922,7 @@ export class Client extends Composer {
|
|
|
905
922
|
}
|
|
906
923
|
if (typeof params === "undefined") {
|
|
907
924
|
const loginType = mustPromptOneOf("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
|
|
908
|
-
if (loginType
|
|
925
|
+
if (loginType === "b") {
|
|
909
926
|
params = { botToken: mustPrompt("Bot token:") };
|
|
910
927
|
}
|
|
911
928
|
else {
|
|
@@ -917,8 +934,11 @@ export class Client extends Composer {
|
|
|
917
934
|
while (true) {
|
|
918
935
|
try {
|
|
919
936
|
const auth = await this.invoke({ _: "auth.importBotAuthorization", api_id: this.#apiId, api_hash: this.#apiHash, bot_auth_token: params.botToken, flags: 0 });
|
|
920
|
-
await this.storage.
|
|
921
|
-
|
|
937
|
+
await this.storage.auth.update((v) => {
|
|
938
|
+
v.userId = Number(Api.as("auth.authorization", auth).user.id);
|
|
939
|
+
v.isBot = true;
|
|
940
|
+
});
|
|
941
|
+
await this.storage.commit(true);
|
|
922
942
|
break;
|
|
923
943
|
}
|
|
924
944
|
catch (err) {
|
|
@@ -984,8 +1004,10 @@ export class Client extends Composer {
|
|
|
984
1004
|
phone_code: code,
|
|
985
1005
|
phone_code_hash: sentCode.phone_code_hash,
|
|
986
1006
|
});
|
|
987
|
-
await this.storage.
|
|
988
|
-
|
|
1007
|
+
await this.storage.auth.update((v) => {
|
|
1008
|
+
v.userId = Number(Api.as("auth.authorization", auth).user.id);
|
|
1009
|
+
v.isBot = false;
|
|
1010
|
+
});
|
|
989
1011
|
this.#LsignIn.debug("signed in as user");
|
|
990
1012
|
await this.#propagateAuthorizationState(true);
|
|
991
1013
|
await this.#updateManager.fetchState("signIn");
|
|
@@ -1013,8 +1035,11 @@ export class Client extends Composer {
|
|
|
1013
1035
|
const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
|
|
1014
1036
|
const input = await checkPassword(password, ap);
|
|
1015
1037
|
const auth = await this.invoke({ _: "auth.checkPassword", password: input });
|
|
1016
|
-
await this.storage.
|
|
1017
|
-
|
|
1038
|
+
await this.storage.auth.update((v) => {
|
|
1039
|
+
v.userId = Number(Api.as("auth.authorization", auth).user.id);
|
|
1040
|
+
v.isBot = false;
|
|
1041
|
+
});
|
|
1042
|
+
await this.storage.commit(true);
|
|
1018
1043
|
this.#LsignIn.debug("signed in as user");
|
|
1019
1044
|
await this.#propagateAuthorizationState(true);
|
|
1020
1045
|
await this.#updateManager.fetchState("signIn");
|
|
@@ -1031,7 +1056,7 @@ export class Client extends Composer {
|
|
|
1031
1056
|
}
|
|
1032
1057
|
}
|
|
1033
1058
|
catch (err) {
|
|
1034
|
-
if (err
|
|
1059
|
+
if (err === restartAuth) {
|
|
1035
1060
|
continue auth;
|
|
1036
1061
|
}
|
|
1037
1062
|
else {
|
|
@@ -1082,15 +1107,15 @@ export class Client extends Composer {
|
|
|
1082
1107
|
}
|
|
1083
1108
|
#getMainClientMutex = new Mutex();
|
|
1084
1109
|
async #getMainClient(dc) {
|
|
1085
|
-
if (dc === undefined || dc
|
|
1110
|
+
if (dc === undefined || dc === this.#client?.dc) {
|
|
1086
1111
|
return this.#client;
|
|
1087
1112
|
}
|
|
1088
|
-
let client = this.#clients.find((v) => v.dc
|
|
1113
|
+
let client = this.#clients.find((v) => v.dc === dc);
|
|
1089
1114
|
if (client) {
|
|
1090
1115
|
return client;
|
|
1091
1116
|
}
|
|
1092
1117
|
const unlock = await this.#getMainClientMutex.lock();
|
|
1093
|
-
client = this.#clients.find((v) => v.dc
|
|
1118
|
+
client = this.#clients.find((v) => v.dc === dc);
|
|
1094
1119
|
if (client) {
|
|
1095
1120
|
return client;
|
|
1096
1121
|
}
|
|
@@ -1123,7 +1148,7 @@ export class Client extends Composer {
|
|
|
1123
1148
|
}
|
|
1124
1149
|
async #getUploadPoolSize() {
|
|
1125
1150
|
const dc = this.#client.dc;
|
|
1126
|
-
return (dc
|
|
1151
|
+
return (dc !== "2" && dc !== "4") || await this.#getIsPremium() ? 8 : 4;
|
|
1127
1152
|
}
|
|
1128
1153
|
async #getUploadClient() {
|
|
1129
1154
|
const dc = this.#client.dc;
|
|
@@ -1142,19 +1167,21 @@ export class Client extends Composer {
|
|
|
1142
1167
|
return client;
|
|
1143
1168
|
}
|
|
1144
1169
|
async #setupClient(client) {
|
|
1145
|
-
const storage = client.dc
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1170
|
+
const storage = client.dc === this.#client.dc ? this.storage : new StorageOperations(this.storage.provider.branch(client.dc + (client.cdn ? "_cdn" : "")));
|
|
1171
|
+
await storage.initialize();
|
|
1172
|
+
const auth = storage.auth.mustGet();
|
|
1173
|
+
const serverSalt = await storage.getServerSalt();
|
|
1174
|
+
if (auth.authKey !== null) {
|
|
1175
|
+
await client.setAuthKey(auth.authKey);
|
|
1149
1176
|
if (serverSalt) {
|
|
1150
1177
|
client.serverSalt = serverSalt;
|
|
1151
1178
|
}
|
|
1152
1179
|
}
|
|
1153
1180
|
await client.connect();
|
|
1154
|
-
if (
|
|
1181
|
+
if (auth.authKey === null) {
|
|
1155
1182
|
await this.#importAuthorization(client);
|
|
1156
1183
|
}
|
|
1157
|
-
await storage.
|
|
1184
|
+
await storage.auth.update((v) => v.authKey = client.authKey);
|
|
1158
1185
|
if (client.dc !== this.#client.dc) {
|
|
1159
1186
|
await storage.setServerSalt(client.serverSalt);
|
|
1160
1187
|
client.handlers.onNewServerSalt = async (serverSalt) => {
|
|
@@ -1163,10 +1190,11 @@ export class Client extends Composer {
|
|
|
1163
1190
|
}
|
|
1164
1191
|
}
|
|
1165
1192
|
async #importAuthorization(client) {
|
|
1166
|
-
if (this.#client.dc
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
|
|
1193
|
+
if (this.#client.dc === client.dc && this.#client.cdn === client.cdn) {
|
|
1194
|
+
const auth = this.storage.auth.mustGet();
|
|
1195
|
+
const serverSalt = await this.storage.getServerSalt();
|
|
1196
|
+
if (auth.authKey !== null) {
|
|
1197
|
+
await client.setAuthKey(auth.authKey);
|
|
1170
1198
|
if (serverSalt) {
|
|
1171
1199
|
client.serverSalt = serverSalt;
|
|
1172
1200
|
}
|
|
@@ -1232,7 +1260,7 @@ export class Client extends Composer {
|
|
|
1232
1260
|
this.#handleInvokeError = async (ctx, next) => {
|
|
1233
1261
|
let result = null;
|
|
1234
1262
|
return await handle(ctx, async () => {
|
|
1235
|
-
if (result
|
|
1263
|
+
if (result !== null)
|
|
1236
1264
|
return result;
|
|
1237
1265
|
result = await handler(ctx, next);
|
|
1238
1266
|
return result;
|
|
@@ -1252,23 +1280,17 @@ export class Client extends Composer {
|
|
|
1252
1280
|
await this.storage.importAuthString(authString);
|
|
1253
1281
|
this.#authStringImported = true;
|
|
1254
1282
|
if (!this.#apiId) {
|
|
1255
|
-
this.#apiId =
|
|
1283
|
+
this.#apiId = this.storage.auth.mustGet().apiId;
|
|
1256
1284
|
}
|
|
1257
1285
|
}
|
|
1258
1286
|
async #getUserAccessHash(userId) {
|
|
1259
1287
|
const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUser", user_id: userId, access_hash: 0n }] });
|
|
1260
1288
|
const user = Api.is("user", users[0]) ? users[0] : undefined;
|
|
1261
|
-
if (user) {
|
|
1262
|
-
await this.messageStorage.setEntity(user);
|
|
1263
|
-
}
|
|
1264
1289
|
return user?.access_hash ?? 0n;
|
|
1265
1290
|
}
|
|
1266
1291
|
async #getChannelAccessHash(channelId) {
|
|
1267
1292
|
const channels = await this.invoke({ _: "channels.getChannels", id: [{ _: "inputChannel", channel_id: channelId, access_hash: 0n }] });
|
|
1268
1293
|
const channel = Api.is("channel", channels.chats[0]) ? channels.chats[0] : undefined;
|
|
1269
|
-
if (channel) {
|
|
1270
|
-
await this.messageStorage.setEntity(channel);
|
|
1271
|
-
}
|
|
1272
1294
|
return channel?.access_hash ?? 0n;
|
|
1273
1295
|
}
|
|
1274
1296
|
/**
|
|
@@ -1277,11 +1299,11 @@ export class Client extends Composer {
|
|
|
1277
1299
|
* @param id The identifier of a chat.
|
|
1278
1300
|
*/
|
|
1279
1301
|
async getInputPeer(id) {
|
|
1280
|
-
if (id === "me" || id
|
|
1302
|
+
if (id === "me" || id === await this.#getSelfId()) {
|
|
1281
1303
|
return { _: "inputPeerSelf" };
|
|
1282
1304
|
}
|
|
1283
1305
|
const inputPeer = await this.#getInputPeerInner(id);
|
|
1284
|
-
if (((Api.is("inputPeerUser", inputPeer) || Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash
|
|
1306
|
+
if (((Api.is("inputPeerUser", inputPeer) || Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash === 0n) && this.storage.isBot) {
|
|
1285
1307
|
if ("channel_id" in inputPeer) {
|
|
1286
1308
|
inputPeer.access_hash = await this.#getChannelAccessHash(inputPeer.channel_id);
|
|
1287
1309
|
}
|
|
@@ -1289,7 +1311,7 @@ export class Client extends Composer {
|
|
|
1289
1311
|
inputPeer.access_hash = await this.#getUserAccessHash(inputPeer.user_id);
|
|
1290
1312
|
}
|
|
1291
1313
|
}
|
|
1292
|
-
if ((Api.is("inputPeerUser", inputPeer) || Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash
|
|
1314
|
+
if ((Api.is("inputPeerUser", inputPeer) || Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash === 0n) {
|
|
1293
1315
|
throw new AccessError(`Cannot access the chat ${id} because there is no access hash for it.`);
|
|
1294
1316
|
}
|
|
1295
1317
|
return inputPeer;
|
|
@@ -1338,8 +1360,8 @@ export class Client extends Composer {
|
|
|
1338
1360
|
if (typeof id === "string") {
|
|
1339
1361
|
id = getUsername(id);
|
|
1340
1362
|
let resolvedId = 0;
|
|
1341
|
-
const maybeUsername = await this.messageStorage.
|
|
1342
|
-
if (maybeUsername
|
|
1363
|
+
const maybeUsername = await this.messageStorage.usernames.get([id]);
|
|
1364
|
+
if (maybeUsername !== null && Date.now() - maybeUsername[1].getTime() < USERNAME_TTL) {
|
|
1343
1365
|
const [id] = maybeUsername;
|
|
1344
1366
|
resolvedId = id;
|
|
1345
1367
|
}
|
|
@@ -1358,11 +1380,11 @@ export class Client extends Composer {
|
|
|
1358
1380
|
}
|
|
1359
1381
|
}
|
|
1360
1382
|
const resolvedIdType = Api.getChatIdPeerType(resolvedId);
|
|
1361
|
-
if (resolvedIdType
|
|
1383
|
+
if (resolvedIdType === "user") {
|
|
1362
1384
|
const accessHash = await this.messageStorage.getUserAccessHash(resolvedId);
|
|
1363
1385
|
peer = { _: "inputPeerUser", user_id: Api.chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
|
|
1364
1386
|
}
|
|
1365
|
-
else if (resolvedIdType
|
|
1387
|
+
else if (resolvedIdType === "channel") {
|
|
1366
1388
|
const accessHash = await this.messageStorage.getChannelAccessHash(resolvedId);
|
|
1367
1389
|
peer = { _: "inputPeerChannel", channel_id: Api.chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
|
|
1368
1390
|
}
|
|
@@ -1377,7 +1399,7 @@ export class Client extends Composer {
|
|
|
1377
1399
|
else if (-MAX_CHAT_ID <= id) {
|
|
1378
1400
|
peer = { _: "inputPeerChat", chat_id: BigInt(Math.abs(id)) };
|
|
1379
1401
|
}
|
|
1380
|
-
else if (ZERO_CHANNEL_ID - MAX_CHANNEL_ID <= id && id
|
|
1402
|
+
else if (ZERO_CHANNEL_ID - MAX_CHANNEL_ID <= id && id !== ZERO_CHANNEL_ID) {
|
|
1381
1403
|
const accessHash = await this.messageStorage.getChannelAccessHash(id);
|
|
1382
1404
|
peer = { _: "inputPeerChannel", channel_id: Api.chatIdToPeerId(id), access_hash: accessHash ?? 0n };
|
|
1383
1405
|
}
|
|
@@ -1385,23 +1407,24 @@ export class Client extends Composer {
|
|
|
1385
1407
|
throw new InputError("The ID is of an format unknown.");
|
|
1386
1408
|
}
|
|
1387
1409
|
if (!Api.is("inputPeerChat", peer) && !peer.access_hash) {
|
|
1388
|
-
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
}
|
|
1410
|
+
// TODO
|
|
1411
|
+
// const chatId = Api.peerToChatId(peer);
|
|
1412
|
+
// const minPeerReference = await this.messageStorage.getLastMinPeerReference(chatId);
|
|
1413
|
+
// if (minPeerReference) {
|
|
1414
|
+
// const minInputPeer = await this.#getMinInputPeer(canBeInputChannel(peer) ? "channel" : "user", { ...minPeerReference, senderId: chatId });
|
|
1415
|
+
// if (minInputPeer) {
|
|
1416
|
+
// this.#Lmin.debug("resolved input min peer", minInputPeer);
|
|
1417
|
+
// peer = minInputPeer;
|
|
1418
|
+
// }
|
|
1419
|
+
// }
|
|
1397
1420
|
}
|
|
1398
1421
|
return peer;
|
|
1399
1422
|
}
|
|
1400
1423
|
async #getMinInputPeer(type, reference) {
|
|
1401
|
-
const
|
|
1402
|
-
if (
|
|
1403
|
-
const peer = { _: "inputPeerChannel", channel_id:
|
|
1404
|
-
if (type
|
|
1424
|
+
const peer_ = await this.messageStorage.peers.get([reference.chatId]);
|
|
1425
|
+
if (peer_ !== null && (peer_[0].type === "channel" || peer_[0].type === "supergroup")) {
|
|
1426
|
+
const peer = { _: "inputPeerChannel", channel_id: BigInt(peer_[0].id), access_hash: peer_[1] };
|
|
1427
|
+
if (type === "user") {
|
|
1405
1428
|
return { _: "inputPeerUserFromMessage", peer, msg_id: reference.messageId, user_id: Api.chatIdToPeerId(reference.senderId) };
|
|
1406
1429
|
}
|
|
1407
1430
|
else {
|
|
@@ -1412,16 +1435,19 @@ export class Client extends Composer {
|
|
|
1412
1435
|
return null;
|
|
1413
1436
|
}
|
|
1414
1437
|
}
|
|
1415
|
-
async [
|
|
1438
|
+
async [getPeer](peer) {
|
|
1416
1439
|
const id = Api.peerToChatId(peer);
|
|
1417
|
-
const entity = await this.messageStorage.
|
|
1418
|
-
if (entity
|
|
1440
|
+
const entity = await this.messageStorage.peers.get([id]);
|
|
1441
|
+
if (entity === null && this.storage.isBot && Api.is("peerUser", peer) || Api.is("peerChannel", peer)) {
|
|
1419
1442
|
await this.getInputPeer(id);
|
|
1420
1443
|
}
|
|
1421
1444
|
else {
|
|
1422
1445
|
return entity;
|
|
1423
1446
|
}
|
|
1424
|
-
return await this.messageStorage.
|
|
1447
|
+
return await this.messageStorage.peers.get([id]);
|
|
1448
|
+
}
|
|
1449
|
+
[mustGetPeer](peer) {
|
|
1450
|
+
return this.messageStorage.peers.mustGet([peerToChatId(peer)]);
|
|
1425
1451
|
}
|
|
1426
1452
|
async #handleCtxUpdate(update) {
|
|
1427
1453
|
if (this.#disableUpdates && !("authorizationState" in update) && !("connectionState" in update)) {
|
|
@@ -1441,65 +1467,81 @@ export class Client extends Composer {
|
|
|
1441
1467
|
});
|
|
1442
1468
|
}
|
|
1443
1469
|
async #handleUpdate(update) {
|
|
1444
|
-
const
|
|
1470
|
+
const maybePromises = new Array();
|
|
1445
1471
|
if (Api.is("updateUserName", update)) {
|
|
1446
|
-
|
|
1472
|
+
const value = [Number(update.user_id), new Date()];
|
|
1473
|
+
for (const username_ of update.usernames) {
|
|
1474
|
+
const username = username_.username.toLowerCase();
|
|
1475
|
+
this.messageStorage.usernames.set([username], value);
|
|
1476
|
+
}
|
|
1447
1477
|
const peer = { ...update, _: "peerUser" };
|
|
1448
|
-
const
|
|
1449
|
-
if (
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1478
|
+
const peer_ = await this[getPeer](peer);
|
|
1479
|
+
if (peer_ !== null) {
|
|
1480
|
+
const username = update.usernames[0];
|
|
1481
|
+
if (username !== undefined) {
|
|
1482
|
+
peer_[0].username = username.username;
|
|
1483
|
+
const also = update.usernames.filter((v) => v !== username);
|
|
1484
|
+
if (also.length) {
|
|
1485
|
+
peer_[0].also = also.map((v) => v.username);
|
|
1486
|
+
}
|
|
1487
|
+
else {
|
|
1488
|
+
delete peer_[0].also;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
else {
|
|
1492
|
+
delete peer_[0].username;
|
|
1493
|
+
}
|
|
1494
|
+
this.messageStorage.setPeer2(peer_[0], peer_[1]);
|
|
1454
1495
|
}
|
|
1455
1496
|
}
|
|
1456
1497
|
if (this.#messageManager.canHandleUpdate(update)) {
|
|
1457
|
-
|
|
1498
|
+
maybePromises.push(() => this.#messageManager.handleUpdate(update));
|
|
1458
1499
|
}
|
|
1459
1500
|
if (this.#chatManager.canHandleUpdate(update)) {
|
|
1460
|
-
|
|
1501
|
+
maybePromises.push(() => this.#chatManager.handleUpdate(update));
|
|
1461
1502
|
}
|
|
1462
1503
|
if (this.#pollManager.canHandleUpdate(update)) {
|
|
1463
|
-
|
|
1504
|
+
maybePromises.push(() => this.#pollManager.handleUpdate(update));
|
|
1464
1505
|
}
|
|
1465
1506
|
if (this.#videoChatManager.canHandleUpdate(update)) {
|
|
1466
|
-
|
|
1507
|
+
maybePromises.push(() => this.#videoChatManager.handleUpdate(update));
|
|
1467
1508
|
}
|
|
1468
1509
|
if (this.#callbackQueryManager.canHandleUpdate(update)) {
|
|
1469
|
-
|
|
1510
|
+
maybePromises.push(() => this.#callbackQueryManager.handleUpdate(update));
|
|
1470
1511
|
}
|
|
1471
1512
|
if (this.#inlineQueryManager.canHandleUpdate(update)) {
|
|
1472
|
-
|
|
1513
|
+
maybePromises.push(() => this.#inlineQueryManager.handleUpdate(update));
|
|
1473
1514
|
}
|
|
1474
1515
|
if (this.#linkPreviewManager.canHandleUpdate(update)) {
|
|
1475
|
-
|
|
1516
|
+
maybePromises.push(() => this.#linkPreviewManager.handleUpdate(update));
|
|
1476
1517
|
}
|
|
1477
1518
|
if (this.#reactionManager.canHandleUpdate(update)) {
|
|
1478
|
-
|
|
1519
|
+
maybePromises.push(() => this.#reactionManager.handleUpdate(update));
|
|
1479
1520
|
}
|
|
1480
1521
|
if (this.#chatListManager.canHandleUpdate(update)) {
|
|
1481
|
-
|
|
1522
|
+
maybePromises.push(() => this.#chatListManager.handleUpdate(update));
|
|
1482
1523
|
}
|
|
1483
1524
|
if (this.#storyManager.canHandleUpdate(update)) {
|
|
1484
|
-
|
|
1525
|
+
maybePromises.push(() => this.#storyManager.handleUpdate(update));
|
|
1485
1526
|
}
|
|
1486
1527
|
if (this.#businessConnectionManager.canHandleUpdate(update)) {
|
|
1487
|
-
|
|
1528
|
+
maybePromises.push(() => this.#businessConnectionManager.handleUpdate(update));
|
|
1488
1529
|
}
|
|
1489
1530
|
if (this.#storyManager.canHandleUpdate(update)) {
|
|
1490
|
-
|
|
1531
|
+
maybePromises.push(() => this.#storyManager.handleUpdate(update));
|
|
1491
1532
|
}
|
|
1492
1533
|
if (this.#paymentManager.canHandleUpdate(update)) {
|
|
1493
|
-
|
|
1534
|
+
maybePromises.push(() => this.#paymentManager.handleUpdate(update));
|
|
1494
1535
|
}
|
|
1495
1536
|
if (this.#translationsManager.canHandleUpdate(update)) {
|
|
1496
|
-
|
|
1537
|
+
maybePromises.push(() => this.#translationsManager.handleUpdate(update));
|
|
1497
1538
|
}
|
|
1498
1539
|
return () => Promise.resolve().then(async () => {
|
|
1499
|
-
const updates =
|
|
1500
|
-
for (const
|
|
1540
|
+
const updates = [{ update }];
|
|
1541
|
+
for (const maybePromise of maybePromises) {
|
|
1501
1542
|
try {
|
|
1502
|
-
const
|
|
1543
|
+
const value = maybePromise();
|
|
1544
|
+
const update = value instanceof Promise ? await value : value;
|
|
1503
1545
|
if (update) {
|
|
1504
1546
|
updates.push(update);
|
|
1505
1547
|
}
|
|
@@ -1516,7 +1558,6 @@ export class Client extends Composer {
|
|
|
1516
1558
|
if ("deletedMessages" in update) {
|
|
1517
1559
|
for (const { chatId, messageId } of update.deletedMessages) {
|
|
1518
1560
|
await this.messageStorage.setMessage(chatId, messageId, null);
|
|
1519
|
-
await this.#chatListManager.reassignChatLastMessage(chatId);
|
|
1520
1561
|
}
|
|
1521
1562
|
}
|
|
1522
1563
|
}
|
|
@@ -1525,7 +1566,7 @@ export class Client extends Composer {
|
|
|
1525
1566
|
}
|
|
1526
1567
|
#lastGetMe = null;
|
|
1527
1568
|
async #getMe() {
|
|
1528
|
-
if (this.#lastGetMe
|
|
1569
|
+
if (this.#lastGetMe !== null) {
|
|
1529
1570
|
return this.#lastGetMe;
|
|
1530
1571
|
}
|
|
1531
1572
|
else {
|
|
@@ -1537,7 +1578,7 @@ export class Client extends Composer {
|
|
|
1537
1578
|
#previouslyConnected = false;
|
|
1538
1579
|
#lastConnectionState = false;
|
|
1539
1580
|
#onConnectionStateChange(connected) {
|
|
1540
|
-
if (this.#lastConnectionState
|
|
1581
|
+
if (this.#lastConnectionState !== connected) {
|
|
1541
1582
|
if (connected) {
|
|
1542
1583
|
if (this.#previouslyConnected) {
|
|
1543
1584
|
drop(this.#updateManager.recoverUpdateGap("reconnect"));
|
|
@@ -1557,14 +1598,13 @@ export class Client extends Composer {
|
|
|
1557
1598
|
* @method ac
|
|
1558
1599
|
*/
|
|
1559
1600
|
async getMe() {
|
|
1560
|
-
let
|
|
1561
|
-
if (
|
|
1601
|
+
let chatP = (await this[getPeer]({ _: "peerUser", user_id: BigInt(await this.#getSelfId()) }))?.[0] ?? null;
|
|
1602
|
+
if (chatP === null) {
|
|
1562
1603
|
const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUserSelf" }] });
|
|
1563
|
-
|
|
1564
|
-
await this.
|
|
1565
|
-
await this.storage.setIsPremium(user_.premium ?? false);
|
|
1604
|
+
chatP = constructChatP(Api.as("user", users[0]));
|
|
1605
|
+
await this.storage.setIsPremium(chatP.isPremium);
|
|
1566
1606
|
}
|
|
1567
|
-
const user =
|
|
1607
|
+
const user = constructUser2(chatP);
|
|
1568
1608
|
this.#lastGetMe = user;
|
|
1569
1609
|
return user;
|
|
1570
1610
|
}
|
|
@@ -2183,14 +2223,12 @@ export class Client extends Composer {
|
|
|
2183
2223
|
await this.#messageManager.sendChatAction(chatId, action, params);
|
|
2184
2224
|
}
|
|
2185
2225
|
/**
|
|
2186
|
-
* Search
|
|
2226
|
+
* Search for messages. User-only.
|
|
2187
2227
|
*
|
|
2188
2228
|
* @method ms
|
|
2189
|
-
* @param chatId The identifier of a chat.
|
|
2190
|
-
* @param query The message search query.
|
|
2191
2229
|
*/
|
|
2192
|
-
async searchMessages(
|
|
2193
|
-
return await this.#messageManager.searchMessages(
|
|
2230
|
+
async searchMessages(params) {
|
|
2231
|
+
return await this.#messageManager.searchMessages(params);
|
|
2194
2232
|
}
|
|
2195
2233
|
/**
|
|
2196
2234
|
* Mark messages as read. User-only.
|
|
@@ -2224,6 +2262,15 @@ export class Client extends Composer {
|
|
|
2224
2262
|
return await this.#messageManager.transcribeVoice(chatId, messageId);
|
|
2225
2263
|
}
|
|
2226
2264
|
/**
|
|
2265
|
+
* Get a sticker set.
|
|
2266
|
+
*
|
|
2267
|
+
* @method ms
|
|
2268
|
+
* @param name The name of the sticker set or its link.
|
|
2269
|
+
*/
|
|
2270
|
+
async getStickerSet(name) {
|
|
2271
|
+
return await this.#messageManager.getStickerSet(name);
|
|
2272
|
+
}
|
|
2273
|
+
/*
|
|
2227
2274
|
* Get the link preview for a message that is about to be sent. User-only.
|
|
2228
2275
|
*
|
|
2229
2276
|
* @method ms
|
|
@@ -2252,6 +2299,23 @@ export class Client extends Composer {
|
|
|
2252
2299
|
async getProgressId() {
|
|
2253
2300
|
return await this.#fileManager.getProgressId();
|
|
2254
2301
|
}
|
|
2302
|
+
/**
|
|
2303
|
+
* Get messages saved from a specific chat.
|
|
2304
|
+
*
|
|
2305
|
+
* @method ms
|
|
2306
|
+
* @param chatId The identifier of a chat.
|
|
2307
|
+
*/
|
|
2308
|
+
async getSavedMessages(chatId, params) {
|
|
2309
|
+
return await this.#messageManager.getSavedMessages(chatId, params);
|
|
2310
|
+
}
|
|
2311
|
+
/**
|
|
2312
|
+
* Get a list of saved chats.
|
|
2313
|
+
*
|
|
2314
|
+
* @method ms
|
|
2315
|
+
*/
|
|
2316
|
+
async getSavedChats(params) {
|
|
2317
|
+
return await this.#messageManager.getSavedChats(params);
|
|
2318
|
+
}
|
|
2255
2319
|
//
|
|
2256
2320
|
// ========================= POLLS ========================= //
|
|
2257
2321
|
//
|
|
@@ -2783,9 +2847,10 @@ export class Client extends Composer {
|
|
|
2783
2847
|
* @method ch
|
|
2784
2848
|
* @param chatId The identifier of the group.
|
|
2785
2849
|
* @param enabled Whether topics should be enabled in the group.
|
|
2850
|
+
* @param tabs Whether topics should be displayed as tabs.
|
|
2786
2851
|
*/
|
|
2787
|
-
async setTopicsEnabled(chatId, enabled) {
|
|
2788
|
-
await this.#chatManager.setTopicsEnabled(chatId, enabled);
|
|
2852
|
+
async setTopicsEnabled(chatId, enabled, tabs) {
|
|
2853
|
+
await this.#chatManager.setTopicsEnabled(chatId, enabled, tabs);
|
|
2789
2854
|
}
|
|
2790
2855
|
/**
|
|
2791
2856
|
* Enable or disable automatic anti-spam in a group. User-only.
|