@mtkruto/browser 0.6.1 → 0.119.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/README.md +75 -1
- package/esm/0_deps.d.ts +23 -13
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +25 -15
- package/esm/0_errors.d.ts +9 -2
- package/esm/0_errors.d.ts.map +1 -1
- package/esm/0_errors.js +35 -1
- package/esm/1_utilities.d.ts +6 -7
- package/esm/1_utilities.d.ts.map +1 -1
- package/esm/1_utilities.js +6 -7
- package/esm/2_connection.d.ts +1 -1
- package/esm/2_connection.js +1 -1
- package/esm/2_storage.d.ts +1 -1
- package/esm/2_storage.js +1 -1
- package/esm/2_tl.d.ts +7 -10
- package/esm/2_tl.d.ts.map +1 -1
- package/esm/2_tl.js +7 -10
- package/esm/3_errors.d.ts +8 -3
- package/esm/3_errors.d.ts.map +1 -1
- package/esm/3_errors.js +9 -2
- package/esm/3_transport.d.ts +4 -4
- package/esm/3_transport.js +4 -4
- package/esm/3_types.d.ts +74 -34
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +74 -34
- package/esm/4_constants.d.ts +21 -2
- package/esm/4_constants.d.ts.map +1 -1
- package/esm/4_constants.js +4 -4
- package/esm/4_errors.d.ts +4 -4
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/4_errors.js +1 -1
- package/esm/4_session.d.ts +24 -0
- package/esm/4_session.d.ts.map +1 -0
- package/esm/4_session.js +23 -0
- package/esm/5_client.d.ts +9 -3
- package/esm/5_client.d.ts.map +1 -1
- package/esm/5_client.js +9 -3
- package/esm/_dnt.polyfills.d.ts +119 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +247 -1
- package/esm/_dnt.shims.d.ts +0 -1
- package/esm/_dnt.shims.d.ts.map +1 -1
- 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 +69 -0
- package/esm/client/0_client_abstract.d.ts +31 -28
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_client_abstract.js +21 -90
- package/esm/client/0_html.d.ts +4 -3
- package/esm/client/0_html.d.ts.map +1 -1
- package/esm/client/0_html.js +412 -74
- package/esm/client/0_markdown.d.ts +2 -2
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +39 -19
- package/esm/client/0_params.d.ts +324 -41
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_params.js +1 -1
- package/esm/client/0_password.d.ts +6 -6
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +13 -13
- package/esm/client/0_storage_operations.d.ts +81 -69
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +356 -235
- package/esm/client/0_update_processor.d.ts +26 -0
- package/esm/client/0_update_processor.d.ts.map +1 -0
- package/esm/client/0_update_processor.js +20 -0
- package/esm/client/0_utilities.d.ts +10 -5
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +45 -31
- package/esm/client/0_worker_error.d.ts +26 -0
- package/esm/client/0_worker_error.d.ts.map +1 -0
- package/esm/client/0_worker_error.js +86 -0
- package/esm/client/0_worker_request.d.ts +27 -0
- package/esm/client/0_worker_request.d.ts.map +1 -0
- package/esm/client/0_worker_request.js +20 -0
- package/esm/client/1_client_generic.d.ts +1846 -0
- package/esm/client/1_client_generic.d.ts.map +1 -0
- package/esm/client/1_client_generic.js +24 -0
- package/esm/client/1_client_plain.d.ts +12 -9
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +41 -52
- package/esm/client/1_invoke_middleware.d.ts +32 -0
- package/esm/client/1_invoke_middleware.d.ts.map +1 -0
- package/esm/client/1_invoke_middleware.js +22 -0
- package/esm/client/1_types.d.ts +17 -32
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/1_types.js +1 -1
- package/esm/client/1_worker_response.d.ts +37 -0
- package/esm/client/1_worker_response.d.ts.map +1 -0
- package/esm/client/1_worker_response.js +20 -0
- package/esm/client/2_account_manager.d.ts +43 -5
- package/esm/client/2_account_manager.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +338 -9
- package/esm/client/2_bot_info_manager.d.ts +12 -5
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_bot_info_manager.js +15 -1
- package/esm/client/2_business_connection_manager.d.ts +6 -5
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +9 -9
- package/esm/client/2_client_encrypted.d.ts +58 -0
- package/esm/client/2_client_encrypted.d.ts.map +1 -0
- package/esm/client/2_client_encrypted.js +290 -0
- package/esm/client/2_file_manager.d.ts +27 -7
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +238 -193
- package/esm/client/2_network_statistics_manager.d.ts +5 -5
- package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
- package/esm/client/2_network_statistics_manager.js +36 -10
- package/esm/client/2_payment_manager.d.ts +8 -7
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +7 -7
- package/esm/client/2_reaction_manager.d.ts +6 -5
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +14 -14
- package/esm/client/2_sign_in.d.ts +25 -0
- package/esm/client/2_sign_in.d.ts.map +1 -0
- package/esm/client/2_sign_in.js +114 -0
- package/esm/client/2_translations_manager.d.ts +35 -0
- package/esm/client/2_translations_manager.d.ts.map +1 -0
- package/esm/client/2_translations_manager.js +171 -0
- package/esm/client/2_update_manager.d.ts +11 -8
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +354 -296
- package/esm/client/3_client_encrypted_pool.d.ts +29 -0
- package/esm/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/esm/client/3_client_encrypted_pool.js +63 -0
- package/esm/client/3_filters.d.ts +96 -0
- package/esm/client/3_filters.d.ts.map +1 -0
- package/esm/client/3_filters.js +52 -0
- package/esm/client/3_message_manager.d.ts +30 -35
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +791 -493
- package/esm/client/3_video_chat_manager.d.ts +11 -10
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +49 -46
- package/esm/client/4_callback_query_manager.d.ts +9 -8
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +14 -13
- package/esm/client/4_chat_list_manager.d.ts +20 -11
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +143 -367
- package/esm/client/4_chat_manager.d.ts +86 -0
- package/esm/client/4_chat_manager.d.ts.map +1 -0
- package/esm/client/4_chat_manager.js +486 -0
- package/esm/client/4_checklist_manager.d.ts +38 -0
- package/esm/client/4_checklist_manager.d.ts.map +1 -0
- package/esm/client/4_checklist_manager.js +81 -0
- package/esm/client/4_context.d.ts +691 -0
- package/esm/client/4_context.d.ts.map +1 -0
- package/esm/client/4_context.js +1421 -0
- package/esm/client/4_forum_manager.d.ts +40 -0
- package/esm/client/4_forum_manager.d.ts.map +1 -0
- package/esm/client/4_forum_manager.js +134 -0
- package/esm/client/4_gift_manager.d.ts +39 -0
- package/esm/client/4_gift_manager.d.ts.map +1 -0
- package/esm/client/4_gift_manager.js +97 -0
- package/esm/client/4_inline_query_manager.d.ts +10 -9
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +15 -15
- package/esm/client/4_link_preview_manager.d.ts +39 -0
- package/esm/client/4_link_preview_manager.d.ts.map +1 -0
- package/esm/client/4_link_preview_manager.js +64 -0
- package/esm/client/4_poll_manager.d.ts +39 -0
- package/esm/client/4_poll_manager.d.ts.map +1 -0
- package/esm/client/4_poll_manager.js +118 -0
- package/esm/client/4_story_manager.d.ts +11 -10
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +21 -21
- package/esm/client/5_composer.d.ts +51 -0
- package/esm/client/5_composer.d.ts.map +1 -0
- package/esm/client/5_composer.js +119 -0
- package/esm/client/6_client.d.ts +1952 -0
- package/esm/client/6_client.d.ts.map +1 -0
- package/esm/client/6_client.js +3439 -0
- package/esm/client/6_client_dispatcher.d.ts +1917 -0
- package/esm/client/6_client_dispatcher.d.ts.map +1 -0
- package/esm/client/6_client_dispatcher.js +2493 -0
- package/esm/client/7_client_worker.d.ts +27 -0
- package/esm/client/7_client_worker.d.ts.map +1 -0
- package/esm/client/7_client_worker.js +89 -0
- package/esm/connection/0_connection.d.ts +9 -8
- package/esm/connection/0_connection.d.ts.map +1 -1
- package/esm/connection/0_connection.js +1 -1
- package/esm/connection/1_connection_tcp.d.ts +4 -5
- package/esm/connection/1_connection_tcp.d.ts.map +1 -1
- package/esm/connection/1_connection_tcp.js +26 -27
- package/esm/connection/1_connection_web_socket.d.ts +3 -3
- package/esm/connection/1_connection_web_socket.d.ts.map +1 -1
- package/esm/connection/1_connection_web_socket.js +10 -13
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts +18 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.js +63 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts +3 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts.map +1 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +301 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts +17 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts +25 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.js +194 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts +37 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.js +61 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.d.ts +19 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.js +20 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts +2 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/_util.js +6 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +107 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/abortable.js +46 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +37 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/deadline.js +41 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +44 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/debounce.js +57 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/delay.d.ts +45 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/delay.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/delay.js +84 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts +22 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mod.js +23 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +111 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +170 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/pool.d.ts +33 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/pool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/pool.js +99 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts +155 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/retry.js +147 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts +43 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/tee.js +102 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts +9 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.js +2 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts +21 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.js +32 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts +22 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.js +82 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts +24 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.js +34 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts +12 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.js +69 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts +155 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.js +205 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts +111 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.js +82 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts +19 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.js +550 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts +265 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.js +266 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/format.d.ts +70 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/format.js +66 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +23 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.js +51 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +35 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.js +113 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +13 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +2 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +40 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.js +82 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +39 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.js +87 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +12 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +80 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.js +116 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff.js +276 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.js +182 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts +29 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.js +70 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +5 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/styles.js +207 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts +25 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.js +3 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/_constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/_constants.js +4 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/iterate_reader.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/iterate_reader.js +96 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/types.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +7 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +40 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +46 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +77 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +52 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +93 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +21 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +45 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +58 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +27 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +47 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +38 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +77 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +135 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +34 -0
- package/esm/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.js +35 -0
- package/esm/mod.d.ts +2 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -2
- package/esm/session/0_session_error.d.ts +24 -0
- package/esm/session/0_session_error.d.ts.map +1 -0
- package/esm/session/0_session_error.js +25 -0
- package/esm/session/0_session_state.d.ts +28 -0
- package/esm/session/0_session_state.d.ts.map +1 -0
- package/esm/session/0_session_state.js +77 -0
- package/esm/session/1_session.d.ts +51 -0
- package/esm/session/1_session.d.ts.map +1 -0
- package/esm/session/1_session.js +147 -0
- package/esm/session/2_session_encrypted.d.ts +41 -0
- package/esm/session/2_session_encrypted.d.ts.map +1 -0
- package/esm/session/2_session_encrypted.js +507 -0
- package/esm/session/2_session_plain.d.ts +25 -0
- package/esm/session/2_session_plain.d.ts.map +1 -0
- package/esm/session/2_session_plain.js +56 -0
- package/esm/storage/0_storage.d.ts +3 -2
- package/esm/storage/0_storage.d.ts.map +1 -1
- package/esm/storage/0_storage.js +1 -1
- package/esm/storage/1_utilities.d.ts +15 -11
- package/esm/storage/1_utilities.d.ts.map +1 -1
- package/esm/storage/1_utilities.js +33 -41
- package/esm/storage/2_storage_indexed_db.d.ts +3 -2
- package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.js +7 -4
- package/esm/storage/2_storage_local_storage.d.ts +3 -2
- package/esm/storage/2_storage_local_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.js +7 -4
- package/esm/storage/2_storage_memory.d.ts +4 -3
- package/esm/storage/2_storage_memory.d.ts.map +1 -1
- package/esm/storage/2_storage_memory.js +6 -3
- package/esm/storage/2_storage_session_storage.d.ts +4 -3
- package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_session_storage.js +7 -4
- package/esm/tl/0_types.d.ts +25 -0
- package/esm/tl/0_types.d.ts.map +1 -0
- package/esm/tl/0_types.js +20 -0
- package/esm/tl/0_utilities.d.ts +34 -0
- package/esm/tl/0_utilities.d.ts.map +1 -0
- package/esm/tl/0_utilities.js +79 -0
- package/esm/tl/1_mtproto_api.d.ts +371 -0
- package/esm/tl/1_mtproto_api.d.ts.map +1 -0
- package/esm/tl/1_mtproto_api.js +416 -0
- package/esm/tl/1_telegram_api.d.ts +19410 -0
- package/esm/tl/1_telegram_api.d.ts.map +1 -0
- package/esm/tl/1_telegram_api.js +22386 -0
- package/esm/tl/1_tl_reader.d.ts +39 -0
- package/esm/tl/1_tl_reader.d.ts.map +1 -0
- package/esm/tl/1_tl_reader.js +228 -0
- package/esm/tl/1_tl_writer.d.ts +37 -0
- package/esm/tl/1_tl_writer.d.ts.map +1 -0
- package/esm/tl/1_tl_writer.js +278 -0
- package/esm/tl/1_utilities.d.ts +9 -14
- package/esm/tl/1_utilities.d.ts.map +1 -1
- package/esm/tl/1_utilities.js +21 -40
- package/esm/tl/2_message.d.ts +36 -0
- package/esm/tl/2_message.d.ts.map +1 -0
- package/esm/tl/2_message.js +73 -0
- package/esm/tl/2_mtproto.d.ts +33 -0
- package/esm/tl/2_mtproto.d.ts.map +1 -0
- package/esm/tl/2_mtproto.js +53 -0
- package/esm/tl/2_telegram.d.ts +49 -0
- package/esm/tl/2_telegram.d.ts.map +1 -0
- package/esm/tl/2_telegram.js +135 -0
- package/esm/transport/0_obfuscation.d.ts +2 -2
- package/esm/transport/0_obfuscation.d.ts.map +1 -1
- package/esm/transport/0_obfuscation.js +10 -9
- package/esm/transport/0_transport.d.ts +4 -6
- package/esm/transport/0_transport.d.ts.map +1 -1
- package/esm/transport/0_transport.js +10 -11
- package/esm/transport/1_transport_abridged.d.ts +2 -4
- package/esm/transport/1_transport_abridged.d.ts.map +1 -1
- package/esm/transport/1_transport_abridged.js +17 -34
- package/esm/transport/1_transport_intermediate.d.ts +2 -4
- package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
- package/esm/transport/1_transport_intermediate.js +12 -31
- package/esm/transport/1_transport_provider.d.ts +35 -0
- package/esm/transport/1_transport_provider.d.ts.map +1 -0
- package/esm/transport/1_transport_provider.js +81 -0
- package/esm/transport/2_transport_provider_tcp.d.ts +25 -0
- package/esm/transport/2_transport_provider_tcp.d.ts.map +1 -0
- package/esm/transport/2_transport_provider_tcp.js +29 -0
- package/esm/transport/2_transport_provider_web_socket.d.ts +24 -0
- package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -0
- package/esm/transport/2_transport_provider_web_socket.js +43 -0
- package/esm/types/0_authorization_state.d.ts +2 -2
- package/esm/types/0_authorization_state.d.ts.map +1 -1
- package/esm/types/0_authorization_state.js +1 -1
- package/esm/types/0_birthday.d.ts +3 -2
- package/esm/types/0_birthday.d.ts.map +1 -1
- package/esm/types/0_birthday.js +9 -1
- package/esm/types/0_bot_command.d.ts +1 -1
- package/esm/types/0_bot_command.js +1 -1
- package/esm/types/0_bot_token_check_result.d.ts +31 -0
- package/esm/types/0_bot_token_check_result.d.ts.map +1 -0
- package/esm/types/0_bot_token_check_result.js +20 -0
- package/esm/types/0_button_style.d.ts +28 -0
- package/esm/types/0_button_style.d.ts.map +1 -0
- package/esm/types/0_button_style.js +36 -0
- package/esm/types/0_callback_query_answer.d.ts +3 -3
- package/esm/types/0_callback_query_answer.d.ts.map +1 -1
- package/esm/types/0_callback_query_answer.js +2 -2
- package/esm/types/0_callback_query_question.d.ts +1 -1
- package/esm/types/0_callback_query_question.js +3 -3
- package/esm/types/0_chat_action.d.ts +1 -1
- package/esm/types/0_chat_action.js +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +17 -7
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.js +31 -16
- package/esm/types/0_chat_folder.d.ts +29 -0
- package/esm/types/0_chat_folder.d.ts.map +1 -0
- package/esm/types/0_chat_folder.js +25 -0
- package/esm/types/0_chat_member_rights.d.ts +3 -3
- package/esm/types/0_chat_member_rights.d.ts.map +1 -1
- package/esm/types/0_chat_member_rights.js +21 -21
- package/esm/types/0_chat_photo.d.ts +2 -2
- package/esm/types/0_chat_photo.d.ts.map +1 -1
- package/esm/types/0_chat_photo.js +5 -5
- package/esm/types/0_checklist_changed.d.ts +29 -0
- package/esm/types/0_checklist_changed.d.ts.map +1 -0
- package/esm/types/0_checklist_changed.js +25 -0
- package/esm/types/0_code_check_result.d.ts +47 -0
- package/esm/types/0_code_check_result.d.ts.map +1 -0
- package/esm/types/0_code_check_result.js +20 -0
- package/esm/types/0_connection_state.d.ts +1 -1
- package/esm/types/0_connection_state.js +1 -1
- package/esm/types/0_contact.d.ts +2 -2
- package/esm/types/0_contact.d.ts.map +1 -1
- package/esm/types/0_contact.js +1 -1
- package/esm/types/0_dice.d.ts +2 -2
- package/esm/types/0_dice.d.ts.map +1 -1
- package/esm/types/0_dice.js +1 -1
- package/esm/types/0_emoji_status.d.ts +48 -0
- package/esm/types/0_emoji_status.d.ts.map +1 -0
- package/esm/types/0_emoji_status.js +33 -0
- package/esm/types/0_failed_invitation.d.ts +8 -4
- package/esm/types/0_failed_invitation.d.ts.map +1 -1
- package/esm/types/0_failed_invitation.js +3 -3
- package/esm/types/0_file_source.d.ts +2 -2
- package/esm/types/0_file_source.d.ts.map +1 -1
- package/esm/types/0_file_source.js +1 -1
- package/esm/types/0_gift_component_rarity.d.ts +50 -0
- package/esm/types/0_gift_component_rarity.d.ts.map +1 -0
- package/esm/types/0_gift_component_rarity.js +43 -0
- package/esm/types/0_gift_value.d.ts +25 -0
- package/esm/types/0_gift_value.d.ts.map +1 -0
- package/esm/types/0_gift_value.js +20 -0
- package/esm/types/0_giveaway_parameters.d.ts +2 -2
- package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
- package/esm/types/0_giveaway_parameters.js +5 -6
- package/esm/types/0_id.d.ts +1 -1
- package/esm/types/0_id.js +1 -1
- package/esm/types/0_input_emoji_status.d.ts +36 -0
- package/esm/types/0_input_emoji_status.d.ts.map +1 -0
- package/esm/types/0_input_emoji_status.js +20 -0
- package/esm/types/0_invoice.d.ts +3 -2
- package/esm/types/0_invoice.d.ts.map +1 -1
- package/esm/types/0_invoice.js +1 -1
- package/esm/types/0_keyboard_button_poll_type.d.ts +1 -1
- package/esm/types/0_keyboard_button_poll_type.js +1 -1
- package/esm/types/0_link_preview_media_size.d.ts +22 -0
- package/esm/types/0_link_preview_media_size.d.ts.map +1 -0
- package/esm/types/0_link_preview_media_size.js +20 -0
- package/esm/types/0_live_stream_channel.d.ts +2 -2
- package/esm/types/0_live_stream_channel.d.ts.map +1 -1
- package/esm/types/0_live_stream_channel.js +1 -1
- package/esm/types/0_location.d.ts +1 -1
- package/esm/types/0_location.d.ts.map +1 -1
- package/esm/types/0_location.js +6 -6
- package/esm/types/0_login_url.d.ts +1 -1
- package/esm/types/0_login_url.js +1 -1
- package/esm/types/0_mask_position.d.ts +2 -2
- package/esm/types/0_mask_position.d.ts.map +1 -1
- package/esm/types/0_mask_position.js +2 -2
- package/esm/types/0_message_reference.d.ts +1 -1
- package/esm/types/0_message_reference.js +1 -1
- package/esm/types/0_message_search_filter.d.ts +3 -2
- package/esm/types/0_message_search_filter.d.ts.map +1 -1
- package/esm/types/0_message_search_filter.js +1 -1
- package/esm/types/0_mini_app_button_info.d.ts +26 -0
- package/esm/types/0_mini_app_button_info.d.ts.map +1 -0
- package/esm/types/0_mini_app_button_info.js +22 -0
- package/esm/types/0_mini_app_mode.d.ts +22 -0
- package/esm/types/0_mini_app_mode.d.ts.map +1 -0
- package/esm/types/0_mini_app_mode.js +20 -0
- package/esm/types/0_network_statistics_entry.d.ts +1 -1
- package/esm/types/0_network_statistics_entry.js +1 -1
- package/esm/types/0_parse_mode.d.ts +1 -1
- package/esm/types/0_parse_mode.js +1 -1
- package/esm/types/0_password_check_result.d.ts +39 -0
- package/esm/types/0_password_check_result.d.ts.map +1 -0
- package/esm/types/0_password_check_result.js +20 -0
- package/esm/types/0_price_tag.d.ts +1 -1
- package/esm/types/0_price_tag.js +1 -1
- package/esm/types/0_reaction.d.ts +4 -1
- package/esm/types/0_reaction.d.ts.map +1 -1
- package/esm/types/0_reaction.js +10 -10
- package/esm/types/0_refunded_payment.d.ts +2 -2
- package/esm/types/0_refunded_payment.d.ts.map +1 -1
- package/esm/types/0_refunded_payment.js +3 -3
- package/esm/types/0_restriction_reason.d.ts +2 -2
- package/esm/types/0_restriction_reason.d.ts.map +1 -1
- package/esm/types/0_restriction_reason.js +1 -1
- package/esm/types/0_self_destruct_option.d.ts +11 -3
- package/esm/types/0_self_destruct_option.d.ts.map +1 -1
- package/esm/types/0_self_destruct_option.js +12 -3
- package/esm/types/0_shipping_address.d.ts +2 -2
- package/esm/types/0_shipping_address.d.ts.map +1 -1
- package/esm/types/0_shipping_address.js +1 -1
- package/esm/types/0_slow_mode_duration.d.ts +23 -0
- package/esm/types/0_slow_mode_duration.d.ts.map +1 -0
- package/esm/types/0_slow_mode_duration.js +28 -0
- package/esm/types/0_story_reference.d.ts +1 -1
- package/esm/types/0_story_reference.js +1 -1
- package/esm/types/0_switch_inline_query_chosen_chats.d.ts +20 -0
- package/esm/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
- package/esm/types/0_switch_inline_query_chosen_chats.js +19 -0
- package/esm/types/0_thumbnail.d.ts +1 -1
- package/esm/types/0_thumbnail.d.ts.map +1 -1
- package/esm/types/0_thumbnail.js +4 -4
- package/esm/types/0_translation.d.ts +32 -0
- package/esm/types/0_translation.d.ts.map +1 -0
- package/esm/types/0_translation.js +45 -0
- package/esm/types/0_upload_progress.d.ts +29 -0
- package/esm/types/0_upload_progress.d.ts.map +1 -0
- package/esm/types/0_upload_progress.js +20 -0
- package/esm/types/0_user_status.d.ts +66 -0
- package/esm/types/0_user_status.d.ts.map +1 -0
- package/esm/types/0_user_status.js +35 -0
- package/esm/types/0_video_chat.d.ts +8 -4
- package/esm/types/0_video_chat.d.ts.map +1 -1
- package/esm/types/0_video_chat.js +7 -8
- package/esm/types/0_voice.d.ts +2 -2
- package/esm/types/0_voice.d.ts.map +1 -1
- package/esm/types/0_voice.js +1 -1
- package/esm/types/0_voice_transcription.d.ts +31 -0
- package/esm/types/0_voice_transcription.d.ts.map +1 -0
- package/esm/types/0_voice_transcription.js +26 -0
- package/esm/types/0_working_hours_interval.d.ts +27 -0
- package/esm/types/0_working_hours_interval.d.ts.map +1 -0
- package/esm/types/0_working_hours_interval.js +20 -0
- package/esm/types/1_animation.d.ts +2 -2
- package/esm/types/1_animation.d.ts.map +1 -1
- package/esm/types/1_animation.js +3 -3
- package/esm/types/1_audio.d.ts +2 -2
- package/esm/types/1_audio.d.ts.map +1 -1
- package/esm/types/1_audio.js +3 -3
- package/esm/types/1_bot_command_scope.d.ts +3 -3
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.js +4 -4
- package/esm/types/1_bot_commands.d.ts +30 -0
- package/esm/types/1_bot_commands.d.ts.map +1 -0
- package/esm/types/1_bot_commands.js +20 -0
- package/esm/types/1_chat_p.d.ts +36 -7
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +43 -17
- package/esm/types/1_document.d.ts +2 -2
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_document.js +3 -3
- package/esm/types/1_giveaway.d.ts +3 -3
- package/esm/types/1_giveaway.d.ts.map +1 -1
- package/esm/types/1_giveaway.js +1 -1
- package/esm/types/1_inline_keyboard_button.d.ts +140 -0
- package/esm/types/1_inline_keyboard_button.d.ts.map +1 -0
- package/esm/types/1_inline_keyboard_button.js +128 -0
- package/esm/types/1_inline_query_result_button.d.ts +3 -3
- package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
- package/esm/types/1_inline_query_result_button.js +1 -1
- package/esm/types/1_input_gift.d.ts +54 -0
- package/esm/types/1_input_gift.d.ts.map +1 -0
- package/esm/types/1_input_gift.js +32 -0
- package/esm/types/1_input_story_content.d.ts +3 -3
- package/esm/types/1_input_story_content.d.ts.map +1 -1
- package/esm/types/1_input_story_content.js +1 -1
- package/esm/types/1_keyboard_button.d.ts +14 -12
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +87 -34
- package/esm/types/1_message_reaction.d.ts +3 -3
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +8 -8
- package/esm/types/1_mini_app_info.d.ts +32 -0
- package/esm/types/1_mini_app_info.d.ts.map +1 -0
- package/esm/types/1_mini_app_info.js +27 -0
- package/esm/types/1_network_statistics.d.ts +2 -2
- package/esm/types/1_network_statistics.d.ts.map +1 -1
- package/esm/types/1_network_statistics.js +1 -1
- package/esm/types/1_order_info.d.ts +8 -3
- package/esm/types/1_order_info.d.ts.map +1 -1
- package/esm/types/1_order_info.js +1 -1
- package/esm/types/1_photo.d.ts +2 -2
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_photo.js +4 -4
- package/esm/types/1_reaction_count.d.ts +3 -3
- package/esm/types/1_reaction_count.d.ts.map +1 -1
- package/esm/types/1_reaction_count.js +1 -1
- package/esm/types/1_sticker.d.ts +6 -5
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +15 -11
- package/esm/types/1_story_reaction.d.ts +4 -4
- package/esm/types/1_story_reaction.d.ts.map +1 -1
- package/esm/types/1_story_reaction.js +2 -2
- package/esm/types/1_venue.d.ts +2 -2
- package/esm/types/1_venue.d.ts.map +1 -1
- package/esm/types/1_venue.js +3 -3
- package/esm/types/1_video.d.ts +2 -2
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video.js +3 -3
- package/esm/types/1_video_note.d.ts +2 -2
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/1_video_note.js +3 -3
- package/esm/types/1_working_hours.d.ts +31 -0
- package/esm/types/1_working_hours.d.ts.map +1 -0
- package/esm/types/1_working_hours.js +33 -0
- package/esm/types/2_chat.d.ts +14 -17
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +23 -28
- package/esm/types/2_chat_member.d.ts +72 -15
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +40 -28
- package/esm/types/2_inactive_chat.d.ts +3 -3
- package/esm/types/2_inactive_chat.d.ts.map +1 -1
- package/esm/types/2_inactive_chat.js +4 -5
- package/esm/types/2_message_entity.d.ts +148 -0
- package/esm/types/2_message_entity.d.ts.map +1 -0
- package/esm/types/2_message_entity.js +243 -0
- package/esm/types/2_message_interactions.d.ts +2 -2
- package/esm/types/2_message_interactions.d.ts.map +1 -1
- package/esm/types/2_message_interactions.js +1 -1
- package/esm/types/2_message_reaction_count.d.ts +6 -7
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reaction_count.js +6 -9
- package/esm/types/2_message_reaction_list_item.d.ts +39 -0
- package/esm/types/2_message_reaction_list_item.d.ts.map +1 -0
- package/esm/types/2_message_reaction_list_item.js +50 -0
- package/esm/types/2_poll_answer.d.ts +32 -0
- package/esm/types/2_poll_answer.d.ts.map +1 -0
- package/esm/types/2_poll_answer.js +35 -0
- package/esm/types/2_reply_markup.d.ts +71 -0
- package/esm/types/2_reply_markup.d.ts.map +1 -0
- package/esm/types/2_reply_markup.js +127 -0
- 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 +3 -3
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_content.js +7 -7
- package/esm/types/2_story_interactions.d.ts +3 -3
- package/esm/types/2_story_interactions.d.ts.map +1 -1
- package/esm/types/2_story_interactions.js +1 -1
- package/esm/types/2_story_interactive_area.d.ts +9 -9
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +16 -15
- 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 +11 -3
- package/esm/types/2_successful_payment.d.ts.map +1 -1
- package/esm/types/2_successful_payment.js +3 -3
- package/esm/types/2_user.d.ts +73 -0
- package/esm/types/2_user.d.ts.map +1 -0
- package/esm/types/2_user.js +82 -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_settings.d.ts +47 -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_checklist_item.d.ts +65 -0
- package/esm/types/3_checklist_item.d.ts.map +1 -0
- package/esm/types/3_checklist_item.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 +77 -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_game.js +44 -0
- package/esm/types/3_gift_upgraded_component.d.ts +96 -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_checklist_item.d.ts +31 -0
- package/esm/types/3_input_checklist_item.d.ts.map +1 -0
- package/esm/types/3_input_checklist_item.js +20 -0
- package/esm/types/3_input_media.d.ts +123 -0
- package/esm/types/3_input_media.d.ts.map +1 -0
- package/esm/types/3_input_media.js +20 -0
- package/esm/types/3_input_poll_option.d.ts +31 -0
- package/esm/types/3_input_poll_option.d.ts.map +1 -0
- package/esm/types/3_input_poll_option.js +20 -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_reaction_list.d.ts +32 -0
- package/esm/types/3_message_reaction_list.d.ts.map +1 -0
- package/esm/types/3_message_reaction_list.js +31 -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 +42 -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 +13 -14
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/3_story.js +13 -14
- 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_checklist.d.ts +38 -0
- package/esm/types/4_checklist.d.ts.map +1 -0
- package/esm/types/4_checklist.js +31 -0
- package/esm/types/4_gift.d.ts +100 -0
- package/esm/types/4_gift.d.ts.map +1 -0
- package/esm/types/4_gift.js +112 -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 +51 -0
- package/esm/types/4_reply_to.d.ts.map +1 -0
- package/esm/types/4_reply_to.js +20 -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 +43 -0
- package/esm/types/5_gift_non_upgraded_information.d.ts +47 -0
- package/esm/types/5_gift_non_upgraded_information.d.ts.map +1 -0
- package/esm/types/5_gift_non_upgraded_information.js +69 -0
- package/esm/types/5_gift_upgraded_information.d.ts +41 -0
- package/esm/types/5_gift_upgraded_information.d.ts.map +1 -0
- package/esm/types/5_gift_upgraded_information.js +58 -0
- package/esm/types/5_link_preview.d.ts +186 -0
- package/esm/types/5_link_preview.d.ts.map +1 -0
- package/esm/types/5_link_preview.js +205 -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 +704 -0
- package/esm/types/6_message.d.ts.map +1 -0
- package/esm/types/6_message.js +553 -0
- package/esm/types/6_message_content.d.ts +124 -0
- package/esm/types/6_message_content.d.ts.map +1 -0
- package/esm/types/6_message_content.js +20 -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 +43 -0
- package/esm/types/7_chat_list_item.d.ts.map +1 -0
- package/esm/types/7_chat_list_item.js +57 -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_message_list.d.ts +28 -0
- package/esm/types/7_message_list.d.ts.map +1 -0
- package/esm/types/7_message_list.js +20 -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 +42 -0
- package/esm/types/7_topic.d.ts +44 -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 +583 -0
- package/esm/types/8_update.d.ts.map +1 -0
- package/esm/types/8_update.js +20 -0
- package/esm/types/_file_id.d.ts +64 -51
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +96 -77
- package/esm/types/_getters.d.ts +4 -11
- package/esm/types/_getters.d.ts.map +1 -1
- package/esm/types/_getters.js +1 -1
- package/esm/utilities/0_color.d.ts +1 -1
- package/esm/utilities/0_color.js +1 -1
- package/esm/utilities/0_env.d.ts.map +1 -1
- package/esm/utilities/0_env.js +20 -1
- package/esm/utilities/0_gzip.d.ts +22 -0
- package/esm/utilities/0_gzip.d.ts.map +1 -0
- package/esm/utilities/0_gzip.js +42 -0
- package/esm/utilities/0_hash.d.ts +3 -3
- package/esm/utilities/0_hash.d.ts.map +1 -1
- package/esm/utilities/0_hash.js +1 -1
- package/esm/utilities/0_int.d.ts +71 -0
- package/esm/utilities/0_int.d.ts.map +1 -0
- package/esm/utilities/0_int.js +140 -0
- package/esm/utilities/0_misc.d.ts +29 -0
- package/esm/utilities/0_misc.d.ts.map +1 -0
- package/esm/utilities/0_misc.js +84 -0
- package/esm/utilities/0_mutex.d.ts +1 -1
- package/esm/utilities/0_mutex.js +1 -1
- package/esm/utilities/0_object.d.ts +1 -1
- package/esm/utilities/0_object.js +1 -1
- package/esm/utilities/0_part_stream.d.ts +4 -4
- package/esm/utilities/0_part_stream.d.ts.map +1 -1
- package/esm/utilities/0_part_stream.js +3 -3
- package/esm/utilities/0_rle.d.ts +3 -3
- package/esm/utilities/0_rle.d.ts.map +1 -1
- package/esm/utilities/0_rle.js +2 -2
- package/esm/utilities/0_text.d.ts +22 -0
- package/esm/utilities/0_text.d.ts.map +1 -0
- package/esm/utilities/0_text.js +27 -0
- package/esm/utilities/0_types.d.ts +1 -1
- package/esm/utilities/0_types.js +1 -1
- package/esm/utilities/0_units.d.ts +1 -4
- package/esm/utilities/0_units.d.ts.map +1 -1
- package/esm/utilities/0_units.js +1 -4
- package/esm/utilities/1_auth.d.ts +2 -2
- package/esm/utilities/1_auth.d.ts.map +1 -1
- package/esm/utilities/1_auth.js +5 -6
- package/esm/utilities/1_base64.d.ts +3 -3
- package/esm/utilities/1_base64.d.ts.map +1 -1
- package/esm/utilities/1_base64.js +3 -3
- package/esm/utilities/1_crypto.d.ts +30 -0
- package/esm/utilities/1_crypto.d.ts.map +1 -0
- package/esm/utilities/1_crypto.js +90 -0
- package/esm/utilities/1_logger.d.ts +3 -3
- package/esm/utilities/1_logger.d.ts.map +1 -1
- package/esm/utilities/1_logger.js +5 -4
- package/esm/utilities/1_math.d.ts +1 -1
- package/esm/utilities/1_math.js +4 -4
- package/esm/utilities/2_queue.d.ts +2 -2
- package/esm/utilities/2_queue.d.ts.map +1 -1
- package/esm/utilities/2_queue.js +12 -8
- package/package.json +2 -5
- package/script/0_deps.d.ts +23 -13
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +47 -41
- package/script/0_errors.d.ts +9 -2
- package/script/0_errors.d.ts.map +1 -1
- package/script/0_errors.js +37 -2
- package/script/1_utilities.d.ts +6 -7
- package/script/1_utilities.d.ts.map +1 -1
- package/script/1_utilities.js +6 -7
- package/script/2_connection.d.ts +1 -1
- package/script/2_connection.js +1 -1
- package/script/2_storage.d.ts +1 -1
- package/script/2_storage.js +1 -1
- package/script/2_tl.d.ts +7 -10
- package/script/2_tl.d.ts.map +1 -1
- package/script/2_tl.js +25 -19
- package/script/3_errors.d.ts +8 -3
- package/script/3_errors.d.ts.map +1 -1
- package/script/3_errors.js +14 -5
- package/script/3_transport.d.ts +4 -4
- package/script/3_transport.js +4 -4
- package/script/3_types.d.ts +74 -34
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +74 -34
- package/script/4_constants.d.ts +21 -2
- package/script/4_constants.d.ts.map +1 -1
- package/script/4_constants.js +6 -29
- package/script/4_errors.d.ts +4 -4
- package/script/4_errors.d.ts.map +1 -1
- package/script/4_errors.js +1 -1
- package/script/4_session.d.ts +24 -0
- package/script/4_session.d.ts.map +1 -0
- package/script/4_session.js +39 -0
- package/script/5_client.d.ts +9 -3
- package/script/5_client.d.ts.map +1 -1
- package/script/5_client.js +9 -3
- package/script/_dnt.polyfills.d.ts +119 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +248 -0
- package/script/_dnt.shims.d.ts +0 -1
- package/script/_dnt.shims.d.ts.map +1 -1
- 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 +73 -0
- package/script/client/0_client_abstract.d.ts +31 -28
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_client_abstract.js +23 -115
- package/script/client/0_html.d.ts +4 -3
- package/script/client/0_html.d.ts.map +1 -1
- package/script/client/0_html.js +413 -74
- package/script/client/0_markdown.d.ts +2 -2
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +39 -19
- package/script/client/0_params.d.ts +324 -41
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_params.js +1 -1
- package/script/client/0_password.d.ts +6 -6
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +11 -11
- package/script/client/0_storage_operations.d.ts +81 -69
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +354 -233
- package/script/client/0_update_processor.d.ts +26 -0
- package/script/client/0_update_processor.d.ts.map +1 -0
- package/script/client/0_update_processor.js +21 -0
- package/script/client/0_utilities.d.ts +10 -5
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +47 -32
- package/script/client/0_worker_error.d.ts +26 -0
- package/script/client/0_worker_error.d.ts.map +1 -0
- package/script/client/0_worker_error.js +90 -0
- package/script/client/0_worker_request.d.ts +27 -0
- package/script/client/0_worker_request.d.ts.map +1 -0
- package/script/client/0_worker_request.js +21 -0
- package/script/client/1_client_generic.d.ts +1846 -0
- package/script/client/1_client_generic.d.ts.map +1 -0
- package/script/client/1_client_generic.js +28 -0
- package/script/client/1_client_plain.d.ts +12 -9
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +39 -50
- package/script/client/1_invoke_middleware.d.ts +32 -0
- package/script/client/1_invoke_middleware.d.ts.map +1 -0
- package/script/client/1_invoke_middleware.js +25 -0
- package/script/client/1_types.d.ts +17 -32
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/1_types.js +1 -1
- package/script/client/1_worker_response.d.ts +37 -0
- package/script/client/1_worker_response.d.ts.map +1 -0
- package/script/client/1_worker_response.js +21 -0
- package/script/client/2_account_manager.d.ts +43 -5
- package/script/client/2_account_manager.d.ts.map +1 -1
- package/script/client/2_account_manager.js +336 -7
- package/script/client/2_bot_info_manager.d.ts +12 -5
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_bot_info_manager.js +15 -1
- package/script/client/2_business_connection_manager.d.ts +6 -5
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +8 -8
- package/script/client/2_client_encrypted.d.ts +58 -0
- package/script/client/2_client_encrypted.d.ts.map +1 -0
- package/script/client/2_client_encrypted.js +294 -0
- package/script/client/2_file_manager.d.ts +27 -7
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +236 -214
- package/script/client/2_network_statistics_manager.d.ts +5 -5
- package/script/client/2_network_statistics_manager.d.ts.map +1 -1
- package/script/client/2_network_statistics_manager.js +36 -10
- package/script/client/2_payment_manager.d.ts +8 -7
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +6 -6
- package/script/client/2_reaction_manager.d.ts +6 -5
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +13 -13
- package/script/client/2_sign_in.d.ts +25 -0
- package/script/client/2_sign_in.d.ts.map +1 -0
- package/script/client/2_sign_in.js +118 -0
- package/script/client/2_translations_manager.d.ts +35 -0
- package/script/client/2_translations_manager.d.ts.map +1 -0
- package/script/client/2_translations_manager.js +175 -0
- package/script/client/2_update_manager.d.ts +11 -8
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +351 -293
- package/script/client/3_client_encrypted_pool.d.ts +29 -0
- package/script/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/script/client/3_client_encrypted_pool.js +67 -0
- package/script/client/3_filters.d.ts +96 -0
- package/script/client/3_filters.d.ts.map +1 -0
- package/script/client/3_filters.js +55 -0
- package/script/client/3_message_manager.d.ts +30 -35
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +785 -487
- package/script/client/3_video_chat_manager.d.ts +11 -10
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +46 -43
- package/script/client/4_callback_query_manager.d.ts +9 -8
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +13 -12
- package/script/client/4_chat_list_manager.d.ts +20 -11
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +141 -365
- package/script/client/4_chat_manager.d.ts +86 -0
- package/script/client/4_chat_manager.d.ts.map +1 -0
- package/script/client/4_chat_manager.js +490 -0
- package/script/client/4_checklist_manager.d.ts +38 -0
- package/script/client/4_checklist_manager.d.ts.map +1 -0
- package/script/client/4_checklist_manager.js +85 -0
- package/script/client/4_context.d.ts +691 -0
- package/script/client/4_context.d.ts.map +1 -0
- package/script/client/4_context.js +1425 -0
- package/script/client/4_forum_manager.d.ts +40 -0
- package/script/client/4_forum_manager.d.ts.map +1 -0
- package/script/client/4_forum_manager.js +138 -0
- package/script/client/4_gift_manager.d.ts +39 -0
- package/script/client/4_gift_manager.d.ts.map +1 -0
- package/script/client/4_gift_manager.js +101 -0
- package/script/client/4_inline_query_manager.d.ts +10 -9
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +13 -13
- package/script/client/4_link_preview_manager.d.ts +39 -0
- package/script/client/4_link_preview_manager.d.ts.map +1 -0
- package/script/client/4_link_preview_manager.js +68 -0
- package/script/client/4_poll_manager.d.ts +39 -0
- package/script/client/4_poll_manager.d.ts.map +1 -0
- package/script/client/4_poll_manager.js +122 -0
- package/script/client/4_story_manager.d.ts +11 -10
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +20 -20
- package/script/client/5_composer.d.ts +51 -0
- package/script/client/5_composer.d.ts.map +1 -0
- package/script/client/5_composer.js +126 -0
- package/script/client/6_client.d.ts +1952 -0
- package/script/client/6_client.d.ts.map +1 -0
- package/script/client/6_client.js +3444 -0
- package/script/client/6_client_dispatcher.d.ts +1917 -0
- package/script/client/6_client_dispatcher.d.ts.map +1 -0
- package/script/client/6_client_dispatcher.js +2497 -0
- package/script/client/7_client_worker.d.ts +27 -0
- package/script/client/7_client_worker.d.ts.map +1 -0
- package/script/client/7_client_worker.js +93 -0
- package/script/connection/0_connection.d.ts +9 -8
- package/script/connection/0_connection.d.ts.map +1 -1
- package/script/connection/0_connection.js +1 -1
- package/script/connection/1_connection_tcp.d.ts +4 -5
- package/script/connection/1_connection_tcp.d.ts.map +1 -1
- package/script/connection/1_connection_tcp.js +28 -52
- package/script/connection/1_connection_web_socket.d.ts +3 -3
- package/script/connection/1_connection_web_socket.d.ts.map +1 -1
- package/script/connection/1_connection_web_socket.js +10 -13
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts +18 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.js +71 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts +3 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts.map +1 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +303 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assert.d.ts +17 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assert.js +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assertion_error.js +34 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equal.d.ts +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equal.js +230 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equals.d.ts +37 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equals.js +64 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/false.d.ts +19 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/false.js +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/unreachable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/unreachable.js +23 -0
- package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts +2 -0
- package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/_util.js +9 -0
- package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +107 -0
- package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/abortable.js +49 -0
- package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +37 -0
- package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/deadline.js +44 -0
- package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +44 -0
- package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/debounce.js +60 -0
- package/script/deps/jsr.io/@std/async/1.2.0/delay.d.ts +45 -0
- package/script/deps/jsr.io/@std/async/1.2.0/delay.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/delay.js +87 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts +22 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mod.js +39 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +111 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +174 -0
- package/script/deps/jsr.io/@std/async/1.2.0/pool.d.ts +33 -0
- package/script/deps/jsr.io/@std/async/1.2.0/pool.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/pool.js +102 -0
- package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts +155 -0
- package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/retry.js +152 -0
- package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts +43 -0
- package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/tee.js +105 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts +9 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/_types.js +3 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts +21 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/concat.js +35 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts +22 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/equals.js +85 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts +24 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.js +37 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts +12 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.js +72 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts +155 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.js +209 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts +111 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/memoize.js +85 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts +19 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.js +554 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts +265 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/constants.js +269 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/format.d.ts +70 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/format.js +69 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +23 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.js +57 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +35 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.js +119 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +16 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.js +3 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +40 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.js +86 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +39 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.js +91 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.js +48 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +80 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.js +121 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff.js +283 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.js +188 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts +29 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/format.js +106 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.js +8 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/styles.js +252 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts +25 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/types.js +4 -0
- package/script/deps/jsr.io/@std/io/0.225.3/_constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.225.3/_constants.js +7 -0
- package/script/deps/jsr.io/@std/io/0.225.3/iterate_reader.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.225.3/iterate_reader.js +100 -0
- package/script/deps/jsr.io/@std/io/0.225.3/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.225.3/types.js +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +10 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.js +45 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.js +49 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +12 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +11 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +80 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.js +38 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.js +32 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.js +11 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.js +55 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.js +96 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +24 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +26 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.js +48 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +61 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +30 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.js +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.js +50 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.js +85 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +33 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +41 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.js +80 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +138 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +37 -0
- package/script/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.js +38 -0
- package/script/mod.d.ts +2 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +19 -10
- package/script/session/0_session_error.d.ts +24 -0
- package/script/session/0_session_error.d.ts.map +1 -0
- package/script/session/0_session_error.js +29 -0
- package/script/session/0_session_state.d.ts +28 -0
- package/script/session/0_session_state.d.ts.map +1 -0
- package/script/session/0_session_state.js +81 -0
- package/script/session/1_session.d.ts +51 -0
- package/script/session/1_session.d.ts.map +1 -0
- package/script/session/1_session.js +151 -0
- package/script/session/2_session_encrypted.d.ts +41 -0
- package/script/session/2_session_encrypted.d.ts.map +1 -0
- package/script/session/2_session_encrypted.js +511 -0
- package/script/session/2_session_plain.d.ts +25 -0
- package/script/session/2_session_plain.d.ts.map +1 -0
- package/script/session/2_session_plain.js +60 -0
- package/script/storage/0_storage.d.ts +3 -2
- package/script/storage/0_storage.d.ts.map +1 -1
- package/script/storage/0_storage.js +1 -1
- package/script/storage/1_utilities.d.ts +15 -11
- package/script/storage/1_utilities.d.ts.map +1 -1
- package/script/storage/1_utilities.js +47 -55
- package/script/storage/2_storage_indexed_db.d.ts +3 -2
- package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.js +7 -4
- package/script/storage/2_storage_local_storage.d.ts +3 -2
- package/script/storage/2_storage_local_storage.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.js +7 -4
- package/script/storage/2_storage_memory.d.ts +4 -3
- package/script/storage/2_storage_memory.d.ts.map +1 -1
- package/script/storage/2_storage_memory.js +6 -3
- package/script/storage/2_storage_session_storage.d.ts +4 -3
- package/script/storage/2_storage_session_storage.d.ts.map +1 -1
- package/script/storage/2_storage_session_storage.js +7 -4
- package/script/tl/0_types.d.ts +25 -0
- package/script/tl/0_types.d.ts.map +1 -0
- package/script/tl/0_types.js +21 -0
- package/script/tl/0_utilities.d.ts +34 -0
- package/script/tl/0_utilities.d.ts.map +1 -0
- package/script/tl/0_utilities.js +89 -0
- package/script/tl/1_mtproto_api.d.ts +371 -0
- package/script/tl/1_mtproto_api.d.ts.map +1 -0
- package/script/tl/1_mtproto_api.js +419 -0
- package/script/tl/1_telegram_api.d.ts +19410 -0
- package/script/tl/1_telegram_api.d.ts.map +1 -0
- package/script/tl/1_telegram_api.js +22389 -0
- package/script/tl/1_tl_reader.d.ts +39 -0
- package/script/tl/1_tl_reader.d.ts.map +1 -0
- package/script/tl/1_tl_reader.js +232 -0
- package/script/tl/1_tl_writer.d.ts +37 -0
- package/script/tl/1_tl_writer.d.ts.map +1 -0
- package/script/tl/1_tl_writer.js +282 -0
- package/script/tl/1_utilities.d.ts +9 -14
- package/script/tl/1_utilities.d.ts.map +1 -1
- package/script/tl/1_utilities.js +23 -44
- package/script/tl/2_message.d.ts +36 -0
- package/script/tl/2_message.d.ts.map +1 -0
- package/script/tl/2_message.js +80 -0
- package/script/tl/2_mtproto.d.ts +33 -0
- package/script/tl/2_mtproto.d.ts.map +1 -0
- package/script/tl/2_mtproto.js +78 -0
- package/script/tl/2_telegram.d.ts +49 -0
- package/script/tl/2_telegram.d.ts.map +1 -0
- package/script/tl/2_telegram.js +189 -0
- package/script/transport/0_obfuscation.d.ts +2 -2
- package/script/transport/0_obfuscation.d.ts.map +1 -1
- package/script/transport/0_obfuscation.js +9 -8
- package/script/transport/0_transport.d.ts +4 -6
- package/script/transport/0_transport.d.ts.map +1 -1
- package/script/transport/0_transport.js +10 -11
- package/script/transport/1_transport_abridged.d.ts +2 -4
- package/script/transport/1_transport_abridged.d.ts.map +1 -1
- package/script/transport/1_transport_abridged.js +16 -33
- package/script/transport/1_transport_intermediate.d.ts +2 -4
- package/script/transport/1_transport_intermediate.d.ts.map +1 -1
- package/script/transport/1_transport_intermediate.js +11 -30
- package/script/transport/1_transport_provider.d.ts +35 -0
- package/script/transport/1_transport_provider.d.ts.map +1 -0
- package/script/transport/1_transport_provider.js +86 -0
- package/script/transport/2_transport_provider_tcp.d.ts +25 -0
- package/script/transport/2_transport_provider_tcp.d.ts.map +1 -0
- package/script/transport/2_transport_provider_tcp.js +32 -0
- package/script/transport/2_transport_provider_web_socket.d.ts +24 -0
- package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -0
- package/script/transport/2_transport_provider_web_socket.js +47 -0
- package/script/types/0_authorization_state.d.ts +2 -2
- package/script/types/0_authorization_state.d.ts.map +1 -1
- package/script/types/0_authorization_state.js +1 -1
- package/script/types/0_birthday.d.ts +3 -2
- package/script/types/0_birthday.d.ts.map +1 -1
- package/script/types/0_birthday.js +10 -1
- package/script/types/0_bot_command.d.ts +1 -1
- package/script/types/0_bot_command.js +1 -1
- package/script/types/0_bot_token_check_result.d.ts +31 -0
- package/script/types/0_bot_token_check_result.d.ts.map +1 -0
- package/script/types/0_bot_token_check_result.js +21 -0
- package/script/types/0_button_style.d.ts +28 -0
- package/script/types/0_button_style.d.ts.map +1 -0
- package/script/types/0_button_style.js +40 -0
- package/script/types/0_callback_query_answer.d.ts +3 -3
- package/script/types/0_callback_query_answer.d.ts.map +1 -1
- package/script/types/0_callback_query_answer.js +2 -2
- package/script/types/0_callback_query_question.d.ts +1 -1
- package/script/types/0_callback_query_question.js +3 -3
- package/script/types/0_chat_action.d.ts +1 -1
- package/script/types/0_chat_action.js +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +17 -7
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.js +31 -16
- package/script/types/0_chat_folder.d.ts +29 -0
- package/script/types/0_chat_folder.d.ts.map +1 -0
- package/script/types/0_chat_folder.js +28 -0
- package/script/types/0_chat_member_rights.d.ts +3 -3
- package/script/types/0_chat_member_rights.d.ts.map +1 -1
- package/script/types/0_chat_member_rights.js +20 -20
- package/script/types/0_chat_photo.d.ts +2 -2
- package/script/types/0_chat_photo.d.ts.map +1 -1
- package/script/types/0_chat_photo.js +4 -4
- package/script/types/0_checklist_changed.d.ts +29 -0
- package/script/types/0_checklist_changed.d.ts.map +1 -0
- package/script/types/0_checklist_changed.js +28 -0
- package/script/types/0_code_check_result.d.ts +47 -0
- package/script/types/0_code_check_result.d.ts.map +1 -0
- package/script/types/0_code_check_result.js +21 -0
- package/script/types/0_connection_state.d.ts +1 -1
- package/script/types/0_connection_state.js +1 -1
- package/script/types/0_contact.d.ts +2 -2
- package/script/types/0_contact.d.ts.map +1 -1
- package/script/types/0_contact.js +1 -1
- package/script/types/0_dice.d.ts +2 -2
- package/script/types/0_dice.d.ts.map +1 -1
- package/script/types/0_dice.js +1 -1
- package/script/types/0_emoji_status.d.ts +48 -0
- package/script/types/0_emoji_status.d.ts.map +1 -0
- package/script/types/0_emoji_status.js +36 -0
- package/script/types/0_failed_invitation.d.ts +8 -4
- package/script/types/0_failed_invitation.d.ts.map +1 -1
- package/script/types/0_failed_invitation.js +3 -3
- package/script/types/0_file_source.d.ts +2 -2
- package/script/types/0_file_source.d.ts.map +1 -1
- package/script/types/0_file_source.js +1 -1
- package/script/types/0_gift_component_rarity.d.ts +50 -0
- package/script/types/0_gift_component_rarity.d.ts.map +1 -0
- package/script/types/0_gift_component_rarity.js +46 -0
- package/script/types/0_gift_value.d.ts +25 -0
- package/script/types/0_gift_value.d.ts.map +1 -0
- package/script/types/0_gift_value.js +21 -0
- package/script/types/0_giveaway_parameters.d.ts +2 -2
- package/script/types/0_giveaway_parameters.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.js +4 -5
- package/script/types/0_id.d.ts +1 -1
- package/script/types/0_id.js +1 -1
- package/script/types/0_input_emoji_status.d.ts +36 -0
- package/script/types/0_input_emoji_status.d.ts.map +1 -0
- package/script/types/0_input_emoji_status.js +21 -0
- package/script/types/0_invoice.d.ts +3 -2
- package/script/types/0_invoice.d.ts.map +1 -1
- package/script/types/0_invoice.js +1 -1
- package/script/types/0_keyboard_button_poll_type.d.ts +1 -1
- package/script/types/0_keyboard_button_poll_type.js +1 -1
- package/script/types/0_link_preview_media_size.d.ts +22 -0
- package/script/types/0_link_preview_media_size.d.ts.map +1 -0
- package/script/types/0_link_preview_media_size.js +21 -0
- package/script/types/0_live_stream_channel.d.ts +2 -2
- package/script/types/0_live_stream_channel.d.ts.map +1 -1
- package/script/types/0_live_stream_channel.js +1 -1
- package/script/types/0_location.d.ts +1 -1
- package/script/types/0_location.d.ts.map +1 -1
- package/script/types/0_location.js +5 -5
- package/script/types/0_login_url.d.ts +1 -1
- package/script/types/0_login_url.js +1 -1
- package/script/types/0_mask_position.d.ts +2 -2
- package/script/types/0_mask_position.d.ts.map +1 -1
- package/script/types/0_mask_position.js +2 -2
- package/script/types/0_message_reference.d.ts +1 -1
- package/script/types/0_message_reference.js +1 -1
- package/script/types/0_message_search_filter.d.ts +3 -2
- package/script/types/0_message_search_filter.d.ts.map +1 -1
- package/script/types/0_message_search_filter.js +1 -1
- package/script/types/0_mini_app_button_info.d.ts +26 -0
- package/script/types/0_mini_app_button_info.d.ts.map +1 -0
- package/script/types/0_mini_app_button_info.js +25 -0
- package/script/types/0_mini_app_mode.d.ts +22 -0
- package/script/types/0_mini_app_mode.d.ts.map +1 -0
- package/script/types/0_mini_app_mode.js +21 -0
- package/script/types/0_network_statistics_entry.d.ts +1 -1
- package/script/types/0_network_statistics_entry.js +1 -1
- package/script/types/0_parse_mode.d.ts +1 -1
- package/script/types/0_parse_mode.js +1 -1
- package/script/types/0_password_check_result.d.ts +39 -0
- package/script/types/0_password_check_result.d.ts.map +1 -0
- package/script/types/0_password_check_result.js +21 -0
- package/script/types/0_price_tag.d.ts +1 -1
- package/script/types/0_price_tag.js +1 -1
- package/script/types/0_reaction.d.ts +4 -1
- package/script/types/0_reaction.d.ts.map +1 -1
- package/script/types/0_reaction.js +9 -9
- package/script/types/0_refunded_payment.d.ts +2 -2
- package/script/types/0_refunded_payment.d.ts.map +1 -1
- package/script/types/0_refunded_payment.js +2 -2
- package/script/types/0_restriction_reason.d.ts +2 -2
- package/script/types/0_restriction_reason.d.ts.map +1 -1
- package/script/types/0_restriction_reason.js +1 -1
- package/script/types/0_self_destruct_option.d.ts +11 -3
- package/script/types/0_self_destruct_option.d.ts.map +1 -1
- package/script/types/0_self_destruct_option.js +13 -3
- package/script/types/0_shipping_address.d.ts +2 -2
- package/script/types/0_shipping_address.d.ts.map +1 -1
- package/script/types/0_shipping_address.js +1 -1
- package/script/types/0_slow_mode_duration.d.ts +23 -0
- package/script/types/0_slow_mode_duration.d.ts.map +1 -0
- package/script/types/0_slow_mode_duration.js +31 -0
- package/script/types/0_story_reference.d.ts +1 -1
- package/script/types/0_story_reference.js +1 -1
- package/script/types/0_switch_inline_query_chosen_chats.d.ts +20 -0
- package/script/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
- package/script/types/0_switch_inline_query_chosen_chats.js +19 -0
- package/script/types/0_thumbnail.d.ts +1 -1
- package/script/types/0_thumbnail.d.ts.map +1 -1
- package/script/types/0_thumbnail.js +3 -3
- package/script/types/0_translation.d.ts +32 -0
- package/script/types/0_translation.d.ts.map +1 -0
- package/script/types/0_translation.js +48 -0
- package/script/types/0_upload_progress.d.ts +29 -0
- package/script/types/0_upload_progress.d.ts.map +1 -0
- package/script/types/0_upload_progress.js +21 -0
- package/script/types/0_user_status.d.ts +66 -0
- package/script/types/0_user_status.d.ts.map +1 -0
- package/script/types/0_user_status.js +38 -0
- package/script/types/0_video_chat.d.ts +8 -4
- package/script/types/0_video_chat.d.ts.map +1 -1
- package/script/types/0_video_chat.js +6 -7
- package/script/types/0_voice.d.ts +2 -2
- package/script/types/0_voice.d.ts.map +1 -1
- package/script/types/0_voice.js +1 -1
- package/script/types/0_voice_transcription.d.ts +31 -0
- package/script/types/0_voice_transcription.d.ts.map +1 -0
- package/script/types/0_voice_transcription.js +29 -0
- package/script/types/0_working_hours_interval.d.ts +27 -0
- package/script/types/0_working_hours_interval.d.ts.map +1 -0
- package/script/types/0_working_hours_interval.js +21 -0
- package/script/types/1_animation.d.ts +2 -2
- package/script/types/1_animation.d.ts.map +1 -1
- package/script/types/1_animation.js +2 -2
- package/script/types/1_audio.d.ts +2 -2
- package/script/types/1_audio.d.ts.map +1 -1
- package/script/types/1_audio.js +2 -2
- package/script/types/1_bot_command_scope.d.ts +3 -3
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.js +3 -3
- package/script/types/1_bot_commands.d.ts +30 -0
- package/script/types/1_bot_commands.d.ts.map +1 -0
- package/script/types/1_bot_commands.js +21 -0
- package/script/types/1_chat_p.d.ts +36 -7
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +43 -16
- package/script/types/1_document.d.ts +2 -2
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_document.js +2 -2
- package/script/types/1_giveaway.d.ts +3 -3
- package/script/types/1_giveaway.d.ts.map +1 -1
- package/script/types/1_giveaway.js +1 -1
- package/script/types/1_inline_keyboard_button.d.ts +140 -0
- package/script/types/1_inline_keyboard_button.d.ts.map +1 -0
- package/script/types/1_inline_keyboard_button.js +132 -0
- package/script/types/1_inline_query_result_button.d.ts +3 -3
- package/script/types/1_inline_query_result_button.d.ts.map +1 -1
- package/script/types/1_inline_query_result_button.js +1 -1
- package/script/types/1_input_gift.d.ts +54 -0
- package/script/types/1_input_gift.d.ts.map +1 -0
- package/script/types/1_input_gift.js +35 -0
- package/script/types/1_input_story_content.d.ts +3 -3
- package/script/types/1_input_story_content.d.ts.map +1 -1
- package/script/types/1_input_story_content.js +1 -1
- package/script/types/1_keyboard_button.d.ts +14 -12
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +86 -33
- package/script/types/1_message_reaction.d.ts +3 -3
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +7 -7
- package/script/types/1_mini_app_info.d.ts +32 -0
- package/script/types/1_mini_app_info.d.ts.map +1 -0
- package/script/types/1_mini_app_info.js +30 -0
- package/script/types/1_network_statistics.d.ts +2 -2
- package/script/types/1_network_statistics.d.ts.map +1 -1
- package/script/types/1_network_statistics.js +1 -1
- package/script/types/1_order_info.d.ts +8 -3
- package/script/types/1_order_info.d.ts.map +1 -1
- package/script/types/1_order_info.js +1 -1
- package/script/types/1_photo.d.ts +2 -2
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_photo.js +3 -3
- package/script/types/1_reaction_count.d.ts +3 -3
- package/script/types/1_reaction_count.d.ts.map +1 -1
- package/script/types/1_reaction_count.js +1 -1
- package/script/types/1_sticker.d.ts +6 -5
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +15 -10
- package/script/types/1_story_reaction.d.ts +4 -4
- package/script/types/1_story_reaction.d.ts.map +1 -1
- package/script/types/1_story_reaction.js +2 -2
- package/script/types/1_venue.d.ts +2 -2
- package/script/types/1_venue.d.ts.map +1 -1
- package/script/types/1_venue.js +2 -2
- package/script/types/1_video.d.ts +2 -2
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video.js +2 -2
- package/script/types/1_video_note.d.ts +2 -2
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/1_video_note.js +2 -2
- package/script/types/1_working_hours.d.ts +31 -0
- package/script/types/1_working_hours.d.ts.map +1 -0
- package/script/types/1_working_hours.js +37 -0
- package/script/types/2_chat.d.ts +14 -17
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +22 -27
- package/script/types/2_chat_member.d.ts +72 -15
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +38 -26
- package/script/types/2_inactive_chat.d.ts +3 -3
- package/script/types/2_inactive_chat.d.ts.map +1 -1
- package/script/types/2_inactive_chat.js +3 -4
- package/script/types/2_message_entity.d.ts +148 -0
- package/script/types/2_message_entity.d.ts.map +1 -0
- package/script/types/2_message_entity.js +248 -0
- package/script/types/2_message_interactions.d.ts +2 -2
- package/script/types/2_message_interactions.d.ts.map +1 -1
- package/script/types/2_message_interactions.js +1 -1
- package/script/types/2_message_reaction_count.d.ts +6 -7
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reaction_count.js +6 -9
- package/script/types/2_message_reaction_list_item.d.ts +39 -0
- package/script/types/2_message_reaction_list_item.d.ts.map +1 -0
- package/script/types/2_message_reaction_list_item.js +53 -0
- package/script/types/2_poll_answer.d.ts +32 -0
- package/script/types/2_poll_answer.d.ts.map +1 -0
- package/script/types/2_poll_answer.js +38 -0
- package/script/types/2_reply_markup.d.ts +71 -0
- package/script/types/2_reply_markup.d.ts.map +1 -0
- package/script/types/2_reply_markup.js +131 -0
- 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 +3 -3
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_content.js +6 -6
- package/script/types/2_story_interactions.d.ts +3 -3
- package/script/types/2_story_interactions.d.ts.map +1 -1
- package/script/types/2_story_interactions.js +1 -1
- package/script/types/2_story_interactive_area.d.ts +9 -9
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +15 -14
- 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 +11 -3
- package/script/types/2_successful_payment.d.ts.map +1 -1
- package/script/types/2_successful_payment.js +2 -2
- package/script/types/2_user.d.ts +73 -0
- package/script/types/2_user.d.ts.map +1 -0
- package/script/types/2_user.js +86 -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_settings.d.ts +47 -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_checklist_item.d.ts +65 -0
- package/script/types/3_checklist_item.d.ts.map +1 -0
- package/script/types/3_checklist_item.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 +77 -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_game.js +47 -0
- package/script/types/3_gift_upgraded_component.d.ts +96 -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_checklist_item.d.ts +31 -0
- package/script/types/3_input_checklist_item.d.ts.map +1 -0
- package/script/types/3_input_checklist_item.js +21 -0
- package/script/types/3_input_media.d.ts +123 -0
- package/script/types/3_input_media.d.ts.map +1 -0
- package/script/types/3_input_media.js +21 -0
- package/script/types/3_input_poll_option.d.ts +31 -0
- package/script/types/3_input_poll_option.d.ts.map +1 -0
- package/script/types/3_input_poll_option.js +21 -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_reaction_list.d.ts +32 -0
- package/script/types/3_message_reaction_list.d.ts.map +1 -0
- package/script/types/3_message_reaction_list.js +34 -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 +42 -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 +13 -14
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/3_story.js +14 -15
- 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_checklist.d.ts +38 -0
- package/script/types/4_checklist.d.ts.map +1 -0
- package/script/types/4_checklist.js +34 -0
- package/script/types/4_gift.d.ts +100 -0
- package/script/types/4_gift.d.ts.map +1 -0
- package/script/types/4_gift.js +117 -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 +51 -0
- package/script/types/4_reply_to.d.ts.map +1 -0
- package/script/types/4_reply_to.js +21 -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 +46 -0
- package/script/types/5_gift_non_upgraded_information.d.ts +47 -0
- package/script/types/5_gift_non_upgraded_information.d.ts.map +1 -0
- package/script/types/5_gift_non_upgraded_information.js +72 -0
- package/script/types/5_gift_upgraded_information.d.ts +41 -0
- package/script/types/5_gift_upgraded_information.d.ts.map +1 -0
- package/script/types/5_gift_upgraded_information.js +61 -0
- package/script/types/5_link_preview.d.ts +186 -0
- package/script/types/5_link_preview.d.ts.map +1 -0
- package/script/types/5_link_preview.js +208 -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 +704 -0
- package/script/types/6_message.d.ts.map +1 -0
- package/script/types/6_message.js +558 -0
- package/script/types/6_message_content.d.ts +124 -0
- package/script/types/6_message_content.d.ts.map +1 -0
- package/script/types/6_message_content.js +21 -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 +43 -0
- package/script/types/7_chat_list_item.d.ts.map +1 -0
- package/script/types/7_chat_list_item.js +60 -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_message_list.d.ts +28 -0
- package/script/types/7_message_list.d.ts.map +1 -0
- package/script/types/7_message_list.js +21 -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 +45 -0
- package/script/types/7_topic.d.ts +44 -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 +583 -0
- package/script/types/8_update.d.ts.map +1 -0
- package/script/types/8_update.js +21 -0
- package/script/types/_file_id.d.ts +64 -51
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +158 -139
- package/script/types/_getters.d.ts +4 -11
- package/script/types/_getters.d.ts.map +1 -1
- package/script/types/_getters.js +1 -1
- package/script/utilities/0_color.d.ts +1 -1
- package/script/utilities/0_color.js +1 -1
- package/script/utilities/0_env.d.ts.map +1 -1
- package/script/utilities/0_env.js +37 -8
- package/script/utilities/0_gzip.d.ts +22 -0
- package/script/utilities/0_gzip.d.ts.map +1 -0
- package/script/utilities/0_gzip.js +46 -0
- package/script/utilities/0_hash.d.ts +3 -3
- package/script/utilities/0_hash.d.ts.map +1 -1
- package/script/utilities/0_hash.js +1 -1
- package/script/utilities/0_int.d.ts +71 -0
- package/script/utilities/0_int.d.ts.map +1 -0
- package/script/utilities/0_int.js +149 -0
- package/script/utilities/0_misc.d.ts +29 -0
- package/script/utilities/0_misc.d.ts.map +1 -0
- package/script/utilities/0_misc.js +95 -0
- package/script/utilities/0_mutex.d.ts +1 -1
- package/script/utilities/0_mutex.js +1 -1
- package/script/utilities/0_object.d.ts +1 -1
- package/script/utilities/0_object.js +1 -1
- package/script/utilities/0_part_stream.d.ts +4 -4
- package/script/utilities/0_part_stream.d.ts.map +1 -1
- package/script/utilities/0_part_stream.js +3 -3
- package/script/utilities/0_rle.d.ts +3 -3
- package/script/utilities/0_rle.d.ts.map +1 -1
- package/script/utilities/0_rle.js +2 -2
- package/script/utilities/0_text.d.ts +22 -0
- package/script/utilities/0_text.d.ts.map +1 -0
- package/script/utilities/0_text.js +31 -0
- package/script/utilities/0_types.d.ts +1 -1
- package/script/utilities/0_types.js +1 -1
- package/script/utilities/0_units.d.ts +1 -4
- package/script/utilities/0_units.d.ts.map +1 -1
- package/script/utilities/0_units.js +2 -5
- package/script/utilities/1_auth.d.ts +2 -2
- package/script/utilities/1_auth.d.ts.map +1 -1
- package/script/utilities/1_auth.js +6 -7
- package/script/utilities/1_base64.d.ts +3 -3
- package/script/utilities/1_base64.d.ts.map +1 -1
- package/script/utilities/1_base64.js +4 -4
- package/script/utilities/1_crypto.d.ts +30 -0
- package/script/utilities/1_crypto.d.ts.map +1 -0
- package/script/utilities/1_crypto.js +94 -0
- package/script/utilities/1_logger.d.ts +3 -3
- package/script/utilities/1_logger.d.ts.map +1 -1
- package/script/utilities/1_logger.js +5 -4
- package/script/utilities/1_math.d.ts +1 -1
- package/script/utilities/1_math.js +7 -7
- package/script/utilities/2_queue.d.ts +2 -2
- package/script/utilities/2_queue.d.ts.map +1 -1
- package/script/utilities/2_queue.js +12 -8
- package/esm/client/0_filters.d.ts +0 -58
- package/esm/client/0_filters.d.ts.map +0 -1
- package/esm/client/0_filters.js +0 -49
- package/esm/client/0_message.d.ts +0 -29
- package/esm/client/0_message.d.ts.map +0 -1
- package/esm/client/0_message.js +0 -83
- package/esm/client/1_client_encrypted.d.ts +0 -52
- package/esm/client/1_client_encrypted.d.ts.map +0 -1
- package/esm/client/1_client_encrypted.js +0 -339
- package/esm/client/1_composer.d.ts +0 -51
- package/esm/client/1_composer.d.ts.map +0 -1
- package/esm/client/1_composer.js +0 -168
- package/esm/client/5_client.d.ts +0 -1372
- package/esm/client/5_client.d.ts.map +0 -1
- package/esm/client/5_client.js +0 -2858
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -167
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts +0 -3
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts.map +0 -1
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -308
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -183
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -52
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -159
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -57
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -20
- package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts +0 -19
- package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -32
- package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts +0 -2
- package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +0 -26
- package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts +0 -38
- package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.js +0 -163
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -110
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -276
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -179
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +0 -37
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -207
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -2
- package/esm/deps/jsr.io/@std/io/0.225.0/_constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/io/0.225.0/_constants.js +0 -4
- package/esm/deps/jsr.io/@std/io/0.225.0/iterate_reader.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/io/0.225.0/iterate_reader.js +0 -96
- package/esm/deps/jsr.io/@std/io/0.225.0/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/io/0.225.0/types.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +0 -7
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.js +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.js +0 -46
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +0 -77
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +0 -19
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.js +0 -36
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/join.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.js +0 -49
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +0 -37
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.js +0 -89
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +0 -33
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.js +0 -42
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +0 -57
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +0 -27
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.js +0 -44
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.js +0 -81
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +0 -38
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.js +0 -74
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +0 -22
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +0 -134
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +0 -34
- package/esm/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.js +0 -35
- package/esm/tl/0_api.d.ts +0 -15839
- package/esm/tl/0_api.d.ts.map +0 -1
- package/esm/tl/0_api.js +0 -24746
- package/esm/tl/0_tl_raw_reader.d.ts +0 -36
- package/esm/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_reader.js +0 -87
- package/esm/tl/0_tl_raw_writer.d.ts +0 -34
- package/esm/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_writer.js +0 -86
- package/esm/tl/2_deserialize.d.ts +0 -23
- package/esm/tl/2_deserialize.d.ts.map +0 -1
- package/esm/tl/2_deserialize.js +0 -95
- package/esm/tl/2_serialize.d.ts +0 -22
- package/esm/tl/2_serialize.d.ts.map +0 -1
- package/esm/tl/2_serialize.js +0 -160
- package/esm/tl/3_tl_reader.d.ts +0 -26
- package/esm/tl/3_tl_reader.d.ts.map +0 -1
- package/esm/tl/3_tl_reader.js +0 -49
- package/esm/tl/3_utilities.d.ts +0 -34
- package/esm/tl/3_utilities.d.ts.map +0 -1
- package/esm/tl/3_utilities.js +0 -89
- package/esm/tl/4_rpc_result.d.ts +0 -27
- package/esm/tl/4_rpc_result.d.ts.map +0 -1
- package/esm/tl/4_rpc_result.js +0 -28
- package/esm/tl/4_tl_writer.d.ts +0 -25
- package/esm/tl/4_tl_writer.d.ts.map +0 -1
- package/esm/tl/4_tl_writer.js +0 -45
- package/esm/tl/5_message.d.ts +0 -39
- package/esm/tl/5_message.d.ts.map +0 -1
- package/esm/tl/5_message.js +0 -98
- package/esm/transport/2_transport_provider.d.ts +0 -35
- package/esm/transport/2_transport_provider.d.ts.map +0 -1
- package/esm/transport/2_transport_provider.js +0 -81
- package/esm/transport/3_transport_provider_tcp.d.ts +0 -25
- package/esm/transport/3_transport_provider_tcp.d.ts.map +0 -1
- package/esm/transport/3_transport_provider_tcp.js +0 -29
- package/esm/transport/3_transport_provider_web_socket.d.ts +0 -24
- package/esm/transport/3_transport_provider_web_socket.d.ts.map +0 -1
- package/esm/transport/3_transport_provider_web_socket.js +0 -43
- package/esm/types/0_link_preview.d.ts +0 -35
- package/esm/types/0_link_preview.d.ts.map +0 -1
- package/esm/types/0_link_preview.js +0 -28
- 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/0_mini_app_info.d.ts +0 -26
- package/esm/types/0_mini_app_info.d.ts.map +0 -1
- package/esm/types/0_mini_app_info.js +0 -22
- package/esm/types/0_opening_hours.d.ts +0 -26
- package/esm/types/0_opening_hours.d.ts.map +0 -1
- package/esm/types/0_opening_hours.js +0 -25
- 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_input_media.js +0 -20
- package/esm/types/1_message_content.d.ts +0 -119
- package/esm/types/1_message_content.d.ts.map +0 -1
- package/esm/types/1_message_content.js +0 -20
- package/esm/types/1_poll_option.d.ts +0 -32
- package/esm/types/1_poll_option.d.ts.map +0 -1
- package/esm/types/1_poll_option.js +0 -27
- 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 -56
- package/esm/types/1_user.d.ts.map +0 -1
- package/esm/types/1_user.js +0 -47
- 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 -30
- 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 -40
- package/esm/types/2_forward_header.d.ts.map +0 -1
- package/esm/types/2_forward_header.js +0 -55
- package/esm/types/2_game.d.ts +0 -40
- package/esm/types/2_game.d.ts.map +0 -1
- package/esm/types/2_game.js +0 -44
- package/esm/types/2_inline_keyboard_button.d.ts +0 -138
- package/esm/types/2_inline_keyboard_button.d.ts.map +0 -1
- package/esm/types/2_inline_keyboard_button.js +0 -117
- 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/2_reply_to.js +0 -20
- 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_join_request.d.ts +0 -39
- package/esm/types/3_join_request.d.ts.map +0 -1
- package/esm/types/3_join_request.js +0 -45
- package/esm/types/3_reply_markup.d.ts +0 -71
- package/esm/types/3_reply_markup.d.ts.map +0 -1
- package/esm/types/3_reply_markup.js +0 -127
- package/esm/types/4_inline_query_result.d.ts +0 -251
- package/esm/types/4_inline_query_result.d.ts.map +0 -1
- package/esm/types/4_inline_query_result.js +0 -380
- package/esm/types/4_message.d.ts +0 -615
- package/esm/types/4_message.d.ts.map +0 -1
- package/esm/types/4_message.js +0 -533
- package/esm/types/5_callback_query.d.ts +0 -43
- package/esm/types/5_callback_query.d.ts.map +0 -1
- package/esm/types/5_callback_query.js +0 -60
- package/esm/types/5_chat_list_item.d.ts +0 -36
- package/esm/types/5_chat_list_item.d.ts.map +0 -1
- package/esm/types/5_chat_list_item.js +0 -86
- package/esm/types/5_inline_query_answer.d.ts +0 -32
- package/esm/types/5_inline_query_answer.d.ts.map +0 -1
- package/esm/types/5_inline_query_answer.js +0 -28
- package/esm/types/6_update.d.ts +0 -388
- package/esm/types/6_update.d.ts.map +0 -1
- package/esm/types/6_update.js +0 -20
- package/esm/utilities/0_bigint.d.ts +0 -29
- package/esm/utilities/0_bigint.d.ts.map +0 -1
- package/esm/utilities/0_bigint.js +0 -90
- package/esm/utilities/0_buffer.d.ts +0 -21
- package/esm/utilities/0_buffer.d.ts.map +0 -1
- package/esm/utilities/0_buffer.js +0 -51
- package/esm/utilities/0_cache_map.d.ts +0 -26
- package/esm/utilities/0_cache_map.d.ts.map +0 -1
- package/esm/utilities/0_cache_map.js +0 -52
- package/esm/utilities/0_crypto.d.ts +0 -27
- package/esm/utilities/0_crypto.d.ts.map +0 -1
- package/esm/utilities/0_crypto.js +0 -48
- package/esm/utilities/0_gunzip.d.ts +0 -2
- package/esm/utilities/0_gunzip.d.ts.map +0 -1
- package/esm/utilities/0_gunzip.js +0 -17
- package/esm/utilities/1_misc.d.ts +0 -29
- package/esm/utilities/1_misc.d.ts.map +0 -1
- package/esm/utilities/1_misc.js +0 -72
- package/script/client/0_filters.d.ts +0 -58
- package/script/client/0_filters.d.ts.map +0 -1
- package/script/client/0_filters.js +0 -52
- package/script/client/0_message.d.ts +0 -29
- package/script/client/0_message.d.ts.map +0 -1
- package/script/client/0_message.js +0 -90
- package/script/client/1_client_encrypted.d.ts +0 -52
- package/script/client/1_client_encrypted.d.ts.map +0 -1
- package/script/client/1_client_encrypted.js +0 -343
- package/script/client/1_composer.d.ts +0 -51
- package/script/client/1_composer.d.ts.map +0 -1
- package/script/client/1_composer.js +0 -175
- package/script/client/5_client.d.ts +0 -1372
- package/script/client/5_client.d.ts.map +0 -1
- package/script/client/5_client.js +0 -2863
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -182
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts +0 -3
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts.map +0 -1
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -310
- package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
- package/script/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -34
- package/script/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
- package/script/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -209
- package/script/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
- package/script/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -48
- package/script/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -30
- package/script/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/false.js +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -55
- package/script/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
- package/script/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/less.js +0 -31
- package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
- package/script/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -61
- package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
- package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
- package/script/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -162
- package/script/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
- package/script/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -60
- package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
- package/script/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -47
- package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -23
- package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts +0 -19
- package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -35
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts +0 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +0 -29
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts +0 -38
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.js +0 -167
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
- package/script/deps/jsr.io/@std/io/0.225.0/_constants.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/io/0.225.0/_constants.js +0 -7
- package/script/deps/jsr.io/@std/io/0.225.0/iterate_reader.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/io/0.225.0/iterate_reader.js +0 -100
- package/script/deps/jsr.io/@std/io/0.225.0/types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/io/0.225.0/types.js +0 -18
- package/script/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +0 -10
- package/script/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/basename.js +0 -45
- package/script/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/constants.js +0 -49
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +0 -80
- package/script/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +0 -22
- package/script/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +0 -18
- package/script/deps/jsr.io/@std/path/1.0.8/_os.d.ts +0 -2
- package/script/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_os.js +0 -35
- package/script/deps/jsr.io/@std/path/1.0.8/basename.d.ts +0 -28
- package/script/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/basename.js +0 -39
- package/script/deps/jsr.io/@std/path/1.0.8/extname.d.ts +0 -23
- package/script/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/extname.js +0 -32
- package/script/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/is_absolute.js +0 -31
- package/script/deps/jsr.io/@std/path/1.0.8/join.d.ts +0 -23
- package/script/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/join.js +0 -32
- package/script/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/_util.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +0 -40
- package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.js +0 -52
- package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +0 -37
- package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.js +0 -92
- package/script/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +0 -26
- package/script/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +0 -33
- package/script/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/join.js +0 -45
- package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +0 -40
- package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +0 -60
- package/script/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +0 -30
- package/script/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/to_file_url.js +0 -31
- package/script/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/_util.js +0 -20
- package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +0 -23
- package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.js +0 -47
- package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +0 -20
- package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.js +0 -84
- package/script/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +0 -41
- package/script/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +0 -20
- package/script/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/join.js +0 -77
- package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +0 -22
- package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +0 -137
- package/script/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +0 -37
- package/script/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.js +0 -38
- package/script/tl/0_api.d.ts +0 -15839
- package/script/tl/0_api.d.ts.map +0 -1
- package/script/tl/0_api.js +0 -24772
- package/script/tl/0_tl_raw_reader.d.ts +0 -36
- package/script/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/script/tl/0_tl_raw_reader.js +0 -92
- package/script/tl/0_tl_raw_writer.d.ts +0 -34
- package/script/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/script/tl/0_tl_raw_writer.js +0 -90
- package/script/tl/2_deserialize.d.ts +0 -23
- package/script/tl/2_deserialize.d.ts.map +0 -1
- package/script/tl/2_deserialize.js +0 -98
- package/script/tl/2_serialize.d.ts +0 -22
- package/script/tl/2_serialize.d.ts.map +0 -1
- package/script/tl/2_serialize.js +0 -163
- package/script/tl/3_tl_reader.d.ts +0 -26
- package/script/tl/3_tl_reader.d.ts.map +0 -1
- package/script/tl/3_tl_reader.js +0 -53
- package/script/tl/3_utilities.d.ts +0 -34
- package/script/tl/3_utilities.d.ts.map +0 -1
- package/script/tl/3_utilities.js +0 -97
- package/script/tl/4_rpc_result.d.ts +0 -27
- package/script/tl/4_rpc_result.d.ts.map +0 -1
- package/script/tl/4_rpc_result.js +0 -32
- package/script/tl/4_tl_writer.d.ts +0 -25
- package/script/tl/4_tl_writer.d.ts.map +0 -1
- package/script/tl/4_tl_writer.js +0 -49
- package/script/tl/5_message.d.ts +0 -39
- package/script/tl/5_message.d.ts.map +0 -1
- package/script/tl/5_message.js +0 -106
- package/script/transport/2_transport_provider.d.ts +0 -35
- package/script/transport/2_transport_provider.d.ts.map +0 -1
- package/script/transport/2_transport_provider.js +0 -86
- package/script/transport/3_transport_provider_tcp.d.ts +0 -25
- package/script/transport/3_transport_provider_tcp.d.ts.map +0 -1
- package/script/transport/3_transport_provider_tcp.js +0 -32
- package/script/transport/3_transport_provider_web_socket.d.ts +0 -24
- package/script/transport/3_transport_provider_web_socket.d.ts.map +0 -1
- package/script/transport/3_transport_provider_web_socket.js +0 -47
- package/script/types/0_link_preview.d.ts +0 -35
- package/script/types/0_link_preview.d.ts.map +0 -1
- package/script/types/0_link_preview.js +0 -31
- 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/0_mini_app_info.d.ts +0 -26
- package/script/types/0_mini_app_info.d.ts.map +0 -1
- package/script/types/0_mini_app_info.js +0 -25
- package/script/types/0_opening_hours.d.ts +0 -26
- package/script/types/0_opening_hours.d.ts.map +0 -1
- package/script/types/0_opening_hours.js +0 -28
- 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_input_media.js +0 -21
- package/script/types/1_message_content.d.ts +0 -119
- package/script/types/1_message_content.d.ts.map +0 -1
- package/script/types/1_message_content.js +0 -21
- package/script/types/1_poll_option.d.ts +0 -32
- package/script/types/1_poll_option.d.ts.map +0 -1
- package/script/types/1_poll_option.js +0 -30
- 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 -56
- package/script/types/1_user.d.ts.map +0 -1
- package/script/types/1_user.js +0 -50
- 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 -33
- 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 -40
- package/script/types/2_forward_header.d.ts.map +0 -1
- package/script/types/2_forward_header.js +0 -58
- package/script/types/2_game.d.ts +0 -40
- package/script/types/2_game.d.ts.map +0 -1
- package/script/types/2_game.js +0 -47
- package/script/types/2_inline_keyboard_button.d.ts +0 -138
- package/script/types/2_inline_keyboard_button.d.ts.map +0 -1
- package/script/types/2_inline_keyboard_button.js +0 -121
- 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/2_reply_to.js +0 -21
- 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_join_request.d.ts +0 -39
- package/script/types/3_join_request.d.ts.map +0 -1
- package/script/types/3_join_request.js +0 -48
- package/script/types/3_reply_markup.d.ts +0 -71
- package/script/types/3_reply_markup.d.ts.map +0 -1
- package/script/types/3_reply_markup.js +0 -131
- package/script/types/4_inline_query_result.d.ts +0 -251
- package/script/types/4_inline_query_result.d.ts.map +0 -1
- package/script/types/4_inline_query_result.js +0 -384
- package/script/types/4_message.d.ts +0 -615
- package/script/types/4_message.d.ts.map +0 -1
- package/script/types/4_message.js +0 -537
- package/script/types/5_callback_query.d.ts +0 -43
- package/script/types/5_callback_query.d.ts.map +0 -1
- package/script/types/5_callback_query.js +0 -64
- package/script/types/5_chat_list_item.d.ts +0 -36
- package/script/types/5_chat_list_item.d.ts.map +0 -1
- package/script/types/5_chat_list_item.js +0 -93
- package/script/types/5_inline_query_answer.d.ts +0 -32
- package/script/types/5_inline_query_answer.d.ts.map +0 -1
- package/script/types/5_inline_query_answer.js +0 -31
- package/script/types/6_update.d.ts +0 -388
- package/script/types/6_update.d.ts.map +0 -1
- package/script/types/6_update.js +0 -21
- package/script/utilities/0_bigint.d.ts +0 -29
- package/script/utilities/0_bigint.d.ts.map +0 -1
- package/script/utilities/0_bigint.js +0 -98
- package/script/utilities/0_buffer.d.ts +0 -21
- package/script/utilities/0_buffer.d.ts.map +0 -1
- package/script/utilities/0_buffer.js +0 -54
- package/script/utilities/0_cache_map.d.ts +0 -26
- package/script/utilities/0_cache_map.d.ts.map +0 -1
- package/script/utilities/0_cache_map.js +0 -56
- package/script/utilities/0_crypto.d.ts +0 -27
- package/script/utilities/0_crypto.d.ts.map +0 -1
- package/script/utilities/0_crypto.js +0 -52
- package/script/utilities/0_gunzip.d.ts +0 -2
- package/script/utilities/0_gunzip.d.ts.map +0 -1
- package/script/utilities/0_gunzip.js +0 -20
- package/script/utilities/1_misc.d.ts +0 -29
- package/script/utilities/1_misc.d.ts.map +0 -1
- package/script/utilities/1_misc.js +0 -82
- /package/esm/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/assertion_error.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/unreachable.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff_str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/styles.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/_constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/iterate_reader.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/assert_path.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/streams/{1.0.8 → 1.0.17}/to_array_buffer.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/assertion_error.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/unreachable.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff_str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/styles.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/_constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/iterate_reader.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/assert_path.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize_string.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.8 → 1.0.17}/to_array_buffer.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
-
* Copyright (C) 2023-
|
|
3
|
+
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
4
|
*
|
|
5
5
|
* This file is part of MTKruto.
|
|
6
6
|
*
|
|
@@ -28,19 +28,25 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
28
28
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
29
29
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
30
30
|
};
|
|
31
|
-
var _MessageManager_instances, _MessageManager_c, _MessageManager_LresolveFileId, _MessageManager_checkParams,
|
|
32
|
-
import { contentType, unreachable } from "../0_deps.js";
|
|
31
|
+
var _MessageManager_instances, _a, _MessageManager_c, _MessageManager_LresolveFileId, _MessageManager_checkParams, _MessageManager_constructReplyMarkup, _MessageManager_resolveSendAs, _MessageManager_constructReplyTo, _MessageManager_isM4a, _MessageManager_sendDocumentInner, _MessageManager_sendMedia, _MessageManager_CAPTIONABLE_MESSAGE_TYPES, _MessageManager_editInlineMessageTextInner, _MessageManager_resolveInputMediaInner, _MessageManager_resolveInputMedia, _MessageManager_resolveInputMediaUpload, _MessageManager_sendReaction, _MessageManager_getCachedVoiceTranscription, _MessageManager_cacheVoiceTranscription;
|
|
32
|
+
import { contentType, equals, startsWith, unreachable } from "../0_deps.js";
|
|
33
33
|
import { InputError } from "../0_errors.js";
|
|
34
|
-
import { getLogger, getRandomId
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { messageSearchFilterToTlObject } from "../
|
|
34
|
+
import { encodeText, fromUnixTimestamp, getLogger, getRandomId } from "../1_utilities.js";
|
|
35
|
+
import { Api } from "../2_tl.js";
|
|
36
|
+
import { PackShortNameInvalid } from "../3_errors.js";
|
|
37
|
+
import { getDc } from "../3_transport.js";
|
|
38
|
+
import { constructMessageReactionList, constructMiniAppInfo, constructSavedChats, constructStickerSet, constructVoiceTranscription, deserializeFileId, isMessageType, messageSearchFilterToTlObject, selfDestructOptionToInt } from "../3_types.js";
|
|
39
|
+
import { assertMessageType, constructMessage as constructMessage_, deserializeInlineMessageId, FileType, messageEntityToTlObject, reactionEqual, reactionToTlObject, replyMarkupToTlObject } from "../3_types.js";
|
|
39
40
|
import { parseHtml } from "./0_html.js";
|
|
40
41
|
import { parseMarkdown } from "./0_markdown.js";
|
|
41
|
-
import { canBeInputChannel,
|
|
42
|
+
import { canBeInputChannel, checkArray, checkMessageId, getLimit, getUsername, isHttpUrl, toInputChannel } from "./0_utilities.js";
|
|
42
43
|
const FALLBACK_MIME_TYPE = "application/octet-stream";
|
|
43
44
|
const STICKER_MIME_TYPES = ["image/webp", "video/webm", "application/x-tgsticker"];
|
|
45
|
+
const ANIMATION_MIME_TYPES = ["image/gif", "video/mp4"];
|
|
46
|
+
const AUDIO_MIME_TYPES = ["audio/mpeg", "audio/mp4"];
|
|
47
|
+
const VOICE_MIME_TYPES = ["audio/ogg", "audio/mpeg", "audio/mp4"];
|
|
48
|
+
const VIDEO_MIME_TYPES = ["video/mp4"];
|
|
49
|
+
const VIDEO_NOTE_MIME_TYPES = ["video/mp4"];
|
|
44
50
|
const messageManagerUpdates = [
|
|
45
51
|
"updateNewMessage",
|
|
46
52
|
"updateNewChannelMessage",
|
|
@@ -53,9 +59,7 @@ const messageManagerUpdates = [
|
|
|
53
59
|
"updateDeleteMessages",
|
|
54
60
|
"updateDeleteChannelMessages",
|
|
55
61
|
"updateDeleteScheduledMessages",
|
|
56
|
-
"
|
|
57
|
-
"updateChatParticipant",
|
|
58
|
-
"updateBotChatInviteRequester",
|
|
62
|
+
"updateTranscribedAudio",
|
|
59
63
|
];
|
|
60
64
|
export class MessageManager {
|
|
61
65
|
constructor(c) {
|
|
@@ -67,7 +71,7 @@ export class MessageManager {
|
|
|
67
71
|
configurable: true,
|
|
68
72
|
writable: true,
|
|
69
73
|
value: async (v) => {
|
|
70
|
-
const inputPeer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(v).then((v) => as("inputPeerUser", v));
|
|
74
|
+
const inputPeer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(v).then((v) => Api.as("inputPeerUser", v));
|
|
71
75
|
return { ...inputPeer, _: "inputUser" };
|
|
72
76
|
}
|
|
73
77
|
});
|
|
@@ -79,11 +83,11 @@ export class MessageManager {
|
|
|
79
83
|
checkArray(messageIds, checkMessageId);
|
|
80
84
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
81
85
|
let messages_ = new Array();
|
|
82
|
-
const chatId_ =
|
|
86
|
+
const chatId_ = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeerChatId(peer);
|
|
83
87
|
let shouldFetch = false;
|
|
84
88
|
for (const messageId of messageIds) {
|
|
85
89
|
const message = await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.getMessage(chatId_, messageId);
|
|
86
|
-
if (message
|
|
90
|
+
if (message === null) {
|
|
87
91
|
messages_ = [];
|
|
88
92
|
shouldFetch = true;
|
|
89
93
|
break;
|
|
@@ -94,28 +98,30 @@ export class MessageManager {
|
|
|
94
98
|
}
|
|
95
99
|
if (shouldFetch) {
|
|
96
100
|
if (canBeInputChannel(peer)) {
|
|
97
|
-
messages_ = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.getMessages", channel: toInputChannel(peer), id: messageIds.map((v) => ({ _: "inputMessageID", id: v })) }).then((v) => as("messages.channelMessages", v).messages);
|
|
101
|
+
messages_ = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.getMessages", channel: toInputChannel(peer), id: messageIds.map((v) => ({ _: "inputMessageID", id: v })) }).then((v) => Api.as("messages.channelMessages", v).messages);
|
|
98
102
|
}
|
|
99
103
|
else {
|
|
100
104
|
messages_ = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
101
105
|
_: "messages.getMessages",
|
|
102
106
|
id: messageIds.map((v) => ({ _: "inputMessageID", id: v })),
|
|
103
|
-
}).then((v) => as("messages.messages", v).messages);
|
|
107
|
+
}).then((v) => Api.as("messages.messages", v).messages);
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
const messages = new Array();
|
|
107
111
|
for (const message_ of messages_) {
|
|
108
|
-
if (is("messageEmpty", message_)) {
|
|
112
|
+
if (Api.is("messageEmpty", message_)) {
|
|
109
113
|
continue;
|
|
110
114
|
}
|
|
111
115
|
const message = await this.constructMessage(message_);
|
|
112
|
-
|
|
116
|
+
if (message.chat.id === chatId_) {
|
|
117
|
+
messages.push(message);
|
|
118
|
+
}
|
|
113
119
|
}
|
|
114
120
|
return messages;
|
|
115
121
|
}
|
|
116
122
|
async getMessageWithReply(chatId, messageId) {
|
|
117
123
|
const message = await this.getMessage(chatId, messageId);
|
|
118
|
-
if (message
|
|
124
|
+
if (message !== null && message.replyToMessageId) {
|
|
119
125
|
message.replyToMessage = await this.getMessage(chatId, message.replyToMessageId) ?? undefined;
|
|
120
126
|
}
|
|
121
127
|
return message;
|
|
@@ -158,38 +164,93 @@ export class MessageManager {
|
|
|
158
164
|
}
|
|
159
165
|
return [text, entities];
|
|
160
166
|
}
|
|
161
|
-
|
|
162
|
-
const [text, entities_] =
|
|
163
|
-
const entities = entities_?.length > 0 ?
|
|
167
|
+
parseText(text_, params) {
|
|
168
|
+
const [text, entities_] = _a.parseText(text_, params?.entities ?? [], params?.parseMode ?? __classPrivateFieldGet(this, _MessageManager_c, "f").parseMode);
|
|
169
|
+
const entities = entities_?.length > 0 ? entities_.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getPeer)) : undefined;
|
|
164
170
|
return [text, entities];
|
|
165
171
|
}
|
|
172
|
+
async updatesToMessages(chatId, updates, businessConnectionId) {
|
|
173
|
+
const messages = new Array();
|
|
174
|
+
if (Api.is("updates", updates)) {
|
|
175
|
+
for (const update of updates.updates) {
|
|
176
|
+
if ("message" in update && Api.is("messageEmpty", update.message)) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (Api.is("updateNewMessage", update) || Api.is("updateEditMessage", update) || Api.is("updateNewScheduledMessage", update)) {
|
|
180
|
+
const message = await this.constructMessage(update.message);
|
|
181
|
+
if (Api.is("updateNewScheduledMessage", update)) {
|
|
182
|
+
message.isScheduled = true;
|
|
183
|
+
}
|
|
184
|
+
messages.push(message);
|
|
185
|
+
}
|
|
186
|
+
else if (Api.is("updateNewChannelMessage", update) || Api.is("updateEditChannelMessage", update)) {
|
|
187
|
+
messages.push(await this.constructMessage(update.message));
|
|
188
|
+
}
|
|
189
|
+
else if (Api.is("updateBotNewBusinessMessage", update)) {
|
|
190
|
+
messages.push(await this.constructMessage(update.message, false, { connectionId: businessConnectionId ?? update.connection_id, replyToMessage: update.reply_to_message }));
|
|
191
|
+
}
|
|
192
|
+
else if (Api.is("updateBotEditBusinessMessage", update)) {
|
|
193
|
+
messages.push(await this.constructMessage(update.message, false, { connectionId: businessConnectionId ?? update.connection_id, replyToMessage: update.reply_to_message }));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
else if (Api.is("updateShortSentMessage", updates)) {
|
|
198
|
+
const message = await this.getMessage(chatId, updates.id);
|
|
199
|
+
if (message !== null) {
|
|
200
|
+
messages.push(message);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return messages;
|
|
204
|
+
}
|
|
166
205
|
async constructMessage(message_, r, business) {
|
|
167
|
-
|
|
206
|
+
const mediaPoll = "media" in message_ && Api.is("messageMediaPoll", message_.media) ? message_.media : null;
|
|
207
|
+
const pollId = mediaPoll?.poll.id;
|
|
208
|
+
let poll = null;
|
|
209
|
+
let pollResults = null;
|
|
210
|
+
if (pollId) {
|
|
211
|
+
[poll, pollResults] = await Promise.all([__classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.getPoll(pollId), __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.getPollResults(pollId)]);
|
|
212
|
+
}
|
|
213
|
+
const message = await constructMessage_(message_, __classPrivateFieldGet(this, _MessageManager_c, "f").getPeer, this.getMessage.bind(this), __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.getStickerSetName.bind(__classPrivateFieldGet(this, _MessageManager_c, "f").fileManager), r, business, poll ?? undefined, pollResults ?? undefined);
|
|
214
|
+
if (!poll && mediaPoll) {
|
|
215
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.setPoll(mediaPoll.poll.id, mediaPoll.poll);
|
|
216
|
+
}
|
|
217
|
+
if (!pollResults && mediaPoll) {
|
|
218
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.setPollResults(mediaPoll.poll.id, mediaPoll.results);
|
|
219
|
+
}
|
|
220
|
+
return message;
|
|
168
221
|
}
|
|
169
222
|
async forwardMessages(from, to, messageIds, params) {
|
|
170
223
|
checkArray(messageIds, checkMessageId);
|
|
171
|
-
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.forwardMessages", from_peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(from), to_peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(to), id: messageIds, random_id: messageIds.map(() => getRandomId()), silent: params?.
|
|
172
|
-
return await
|
|
224
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.forwardMessages", from_peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(from), to_peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(to), id: messageIds, random_id: messageIds.map(() => getRandomId()), silent: params?.isSilent || undefined, top_msg_id: params?.messageThreadId, noforwards: params?.isSilent || undefined, send_as: params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined, drop_author: params?.dropSenderName || undefined, drop_media_captions: params?.dropCaption || undefined });
|
|
225
|
+
return await this.updatesToMessages(to, result);
|
|
173
226
|
}
|
|
174
227
|
async getHistory(chatId, params) {
|
|
175
228
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("getHistory");
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
limit = 1;
|
|
179
|
-
}
|
|
180
|
-
else if (limit > 100) {
|
|
181
|
-
limit = 100;
|
|
182
|
-
}
|
|
183
|
-
let offsetId = params?.fromMessageId ?? 0;
|
|
229
|
+
const limit = getLimit(params?.limit);
|
|
230
|
+
let offsetId = params?.offsetId ?? 0;
|
|
184
231
|
if (offsetId < 0) {
|
|
185
232
|
offsetId = 0;
|
|
186
233
|
}
|
|
234
|
+
let offsetDate = params?.offsetDate ?? 0;
|
|
235
|
+
if (offsetDate < 0) {
|
|
236
|
+
offsetDate = 0;
|
|
237
|
+
}
|
|
187
238
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
188
239
|
const messages = new Array();
|
|
189
240
|
if (messages.length > 0) {
|
|
190
241
|
offsetId = messages[messages.length - 1].id; // TODO: track id of oldest message and don't send requests for it
|
|
191
242
|
}
|
|
192
|
-
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
243
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
244
|
+
_: "messages.getHistory",
|
|
245
|
+
peer: peer,
|
|
246
|
+
offset_id: offsetId,
|
|
247
|
+
offset_date: offsetDate,
|
|
248
|
+
add_offset: params?.addOffset ?? 0,
|
|
249
|
+
limit,
|
|
250
|
+
max_id: 0,
|
|
251
|
+
min_id: 0,
|
|
252
|
+
hash: 0n,
|
|
253
|
+
});
|
|
193
254
|
if (!("messages" in result)) {
|
|
194
255
|
unreachable();
|
|
195
256
|
}
|
|
@@ -199,33 +260,44 @@ export class MessageManager {
|
|
|
199
260
|
}
|
|
200
261
|
return messages;
|
|
201
262
|
}
|
|
263
|
+
async sendMessageDraft(chatId, draftId, text, params) {
|
|
264
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("sendMessageDraft");
|
|
265
|
+
const [message, entities] = this.parseText(text, params);
|
|
266
|
+
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
267
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
268
|
+
_: "messages.setTyping",
|
|
269
|
+
peer,
|
|
270
|
+
action: { _: "sendMessageTextDraftAction", random_id: BigInt(draftId), text: { _: "textWithEntities", text: message, entities: entities ?? [] } },
|
|
271
|
+
top_msg_id: params?.messageThreadId,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
202
274
|
async sendMessage(chatId, text, params) {
|
|
203
275
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
204
|
-
const [message, entities] =
|
|
276
|
+
const [message, entities] = this.parseText(text, params);
|
|
205
277
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
206
278
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
207
279
|
const randomId = getRandomId();
|
|
208
|
-
const noWebpage = params?.linkPreview?.
|
|
209
|
-
const invertMedia = params?.linkPreview?.
|
|
210
|
-
const silent = params?.
|
|
211
|
-
const noforwards = params?.
|
|
280
|
+
const noWebpage = params?.linkPreview?.isDisabled ? true : undefined;
|
|
281
|
+
const invertMedia = params?.linkPreview?.isAboveText ? true : undefined;
|
|
282
|
+
const silent = params?.isSilent ? true : undefined;
|
|
283
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
212
284
|
const sendAs = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveSendAs).call(this, params);
|
|
213
285
|
const effect = params?.effectId ? BigInt(params.effectId) : undefined;
|
|
214
|
-
const schedule_date = params?.sendAt
|
|
215
|
-
const allow_paid_floodskip = params?.
|
|
286
|
+
const schedule_date = params?.sendAt;
|
|
287
|
+
const allow_paid_floodskip = params?.isPaidBroadcast ? true : undefined;
|
|
216
288
|
let result;
|
|
217
289
|
if (!noWebpage && params?.linkPreview?.url) {
|
|
218
290
|
result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
219
291
|
_: "messages.sendMedia",
|
|
220
292
|
peer,
|
|
221
293
|
random_id: randomId,
|
|
222
|
-
media:
|
|
294
|
+
media: {
|
|
223
295
|
_: "inputMediaWebPage",
|
|
224
296
|
url: params.linkPreview.url,
|
|
225
|
-
force_large_media: params.linkPreview.
|
|
226
|
-
force_small_media: params.linkPreview.
|
|
297
|
+
force_large_media: params.linkPreview.mediaSize === "large" ? true : undefined,
|
|
298
|
+
force_small_media: params.linkPreview.mediaSize === "small" ? true : undefined,
|
|
227
299
|
optional: message.length ? undefined : true,
|
|
228
|
-
}
|
|
300
|
+
},
|
|
229
301
|
message,
|
|
230
302
|
invert_media: invertMedia,
|
|
231
303
|
silent,
|
|
@@ -237,7 +309,7 @@ export class MessageManager {
|
|
|
237
309
|
effect,
|
|
238
310
|
schedule_date,
|
|
239
311
|
allow_paid_floodskip,
|
|
240
|
-
}, params?.businessConnectionId);
|
|
312
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
241
313
|
}
|
|
242
314
|
else {
|
|
243
315
|
result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
@@ -256,17 +328,17 @@ export class MessageManager {
|
|
|
256
328
|
effect,
|
|
257
329
|
schedule_date,
|
|
258
330
|
allow_paid_floodskip,
|
|
259
|
-
}, params?.businessConnectionId);
|
|
331
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
260
332
|
}
|
|
261
|
-
const message_ = (await
|
|
333
|
+
const message_ = (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
262
334
|
return assertMessageType(message_, "text");
|
|
263
335
|
}
|
|
264
336
|
async sendVenue(chatId, latitude, longitude, title, address, params) {
|
|
265
337
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
266
338
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
267
339
|
const randomId = getRandomId();
|
|
268
|
-
const silent = params?.
|
|
269
|
-
const noforwards = params?.
|
|
340
|
+
const silent = params?.isSilent ? true : undefined;
|
|
341
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
270
342
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
271
343
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
272
344
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
@@ -278,33 +350,33 @@ export class MessageManager {
|
|
|
278
350
|
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
279
351
|
send_as: sendAs,
|
|
280
352
|
reply_markup: replyMarkup,
|
|
281
|
-
media:
|
|
353
|
+
media: {
|
|
282
354
|
_: "inputMediaVenue",
|
|
283
|
-
geo_point:
|
|
355
|
+
geo_point: {
|
|
284
356
|
_: "inputGeoPoint",
|
|
285
357
|
lat: latitude,
|
|
286
358
|
long: longitude,
|
|
287
|
-
}
|
|
359
|
+
},
|
|
288
360
|
title,
|
|
289
361
|
address,
|
|
290
362
|
venue_id: params?.foursquareId ?? "",
|
|
291
363
|
venue_type: params?.foursquareType ?? "",
|
|
292
364
|
provider: "foursquare",
|
|
293
|
-
}
|
|
365
|
+
},
|
|
294
366
|
message: "",
|
|
295
367
|
effect: params?.effectId ? BigInt(params.effectId) : undefined,
|
|
296
|
-
schedule_date: params?.sendAt
|
|
297
|
-
allow_paid_floodskip: params?.
|
|
298
|
-
}, params?.businessConnectionId);
|
|
299
|
-
const message = (await
|
|
368
|
+
schedule_date: params?.sendAt,
|
|
369
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
370
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
371
|
+
const message = (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
300
372
|
return assertMessageType(message, "venue");
|
|
301
373
|
}
|
|
302
374
|
async sendContact(chatId, firstName, number, params) {
|
|
303
375
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
304
376
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
305
377
|
const randomId = getRandomId();
|
|
306
|
-
const silent = params?.
|
|
307
|
-
const noforwards = params?.
|
|
378
|
+
const silent = params?.isSilent ? true : undefined;
|
|
379
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
308
380
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
309
381
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
310
382
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
@@ -316,27 +388,27 @@ export class MessageManager {
|
|
|
316
388
|
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
317
389
|
send_as: sendAs,
|
|
318
390
|
reply_markup: replyMarkup,
|
|
319
|
-
media:
|
|
391
|
+
media: {
|
|
320
392
|
_: "inputMediaContact",
|
|
321
393
|
phone_number: number,
|
|
322
394
|
first_name: firstName,
|
|
323
395
|
last_name: params?.lastName ?? "",
|
|
324
396
|
vcard: params?.vcard ?? "",
|
|
325
|
-
}
|
|
397
|
+
},
|
|
326
398
|
message: "",
|
|
327
399
|
effect: params?.effectId ? BigInt(params.effectId) : undefined,
|
|
328
|
-
schedule_date: params?.sendAt
|
|
329
|
-
allow_paid_floodskip: params?.
|
|
330
|
-
}, params?.businessConnectionId);
|
|
331
|
-
const message = (await
|
|
400
|
+
schedule_date: params?.sendAt,
|
|
401
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
402
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
403
|
+
const message = (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
332
404
|
return assertMessageType(message, "contact");
|
|
333
405
|
}
|
|
334
406
|
async sendDice(chatId, params) {
|
|
335
407
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
336
408
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
337
409
|
const randomId = getRandomId();
|
|
338
|
-
const silent = params?.
|
|
339
|
-
const noforwards = params?.
|
|
410
|
+
const silent = params?.isSilent ? true : undefined;
|
|
411
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
340
412
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
341
413
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
342
414
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
@@ -348,24 +420,24 @@ export class MessageManager {
|
|
|
348
420
|
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
349
421
|
send_as: sendAs,
|
|
350
422
|
reply_markup: replyMarkup,
|
|
351
|
-
media:
|
|
423
|
+
media: {
|
|
352
424
|
_: "inputMediaDice",
|
|
353
425
|
emoticon: params?.emoji ?? "🎲",
|
|
354
|
-
}
|
|
426
|
+
},
|
|
355
427
|
message: "",
|
|
356
428
|
effect: params?.effectId ? BigInt(params.effectId) : undefined,
|
|
357
|
-
schedule_date: params?.sendAt
|
|
358
|
-
allow_paid_floodskip: params?.
|
|
359
|
-
}, params?.businessConnectionId);
|
|
360
|
-
const message = (await
|
|
429
|
+
schedule_date: params?.sendAt,
|
|
430
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
431
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
432
|
+
const message = (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
361
433
|
return assertMessageType(message, "dice");
|
|
362
434
|
}
|
|
363
435
|
async sendLocation(chatId, latitude, longitude, params) {
|
|
364
436
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
365
437
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
366
438
|
const randomId = getRandomId();
|
|
367
|
-
const silent = params?.
|
|
368
|
-
const noforwards = params?.
|
|
439
|
+
const silent = params?.isSilent ? true : undefined;
|
|
440
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
369
441
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
370
442
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
371
443
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
@@ -380,52 +452,69 @@ export class MessageManager {
|
|
|
380
452
|
media: params?.livePeriod !== undefined
|
|
381
453
|
? ({
|
|
382
454
|
_: "inputMediaGeoLive",
|
|
383
|
-
geo_point:
|
|
455
|
+
geo_point: {
|
|
384
456
|
_: "inputGeoPoint",
|
|
385
457
|
lat: latitude,
|
|
386
458
|
long: longitude,
|
|
387
459
|
accuracy_radius: params?.horizontalAccuracy,
|
|
388
|
-
}
|
|
460
|
+
},
|
|
389
461
|
heading: params?.heading,
|
|
390
462
|
period: params.livePeriod,
|
|
391
463
|
proximity_notification_radius: params?.proximityAlertRadius,
|
|
392
464
|
})
|
|
393
465
|
: ({
|
|
394
466
|
_: "inputMediaGeoPoint",
|
|
395
|
-
geo_point:
|
|
467
|
+
geo_point: {
|
|
396
468
|
_: "inputGeoPoint",
|
|
397
469
|
lat: latitude,
|
|
398
470
|
long: longitude,
|
|
399
471
|
accuracy_radius: params?.horizontalAccuracy,
|
|
400
|
-
}
|
|
472
|
+
},
|
|
401
473
|
}),
|
|
402
474
|
message: "",
|
|
403
475
|
effect: params?.effectId ? BigInt(params.effectId) : undefined,
|
|
404
|
-
schedule_date: params?.sendAt
|
|
405
|
-
allow_paid_floodskip: params?.
|
|
406
|
-
}, params?.businessConnectionId);
|
|
407
|
-
const message = (await
|
|
476
|
+
schedule_date: params?.sendAt,
|
|
477
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
478
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
479
|
+
const message = (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
408
480
|
return assertMessageType(message, "location");
|
|
409
481
|
}
|
|
410
482
|
async sendVideoNote(chatId, audio, params) {
|
|
411
483
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
412
484
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, audio, params, FileType.VideoNote, [
|
|
413
485
|
{ _: "documentAttributeVideo", round_message: true, w: params?.length ?? 0, h: params?.length ?? 0, duration: params?.duration ?? 0 },
|
|
414
|
-
], false);
|
|
486
|
+
], false, VIDEO_NOTE_MIME_TYPES, () => "video_note.mp4");
|
|
415
487
|
return assertMessageType(message, "videoNote");
|
|
416
488
|
}
|
|
417
489
|
async sendAudio(chatId, audio, params) {
|
|
418
490
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
419
491
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, audio, params, FileType.Audio, [
|
|
420
492
|
{ _: "documentAttributeAudio", duration: params?.duration ?? 0, performer: params?.performer, title: params?.title },
|
|
421
|
-
])
|
|
493
|
+
], undefined, AUDIO_MIME_TYPES, (firstPart) => {
|
|
494
|
+
if (__classPrivateFieldGet(_a, _a, "m", _MessageManager_isM4a).call(_a, firstPart)) {
|
|
495
|
+
return "audio.m4a";
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
return "audio.mp3";
|
|
499
|
+
}
|
|
500
|
+
});
|
|
422
501
|
return assertMessageType(message, "audio");
|
|
423
502
|
}
|
|
424
503
|
async sendVoice(chatId, voice, params) {
|
|
425
504
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
426
505
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, voice, params, FileType.VoiceNote, [
|
|
427
506
|
{ _: "documentAttributeAudio", voice: true, duration: params?.duration ?? 0 },
|
|
428
|
-
])
|
|
507
|
+
], undefined, VOICE_MIME_TYPES, (firstPart) => {
|
|
508
|
+
if (startsWith(firstPart, new Uint8Array([0x4F, 0x67, 0x67]))) {
|
|
509
|
+
return "voice.ogg";
|
|
510
|
+
}
|
|
511
|
+
else if (__classPrivateFieldGet(_a, _a, "m", _MessageManager_isM4a).call(_a, firstPart)) {
|
|
512
|
+
return "voice.m4a";
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
return "voice.mp3";
|
|
516
|
+
}
|
|
517
|
+
});
|
|
429
518
|
return assertMessageType(message, "voice");
|
|
430
519
|
}
|
|
431
520
|
async sendAnimation(chatId, animation, params) {
|
|
@@ -433,14 +522,21 @@ export class MessageManager {
|
|
|
433
522
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, animation, params, FileType.Animation, [
|
|
434
523
|
{ _: "documentAttributeAnimated" },
|
|
435
524
|
{ _: "documentAttributeVideo", supports_streaming: true, w: params?.width ?? 0, h: params?.height ?? 0, duration: params?.duration ?? 0 },
|
|
436
|
-
])
|
|
525
|
+
], undefined, ANIMATION_MIME_TYPES, (firstPart) => {
|
|
526
|
+
if (startsWith(firstPart, new Uint8Array([0x47, 0x49, 0x46]))) {
|
|
527
|
+
return "file.gif";
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
return "file.mp4";
|
|
531
|
+
}
|
|
532
|
+
});
|
|
437
533
|
return assertMessageType(message, "animation");
|
|
438
534
|
}
|
|
439
535
|
async sendVideo(chatId, video, params) {
|
|
440
536
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
441
537
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, video, params, FileType.Video, [
|
|
442
538
|
{ _: "documentAttributeVideo", supports_streaming: params?.supportsStreaming ? true : undefined, w: params?.width ?? 0, h: params?.height ?? 0, duration: params?.duration ?? 0 },
|
|
443
|
-
]);
|
|
539
|
+
], undefined, VIDEO_MIME_TYPES, () => "video.mp4");
|
|
444
540
|
return assertMessageType(message, "video");
|
|
445
541
|
}
|
|
446
542
|
async sendDocument(chatId, document, params) {
|
|
@@ -450,7 +546,17 @@ export class MessageManager {
|
|
|
450
546
|
}
|
|
451
547
|
async sendSticker(chatId, sticker, params) {
|
|
452
548
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
453
|
-
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, sticker, params, FileType.Sticker, [{ _: "documentAttributeSticker", alt: params?.emoji || "", stickerset: { _: "inputStickerSetEmpty" } }], undefined, STICKER_MIME_TYPES)
|
|
549
|
+
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, sticker, params, FileType.Sticker, [{ _: "documentAttributeSticker", alt: params?.emoji || "", stickerset: { _: "inputStickerSetEmpty" } }], undefined, STICKER_MIME_TYPES, (firstPart) => {
|
|
550
|
+
if (startsWith(firstPart, new Uint8Array([0x1F, 0x8B]))) {
|
|
551
|
+
return "file.tgs";
|
|
552
|
+
}
|
|
553
|
+
else if (firstPart.length >= 12 && equals(firstPart.subarray(8, 12), new Uint8Array([0x57, 0x45, 0x42, 0x50]))) {
|
|
554
|
+
return "file.webp";
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
return "file.webm";
|
|
558
|
+
}
|
|
559
|
+
});
|
|
454
560
|
return assertMessageType(message, "sticker");
|
|
455
561
|
}
|
|
456
562
|
async sendPhoto(chatId, photo, params) {
|
|
@@ -460,16 +566,26 @@ export class MessageManager {
|
|
|
460
566
|
const ttl_seconds = params && "selfDestruct" in params && params.selfDestruct !== undefined ? selfDestructOptionToInt(params.selfDestruct) : undefined;
|
|
461
567
|
if (typeof photo === "string") {
|
|
462
568
|
const fileId = this.resolveFileId(photo, [FileType.Photo, FileType.ProfilePhoto]);
|
|
463
|
-
if (fileId
|
|
569
|
+
if (fileId !== null) {
|
|
464
570
|
media = { _: "inputMediaPhoto", id: { ...fileId, _: "inputPhoto" }, spoiler, ttl_seconds };
|
|
465
571
|
}
|
|
466
572
|
}
|
|
467
|
-
if (media
|
|
573
|
+
if (media === null) {
|
|
468
574
|
if (typeof photo === "string" && isHttpUrl(photo)) {
|
|
469
575
|
media = { _: "inputMediaPhotoExternal", url: photo, spoiler, ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined };
|
|
470
576
|
}
|
|
471
577
|
else {
|
|
472
|
-
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(photo, params,
|
|
578
|
+
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(photo, params, (name, firstPart) => {
|
|
579
|
+
if (params?.fileName || !firstPart || name.includes(".")) {
|
|
580
|
+
return name;
|
|
581
|
+
}
|
|
582
|
+
if (startsWith(firstPart, new Uint8Array([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]))) {
|
|
583
|
+
return `${name}.png`;
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
return `${name}.jpg`;
|
|
587
|
+
}
|
|
588
|
+
}, false);
|
|
473
589
|
media = { _: "inputMediaUploadedPhoto", file, spoiler, ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined };
|
|
474
590
|
}
|
|
475
591
|
}
|
|
@@ -485,7 +601,7 @@ export class MessageManager {
|
|
|
485
601
|
catch (err) {
|
|
486
602
|
__classPrivateFieldGet(this, _MessageManager_LresolveFileId, "f").warning(err);
|
|
487
603
|
}
|
|
488
|
-
if (fileId
|
|
604
|
+
if (fileId !== null) {
|
|
489
605
|
if (!expectedFileType.includes(fileId.type)) {
|
|
490
606
|
unreachable();
|
|
491
607
|
}
|
|
@@ -508,23 +624,23 @@ export class MessageManager {
|
|
|
508
624
|
}
|
|
509
625
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
510
626
|
const randomId = getRandomId();
|
|
511
|
-
const silent = params?.
|
|
512
|
-
const noforwards = params?.
|
|
627
|
+
const silent = params?.isSilent ? true : undefined;
|
|
628
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
513
629
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
514
630
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
515
631
|
const explanation = params?.explanation;
|
|
516
|
-
const parseResult = explanation !== undefined ?
|
|
632
|
+
const parseResult = explanation !== undefined ? this.parseText(explanation, { parseMode: params?.explanationParseMode, entities: params?.explanationEntities }) : undefined;
|
|
517
633
|
const solution = parseResult === undefined ? undefined : parseResult[0];
|
|
518
634
|
const solutionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
519
|
-
const answers =
|
|
520
|
-
const text =
|
|
521
|
-
const entities =
|
|
522
|
-
const parseResult =
|
|
523
|
-
return ({ _: "pollAnswer", option:
|
|
524
|
-
})
|
|
525
|
-
const questionParseResult =
|
|
526
|
-
const poll = { _: "poll", id: getRandomId(), answers, question: { _: "textWithEntities", text: questionParseResult[0], entities: questionParseResult[1] ?? [] }, closed: params?.isClosed ? true : undefined, close_date: params?.closeDate
|
|
527
|
-
const media = { _: "inputMediaPoll", poll, correct_answers: params?.correctOptionIndex ? [
|
|
635
|
+
const answers = options.map((v, i) => {
|
|
636
|
+
const text = v.text;
|
|
637
|
+
const entities = v.entities;
|
|
638
|
+
const parseResult = this.parseText(text, { parseMode: v.parseMode, entities });
|
|
639
|
+
return ({ _: "pollAnswer", option: encodeText(String(i)), text: { _: "textWithEntities", text: parseResult[0], entities: parseResult[1] ?? [] } });
|
|
640
|
+
});
|
|
641
|
+
const questionParseResult = this.parseText(question, { parseMode: params?.questionParseMode, entities: params?.questionEntities });
|
|
642
|
+
const poll = { _: "poll", id: getRandomId(), answers, question: { _: "textWithEntities", text: questionParseResult[0], entities: questionParseResult[1] ?? [] }, closed: params?.isClosed ? true : undefined, close_date: params?.closeDate, close_period: params?.openPeriod ? params.openPeriod : undefined, multiple_choice: params?.allowMultipleAnswers ? true : undefined, public_voters: params?.isAnonymous === false ? true : undefined, quiz: params?.type === "quiz" ? true : undefined };
|
|
643
|
+
const media = { _: "inputMediaPoll", poll, correct_answers: params?.correctOptionIndex !== undefined ? [encodeText(String(params.correctOptionIndex))] : undefined, solution, solution_entities: solutionEntities };
|
|
528
644
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
529
645
|
_: "messages.sendMedia",
|
|
530
646
|
peer,
|
|
@@ -537,12 +653,59 @@ export class MessageManager {
|
|
|
537
653
|
media,
|
|
538
654
|
message: "",
|
|
539
655
|
effect: params?.effectId ? BigInt(params.effectId) : undefined,
|
|
540
|
-
schedule_date: params?.sendAt
|
|
541
|
-
allow_paid_floodskip: params?.
|
|
542
|
-
}, params?.businessConnectionId);
|
|
543
|
-
const message = (await
|
|
656
|
+
schedule_date: params?.sendAt,
|
|
657
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
658
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
659
|
+
const message = (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
544
660
|
return assertMessageType(message, "poll");
|
|
545
661
|
}
|
|
662
|
+
async sendChecklist(chatId, title, items, params) {
|
|
663
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("sendChecklist");
|
|
664
|
+
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
665
|
+
title = title?.trim();
|
|
666
|
+
if (!title) {
|
|
667
|
+
throw new Error("Title must not be empty.");
|
|
668
|
+
}
|
|
669
|
+
if (!Array.isArray(items) || items.length < 1) {
|
|
670
|
+
throw new Error("There must be at least one item.");
|
|
671
|
+
}
|
|
672
|
+
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
673
|
+
const randomId = getRandomId();
|
|
674
|
+
const silent = params?.isSilent ? true : undefined;
|
|
675
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
676
|
+
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
677
|
+
const list = items.map((v, i) => {
|
|
678
|
+
const text = v.text;
|
|
679
|
+
const entities = v.entities;
|
|
680
|
+
const parseResult = this.parseText(text, { parseMode: v.parseMode, entities });
|
|
681
|
+
return ({ _: "todoItem", id: i + 1, title: { _: "textWithEntities", text: parseResult[0], entities: parseResult[1] ?? [] } });
|
|
682
|
+
});
|
|
683
|
+
const titleParseResult = this.parseText(title, { parseMode: params?.titleParseMode, entities: params?.titleEntities });
|
|
684
|
+
const todo = {
|
|
685
|
+
_: "todoList",
|
|
686
|
+
title: { _: "textWithEntities", text: titleParseResult[0], entities: titleParseResult[1] ?? [] },
|
|
687
|
+
list,
|
|
688
|
+
others_can_append: params?.isExtendableByOthers ? true : undefined,
|
|
689
|
+
others_can_complete: params?.isCompletableByOthers ? true : undefined,
|
|
690
|
+
};
|
|
691
|
+
const media = { _: "inputMediaTodo", todo };
|
|
692
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
693
|
+
_: "messages.sendMedia",
|
|
694
|
+
peer,
|
|
695
|
+
random_id: randomId,
|
|
696
|
+
silent,
|
|
697
|
+
noforwards,
|
|
698
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
699
|
+
send_as: sendAs,
|
|
700
|
+
media,
|
|
701
|
+
message: "",
|
|
702
|
+
effect: params?.effectId ? BigInt(params.effectId) : undefined,
|
|
703
|
+
schedule_date: params?.sendAt,
|
|
704
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
705
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
706
|
+
const message = (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
707
|
+
return assertMessageType(message, "checklist");
|
|
708
|
+
}
|
|
546
709
|
async editMessageReplyMarkup(chatId, messageId, params) {
|
|
547
710
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
548
711
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
@@ -550,22 +713,41 @@ export class MessageManager {
|
|
|
550
713
|
id: checkMessageId(messageId),
|
|
551
714
|
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
552
715
|
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
553
|
-
}, params?.businessConnectionId);
|
|
554
|
-
const message_ = (await
|
|
716
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
717
|
+
const message_ = (await this.updatesToMessages(chatId, result))[0];
|
|
555
718
|
return message_;
|
|
556
719
|
}
|
|
557
720
|
async editInlineMessageReplyMarkup(inlineMessageId, params) {
|
|
558
|
-
const id = deserializeInlineMessageId(inlineMessageId);
|
|
559
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
721
|
+
const id = await deserializeInlineMessageId(inlineMessageId);
|
|
722
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
723
|
+
_: "messages.editInlineBotMessage",
|
|
724
|
+
id,
|
|
725
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
726
|
+
}, { dc: getDc(id.dc_id) });
|
|
560
727
|
}
|
|
561
728
|
async editMessageText(chatId, messageId, text, params) {
|
|
562
729
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
730
|
+
{
|
|
731
|
+
const message = await this.getMessage(chatId, messageId);
|
|
732
|
+
if (!message) {
|
|
733
|
+
throw new InputError("Message not found.");
|
|
734
|
+
}
|
|
735
|
+
if (!isMessageType(message, "link") && !isMessageType(message, "text")) {
|
|
736
|
+
throw new InputError("The referenced message is not a text message.");
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
const [message, entities] = this.parseText(text, params);
|
|
740
|
+
if (!message) {
|
|
741
|
+
throw new InputError("Message text cannot be empty.");
|
|
742
|
+
}
|
|
743
|
+
if (params?.linkPreview && params.linkPreview.type !== "input") {
|
|
744
|
+
throw new InputError("Expected link preview of type input.");
|
|
745
|
+
}
|
|
746
|
+
const noWebpage = params?.linkPreview && params.linkPreview.type === "input" && params.linkPreview.isDisabled ? true : undefined;
|
|
747
|
+
const invertMedia = params?.linkPreview?.isAboveText ? true : undefined;
|
|
566
748
|
let media = undefined;
|
|
567
749
|
if (!noWebpage && params?.linkPreview?.url) {
|
|
568
|
-
media = { _: "inputMediaWebPage", url: params.linkPreview.url, force_large_media: params.linkPreview.
|
|
750
|
+
media = { _: "inputMediaWebPage", url: params.linkPreview.url, force_large_media: params.linkPreview.mediaSize === "large" ? true : undefined, force_small_media: params.linkPreview.mediaSize === "small" ? true : undefined, optional: message.length ? undefined : true };
|
|
569
751
|
}
|
|
570
752
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
571
753
|
_: "messages.editMessage",
|
|
@@ -577,21 +759,40 @@ export class MessageManager {
|
|
|
577
759
|
no_webpage: noWebpage,
|
|
578
760
|
invert_media: invertMedia,
|
|
579
761
|
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
580
|
-
}, params?.businessConnectionId);
|
|
581
|
-
const message_ = (await
|
|
762
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
763
|
+
const message_ = (await this.updatesToMessages(chatId, result))[0];
|
|
582
764
|
return assertMessageType(message_, "text");
|
|
583
765
|
}
|
|
584
|
-
async
|
|
585
|
-
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
766
|
+
async editMessageCaption(chatId, messageId, params) {
|
|
767
|
+
let canHaveCaption = false;
|
|
768
|
+
const message_ = await this.getMessage(chatId, messageId);
|
|
769
|
+
if (!message_) {
|
|
770
|
+
throw new InputError("Message not found.");
|
|
771
|
+
}
|
|
772
|
+
for (const type of __classPrivateFieldGet(_a, _a, "f", _MessageManager_CAPTIONABLE_MESSAGE_TYPES)) {
|
|
773
|
+
if (isMessageType(message_, type)) {
|
|
774
|
+
canHaveCaption = true;
|
|
775
|
+
}
|
|
593
776
|
}
|
|
594
|
-
|
|
777
|
+
if (!canHaveCaption) {
|
|
778
|
+
throw new InputError("The referenced message cannot have a caption.");
|
|
779
|
+
}
|
|
780
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
781
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
782
|
+
_: "messages.editMessage",
|
|
783
|
+
id: checkMessageId(messageId),
|
|
784
|
+
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
785
|
+
entities: message ? entities : [],
|
|
786
|
+
message,
|
|
787
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
788
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
789
|
+
return (await this.updatesToMessages(chatId, result))[0];
|
|
790
|
+
}
|
|
791
|
+
async editInlineMessageText(inlineMessageId, text, params) {
|
|
792
|
+
await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_editInlineMessageTextInner).call(this, inlineMessageId, text, params, false);
|
|
793
|
+
}
|
|
794
|
+
async editInlineMessageCaption(inlineMessageId, params) {
|
|
795
|
+
await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_editInlineMessageTextInner).call(this, inlineMessageId, params?.caption ?? "", params);
|
|
595
796
|
}
|
|
596
797
|
async editMessageMedia(chatId, messageId, media, params) {
|
|
597
798
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
@@ -602,7 +803,7 @@ export class MessageManager {
|
|
|
602
803
|
if (!("animation" in message) && !("audio" in message) && !("document" in message) && !("photo" in message) && !("video" in message)) {
|
|
603
804
|
throw new InputError("Unexpected message type.");
|
|
604
805
|
}
|
|
605
|
-
const [text, entities] = media.caption !== undefined ?
|
|
806
|
+
const [text, entities] = media.caption !== undefined ? this.parseText(media.caption, { entities: media.captionEntities, parseMode: media.parseMode }) : ["", []];
|
|
606
807
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
607
808
|
_: "messages.editMessage",
|
|
608
809
|
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
@@ -611,15 +812,20 @@ export class MessageManager {
|
|
|
611
812
|
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
612
813
|
message: text,
|
|
613
814
|
entities,
|
|
614
|
-
}, params?.businessConnectionId);
|
|
615
|
-
const message_ = (await
|
|
815
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
816
|
+
const message_ = (await this.updatesToMessages(chatId, result))[0];
|
|
616
817
|
return message_;
|
|
617
818
|
}
|
|
618
819
|
async editInlineMessageMedia(inlineMessageId, media, params) {
|
|
619
820
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
620
821
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("editInlineMessageMedia");
|
|
621
|
-
const id = deserializeInlineMessageId(inlineMessageId);
|
|
622
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
822
|
+
const id = await deserializeInlineMessageId(inlineMessageId);
|
|
823
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
824
|
+
_: "messages.editInlineBotMessage",
|
|
825
|
+
id,
|
|
826
|
+
media: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMediaUpload).call(this, media),
|
|
827
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
828
|
+
}, { dc: getDc(id.dc_id) });
|
|
623
829
|
}
|
|
624
830
|
async deleteMessages(chatId, messageIds, params) {
|
|
625
831
|
checkArray(messageIds, checkMessageId);
|
|
@@ -646,7 +852,7 @@ export class MessageManager {
|
|
|
646
852
|
checkArray(messageIds, checkMessageId);
|
|
647
853
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
648
854
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.sendScheduledMessages", peer, id: messageIds });
|
|
649
|
-
return await
|
|
855
|
+
return await this.updatesToMessages(chatId, result);
|
|
650
856
|
}
|
|
651
857
|
async sendScheduledMessage(chatId, messageId) {
|
|
652
858
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("sendScheduledMessage");
|
|
@@ -660,17 +866,18 @@ export class MessageManager {
|
|
|
660
866
|
}
|
|
661
867
|
async pinMessage(chatId, messageId, params) {
|
|
662
868
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
663
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.updatePinnedMessage", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), id: checkMessageId(messageId), silent: params?.
|
|
869
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.updatePinnedMessage", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), id: checkMessageId(messageId), silent: params?.isSilent ? true : undefined, pm_oneside: params?.bothSides ? undefined : true });
|
|
664
870
|
}
|
|
665
871
|
async unpinMessage(chatId, messageId, params) {
|
|
666
872
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
667
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.updatePinnedMessage", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), id: checkMessageId(messageId), unpin: true }, params?.businessConnectionId);
|
|
873
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.updatePinnedMessage", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), id: checkMessageId(messageId), unpin: true }, { businessConnectionId: params?.businessConnectionId });
|
|
668
874
|
}
|
|
669
|
-
async unpinMessages(chatId) {
|
|
670
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
875
|
+
async unpinMessages(chatId, params) {
|
|
876
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
877
|
+
_: "messages.unpinAllMessages",
|
|
878
|
+
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
879
|
+
top_msg_id: params?.topicId,
|
|
880
|
+
});
|
|
674
881
|
}
|
|
675
882
|
async setReactions(chatId, messageId, reactions, params) {
|
|
676
883
|
await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendReaction).call(this, chatId, messageId, reactions, params);
|
|
@@ -680,7 +887,7 @@ export class MessageManager {
|
|
|
680
887
|
if (!message) {
|
|
681
888
|
throw new InputError("Message not found.");
|
|
682
889
|
}
|
|
683
|
-
const chosenReactions = (message.reactions ?? []).filter((v) => v.
|
|
890
|
+
const chosenReactions = (message.reactions ?? []).filter((v) => v.isChosen);
|
|
684
891
|
for (const r of chosenReactions) {
|
|
685
892
|
if (reactionEqual(r.reaction, reaction)) {
|
|
686
893
|
return;
|
|
@@ -694,56 +901,53 @@ export class MessageManager {
|
|
|
694
901
|
if (!message) {
|
|
695
902
|
throw new InputError("Message not found.");
|
|
696
903
|
}
|
|
697
|
-
const chosenReactions = (message.reactions ?? []).filter((v) => v.
|
|
904
|
+
const chosenReactions = (message.reactions ?? []).filter((v) => v.isChosen);
|
|
698
905
|
for (const r of chosenReactions) {
|
|
699
906
|
if (reactionEqual(r.reaction, reaction)) {
|
|
700
|
-
const reactions = chosenReactions.filter((v) => v
|
|
907
|
+
const reactions = chosenReactions.filter((v) => v !== r).map((v) => v.reaction);
|
|
701
908
|
await this.setReactions(chatId, messageId, reactions);
|
|
702
909
|
break;
|
|
703
910
|
}
|
|
704
911
|
}
|
|
705
912
|
}
|
|
706
|
-
|
|
707
|
-
return isOneOf(messageManagerUpdates, update);
|
|
913
|
+
canHandleUpdate(update) {
|
|
914
|
+
return Api.isOneOf(messageManagerUpdates, update);
|
|
708
915
|
}
|
|
709
916
|
async handleUpdate(update) {
|
|
710
|
-
if (is("updateNewMessage", update) || is("updateNewChannelMessage", update) || is("updateEditMessage", update) || is("updateEditChannelMessage", update)) {
|
|
711
|
-
if (is("message", update.message) || is("messageService", update.message)) {
|
|
712
|
-
const chatId = peerToChatId(update.message.peer_id);
|
|
917
|
+
if (Api.is("updateNewMessage", update) || Api.is("updateNewChannelMessage", update) || Api.is("updateEditMessage", update) || Api.is("updateEditChannelMessage", update)) {
|
|
918
|
+
if (Api.is("message", update.message) || Api.is("messageService", update.message)) {
|
|
919
|
+
const chatId = Api.peerToChatId(update.message.peer_id);
|
|
713
920
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.setMessage(chatId, update.message.id, update.message);
|
|
714
921
|
}
|
|
715
922
|
}
|
|
716
|
-
if (
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
923
|
+
if (Api.isOneOf([
|
|
924
|
+
"updateNewMessage",
|
|
925
|
+
"updateNewChannelMessage",
|
|
926
|
+
"updateEditMessage",
|
|
927
|
+
"updateEditChannelMessage",
|
|
928
|
+
"updateBotNewBusinessMessage",
|
|
929
|
+
"updateBotEditBusinessMessage",
|
|
930
|
+
"updateNewScheduledMessage",
|
|
931
|
+
], update)) {
|
|
932
|
+
if (!(Api.is("messageEmpty", update.message))) {
|
|
724
933
|
const isOutgoing = update.message.out;
|
|
725
934
|
let shouldIgnore = false;
|
|
726
935
|
if (isOutgoing) {
|
|
727
|
-
if (
|
|
728
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").outgoingMessages = __classPrivateFieldGet(this, _MessageManager_c, "f").storage.accountType == "user" ? "all" : "business";
|
|
729
|
-
}
|
|
730
|
-
if (__classPrivateFieldGet(this, _MessageManager_c, "f").outgoingMessages == "none") {
|
|
936
|
+
if ("connection_id" in update && update.connection_id === "") {
|
|
731
937
|
shouldIgnore = true;
|
|
732
938
|
}
|
|
733
|
-
else
|
|
734
|
-
|
|
735
|
-
shouldIgnore = true;
|
|
736
|
-
}
|
|
939
|
+
else {
|
|
940
|
+
shouldIgnore = !__classPrivateFieldGet(this, _MessageManager_c, "f").outgoingMessages;
|
|
737
941
|
}
|
|
738
942
|
}
|
|
739
943
|
if (!shouldIgnore) {
|
|
740
944
|
const business = "connection_id" in update ? { connectionId: update.connection_id, replyToMessage: update.reply_to_message } : undefined;
|
|
741
945
|
const message = await this.constructMessage(update.message, undefined, business);
|
|
742
|
-
if (is("updateNewMessage", update) || is("updateNewChannelMessage", update) || is("updateBotNewBusinessMessage", update)) {
|
|
946
|
+
if (Api.is("updateNewMessage", update) || Api.is("updateNewChannelMessage", update) || Api.is("updateBotNewBusinessMessage", update)) {
|
|
743
947
|
return { message };
|
|
744
948
|
}
|
|
745
|
-
else if (is("updateNewScheduledMessage", update)) {
|
|
746
|
-
message.
|
|
949
|
+
else if (Api.is("updateNewScheduledMessage", update)) {
|
|
950
|
+
message.isScheduled = true;
|
|
747
951
|
return { scheduledMessage: message };
|
|
748
952
|
}
|
|
749
953
|
else {
|
|
@@ -752,7 +956,7 @@ export class MessageManager {
|
|
|
752
956
|
}
|
|
753
957
|
}
|
|
754
958
|
}
|
|
755
|
-
if (is("updateDeleteMessages", update)) {
|
|
959
|
+
if (Api.is("updateDeleteMessages", update)) {
|
|
756
960
|
const deletedMessages = new Array();
|
|
757
961
|
for (const messageId of update.messages) {
|
|
758
962
|
const chatId = await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.getMessageChat(messageId);
|
|
@@ -764,40 +968,31 @@ export class MessageManager {
|
|
|
764
968
|
return { deletedMessages };
|
|
765
969
|
}
|
|
766
970
|
}
|
|
767
|
-
else if (is("updateDeleteChannelMessages", update)) {
|
|
768
|
-
const chatId = getChannelChatId(update.channel_id);
|
|
971
|
+
else if (Api.is("updateDeleteChannelMessages", update)) {
|
|
972
|
+
const chatId = Api.getChannelChatId(update.channel_id);
|
|
769
973
|
const deletedMessages = new Array();
|
|
770
974
|
for (const messageId of update.messages) {
|
|
771
975
|
const message = await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.getMessage(chatId, messageId);
|
|
772
|
-
if (message
|
|
976
|
+
if (message !== null) {
|
|
773
977
|
deletedMessages.push({ chatId, messageId });
|
|
774
978
|
}
|
|
775
979
|
}
|
|
776
980
|
return { deletedMessages };
|
|
777
981
|
}
|
|
778
|
-
else if (is("updateDeleteScheduledMessages", update)) {
|
|
779
|
-
const chatId = peerToChatId(update.peer);
|
|
982
|
+
else if (Api.is("updateDeleteScheduledMessages", update)) {
|
|
983
|
+
const chatId = Api.peerToChatId(update.peer);
|
|
780
984
|
const deletedMessages = update.messages.map((v) => ({ chatId, messageId: v }));
|
|
781
|
-
return { deletedMessages,
|
|
985
|
+
return { deletedMessages, isScheduled: true };
|
|
782
986
|
}
|
|
783
|
-
else if (is("updateBotDeleteBusinessMessage", update)) {
|
|
784
|
-
const chatId = peerToChatId(update.peer);
|
|
987
|
+
else if (Api.is("updateBotDeleteBusinessMessage", update)) {
|
|
988
|
+
const chatId = Api.peerToChatId(update.peer);
|
|
785
989
|
const deletedMessages = update.messages.map((v) => ({ chatId, messageId: v }));
|
|
786
990
|
return { deletedMessages, businessConnectionId: update.connection_id };
|
|
787
991
|
}
|
|
788
|
-
if (is("
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
return { myChatMember: chatMember };
|
|
793
|
-
}
|
|
794
|
-
else {
|
|
795
|
-
return { chatMember };
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
if (is("updateBotChatInviteRequester", update)) {
|
|
799
|
-
const joinRequest = await constructJoinRequest(update, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity);
|
|
800
|
-
return { joinRequest };
|
|
992
|
+
if (Api.is("updateTranscribedAudio", update)) {
|
|
993
|
+
const voiceTranscription = constructVoiceTranscription(update);
|
|
994
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.setVoiceTranscription(voiceTranscription);
|
|
995
|
+
return { voiceTranscription };
|
|
801
996
|
}
|
|
802
997
|
return null;
|
|
803
998
|
}
|
|
@@ -841,199 +1036,46 @@ export class MessageManager {
|
|
|
841
1036
|
default:
|
|
842
1037
|
throw new InputError(`Invalid chat action: ${action}`);
|
|
843
1038
|
}
|
|
844
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.setTyping", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), action: action_, top_msg_id: params?.messageThreadId }, params?.businessConnectionId);
|
|
1039
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.setTyping", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), action: action_, top_msg_id: params?.messageThreadId }, { businessConnectionId: params?.businessConnectionId });
|
|
845
1040
|
}
|
|
846
|
-
async
|
|
847
|
-
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
848
|
-
if (!(canBeInputChannel(peer)) && !(is("inputPeerChat", peer))) {
|
|
849
|
-
unreachable();
|
|
850
|
-
}
|
|
851
|
-
if (canBeInputChannel(peer)) {
|
|
852
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.editPhoto", channel: toInputChannel(peer), photo: { _: "inputChatPhotoEmpty" } });
|
|
853
|
-
}
|
|
854
|
-
else if (is("inputPeerChat", peer)) {
|
|
855
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.editChatPhoto", chat_id: peer.chat_id, photo: { _: "inputChatPhotoEmpty" } });
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
async setChatPhoto(chatId, photo, params) {
|
|
859
|
-
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
860
|
-
if (!(canBeInputChannel(peer)) && !(is("inputPeerChat", peer))) {
|
|
861
|
-
unreachable();
|
|
862
|
-
}
|
|
863
|
-
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(photo, params);
|
|
864
|
-
const photo_ = { _: "inputChatUploadedPhoto", file };
|
|
865
|
-
if (canBeInputChannel(peer)) {
|
|
866
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.editPhoto", channel: toInputChannel(peer), photo: photo_ });
|
|
867
|
-
}
|
|
868
|
-
else if (is("inputPeerChat", peer)) {
|
|
869
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.editChatPhoto", chat_id: peer.chat_id, photo: photo_ });
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
async banChatMember(chatId, memberId, params) {
|
|
873
|
-
const chat = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
874
|
-
if (!(is("inputPeerChannel", chat)) && !(is("inputPeerChat", chat))) {
|
|
875
|
-
throw new InputError("Expected a channel, supergroup, or group ID.");
|
|
876
|
-
}
|
|
877
|
-
const member = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(memberId);
|
|
878
|
-
if (is("inputPeerChannel", chat)) {
|
|
879
|
-
if (params?.deleteMessages) {
|
|
880
|
-
try {
|
|
881
|
-
await this.deleteChatMemberMessages(chatId, memberId);
|
|
882
|
-
}
|
|
883
|
-
catch {
|
|
884
|
-
//
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
888
|
-
_: "channels.editBanned",
|
|
889
|
-
channel: { ...chat, _: "inputChannel" },
|
|
890
|
-
participant: member,
|
|
891
|
-
banned_rights: ({
|
|
892
|
-
_: "chatBannedRights",
|
|
893
|
-
until_date: params?.untilDate ? toUnixTimestamp(params.untilDate) : 0,
|
|
894
|
-
view_messages: true,
|
|
895
|
-
send_messages: true,
|
|
896
|
-
send_media: true,
|
|
897
|
-
send_stickers: true,
|
|
898
|
-
send_gifs: true,
|
|
899
|
-
send_games: true,
|
|
900
|
-
send_inline: true,
|
|
901
|
-
embed_links: true,
|
|
902
|
-
}),
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
else if (is("inputPeerChat", chat)) {
|
|
906
|
-
if (!canBeInputUser(member)) {
|
|
907
|
-
throw new InputError(`Invalid user ID: ${memberId}`);
|
|
908
|
-
}
|
|
909
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.deleteChatUser", chat_id: chat.chat_id, user_id: toInputUser(member), revoke_history: params?.deleteMessages ? true : undefined });
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
async unbanChatMember(chatId, memberId) {
|
|
913
|
-
const channel = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputChannel(chatId);
|
|
914
|
-
const member = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(memberId);
|
|
915
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.editBanned", channel, participant: member, banned_rights: ({ _: "chatBannedRights", until_date: 0 }) });
|
|
916
|
-
}
|
|
917
|
-
async setChatMemberRights(chatId, memberId, params) {
|
|
918
|
-
const channel = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputChannel(chatId);
|
|
919
|
-
const member = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(memberId);
|
|
920
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.editBanned", channel, participant: member, banned_rights: chatMemberRightsToTlObject(params?.rights, params?.untilDate) });
|
|
921
|
-
}
|
|
922
|
-
async enableJoinRequests(chatId) {
|
|
923
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("enableJoinRequests");
|
|
924
|
-
await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_toggleJoinRequests).call(this, chatId, true);
|
|
925
|
-
}
|
|
926
|
-
async disableJoinRequests(chatId) {
|
|
927
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("disableJoinRequests");
|
|
928
|
-
await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_toggleJoinRequests).call(this, chatId, false);
|
|
929
|
-
}
|
|
930
|
-
async approveJoinRequest(chatId, userId) {
|
|
931
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
932
|
-
_: "messages.hideChatJoinRequest",
|
|
933
|
-
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
934
|
-
user_id: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputUser(userId),
|
|
935
|
-
approved: true,
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
async declineJoinRequest(chatId, userId) {
|
|
939
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
940
|
-
_: "messages.hideChatJoinRequest",
|
|
941
|
-
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
942
|
-
user_id: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputUser(userId),
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
async approveJoinRequests(chatId, params) {
|
|
946
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("approveJoinRequests");
|
|
947
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
948
|
-
_: "messages.hideAllChatJoinRequests",
|
|
949
|
-
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
950
|
-
approved: true,
|
|
951
|
-
link: params?.inviteLink,
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
async declineJoinRequests(chatId, params) {
|
|
955
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("declineJoinRequests");
|
|
956
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
957
|
-
_: "messages.hideAllChatJoinRequests",
|
|
958
|
-
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
959
|
-
link: params?.inviteLink,
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
async searchMessages(chatId, query, params) {
|
|
1041
|
+
async searchMessages(params) {
|
|
963
1042
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("searchMessages");
|
|
964
|
-
const
|
|
1043
|
+
const peer = params?.chatId === undefined ? { _: "inputPeerEmpty" } : await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.chatId);
|
|
1044
|
+
const query = params?.query ?? "";
|
|
1045
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1046
|
+
_: "messages.search",
|
|
1047
|
+
peer,
|
|
1048
|
+
q: query,
|
|
1049
|
+
add_offset: params?.addOffset ?? 0,
|
|
1050
|
+
filter: messageSearchFilterToTlObject(params?.filter ?? "empty"),
|
|
1051
|
+
hash: 0n,
|
|
1052
|
+
limit: getLimit(params?.limit),
|
|
1053
|
+
max_date: 0,
|
|
1054
|
+
max_id: 0,
|
|
1055
|
+
min_date: 0,
|
|
1056
|
+
min_id: 0,
|
|
1057
|
+
offset_id: params?.offset ? params.offset : 0,
|
|
1058
|
+
from_id: params?.from ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.from) : undefined,
|
|
1059
|
+
});
|
|
965
1060
|
if (!("messages" in result)) {
|
|
966
1061
|
unreachable();
|
|
967
1062
|
}
|
|
1063
|
+
const count = "count" in result ? result.count : result.messages.length;
|
|
968
1064
|
const messages = new Array();
|
|
969
1065
|
for (const message_ of result.messages) {
|
|
970
1066
|
const message = await this.constructMessage(message_, false);
|
|
971
1067
|
messages.push(message);
|
|
972
1068
|
}
|
|
973
|
-
return messages;
|
|
974
|
-
}
|
|
975
|
-
async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
|
|
976
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("setBoostsRequiredToCircumventRestrictions");
|
|
977
|
-
const channel = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputChannel(chatId);
|
|
978
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.setBoostsToUnblockRestrictions", channel, boosts });
|
|
979
|
-
}
|
|
980
|
-
async createInviteLink(chatId, params) {
|
|
981
|
-
if (params?.requireApproval && params?.limit) {
|
|
982
|
-
throw new InputError("requireApproval cannot be true while limit is specified.");
|
|
983
|
-
}
|
|
984
|
-
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.exportChatInvite", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), title: params?.title, expire_date: params?.expireAt ? toUnixTimestamp(params.expireAt) : undefined, request_needed: params?.requireApproval ? true : undefined, usage_limit: params?.limit });
|
|
985
|
-
return await constructInviteLink(as("chatInviteExported", result), __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity);
|
|
986
|
-
}
|
|
987
|
-
async getCreatedInviteLinks(chatId, params) {
|
|
988
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("getCreatedInviteLinks");
|
|
989
|
-
const { invites } = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.getExportedChatInvites", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), revoked: params?.revoked ? true : undefined, admin_id: params?.by ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputUser(params.by) : { _: "inputUserEmpty" }, limit: params?.limit ?? 100, offset_date: params?.afterDate ? toUnixTimestamp(params.afterDate) : undefined, offset_link: params?.afterInviteLink });
|
|
990
|
-
return await Promise.all(invites.map((v) => as("chatInviteExported", v)).map((v) => constructInviteLink(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity)));
|
|
991
|
-
}
|
|
992
|
-
async joinChat(chatId) {
|
|
993
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("joinChat");
|
|
994
|
-
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
995
|
-
if (canBeInputUser(peer)) {
|
|
996
|
-
throw new InputError("Cannot join private chats.");
|
|
997
|
-
}
|
|
998
|
-
else if (canBeInputChannel(peer)) {
|
|
999
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.joinChannel", channel: toInputChannel(peer) });
|
|
1000
|
-
}
|
|
1001
|
-
else if (is("inputPeerChat", peer)) {
|
|
1002
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.addChatUser", chat_id: peer.chat_id, user_id: { _: "inputUserSelf" }, fwd_limit: 0 }); // TODO: use potential high-level method for adding participants to chats
|
|
1003
|
-
}
|
|
1004
|
-
else {
|
|
1005
|
-
unreachable();
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
async leaveChat(chatId) {
|
|
1009
|
-
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1010
|
-
if (canBeInputUser(peer)) {
|
|
1011
|
-
throw new InputError("Cannot leave private chats.");
|
|
1012
|
-
}
|
|
1013
|
-
else if (canBeInputChannel(peer)) {
|
|
1014
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.leaveChannel", channel: toInputChannel(peer) });
|
|
1015
|
-
}
|
|
1016
|
-
else if (is("inputPeerChat", peer)) {
|
|
1017
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.deleteChatUser", chat_id: peer.chat_id, user_id: { _: "inputUserSelf" } }); // TODO: use potential high-level method for adding participants to chats
|
|
1018
|
-
}
|
|
1019
|
-
else {
|
|
1020
|
-
unreachable();
|
|
1021
|
-
}
|
|
1069
|
+
return { messages, count };
|
|
1022
1070
|
}
|
|
1023
1071
|
async blockUser(userId) {
|
|
1024
1072
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("blockUser");
|
|
1025
1073
|
const id = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(userId);
|
|
1026
|
-
if (!(is("user", id))) {
|
|
1027
|
-
throw new InputError("Only users can be blocked or unblocked.");
|
|
1028
|
-
}
|
|
1029
1074
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "contacts.block", id });
|
|
1030
1075
|
}
|
|
1031
1076
|
async unblockUser(userId) {
|
|
1032
1077
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("unblockUser");
|
|
1033
1078
|
const id = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(userId);
|
|
1034
|
-
if (!(is("user", id))) {
|
|
1035
|
-
throw new InputError("Only users can be blocked or unblocked.");
|
|
1036
|
-
}
|
|
1037
1079
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "contacts.unblock", id });
|
|
1038
1080
|
}
|
|
1039
1081
|
async setChatStickerSet(chatId, setName) {
|
|
@@ -1060,10 +1102,10 @@ export class MessageManager {
|
|
|
1060
1102
|
_: "messages.editMessage",
|
|
1061
1103
|
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
1062
1104
|
id: messageId,
|
|
1063
|
-
media:
|
|
1105
|
+
media: { _: "inputMediaPoll", poll: { _: "poll", id: BigInt(message.poll.id), closed: true, question: { _: "textWithEntities", text: "", entities: [] }, answers: [] } },
|
|
1064
1106
|
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
1065
|
-
}, params?.businessConnectionId);
|
|
1066
|
-
const message_ = (await
|
|
1107
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
1108
|
+
const message_ = (await this.updatesToMessages(chatId, result))[0];
|
|
1067
1109
|
return assertMessageType(message_, "poll").poll;
|
|
1068
1110
|
}
|
|
1069
1111
|
async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
|
|
@@ -1074,10 +1116,10 @@ export class MessageManager {
|
|
|
1074
1116
|
_: "messages.editMessage",
|
|
1075
1117
|
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
1076
1118
|
id: messageId,
|
|
1077
|
-
media:
|
|
1119
|
+
media: { _: "inputMediaGeoLive", geo_point: { _: "inputGeoPoint", lat: latitude, long: longitude, accuracy_radius: params?.horizontalAccuracy }, heading: params?.heading, proximity_notification_radius: params?.proximityAlertRadius },
|
|
1078
1120
|
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
1079
|
-
}, params?.businessConnectionId);
|
|
1080
|
-
const message = (await
|
|
1121
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
1122
|
+
const message = (await this.updatesToMessages(chatId, result))[0];
|
|
1081
1123
|
return assertMessageType(message, "location");
|
|
1082
1124
|
}
|
|
1083
1125
|
unreachable();
|
|
@@ -1085,8 +1127,13 @@ export class MessageManager {
|
|
|
1085
1127
|
async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
|
|
1086
1128
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
1087
1129
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("editInlineMessageLiveLocation");
|
|
1088
|
-
const id = deserializeInlineMessageId(inlineMessageId);
|
|
1089
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1130
|
+
const id = await deserializeInlineMessageId(inlineMessageId);
|
|
1131
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1132
|
+
_: "messages.editInlineBotMessage",
|
|
1133
|
+
id,
|
|
1134
|
+
media: { _: "inputMediaGeoLive", geo_point: { _: "inputGeoPoint", lat: latitude, long: longitude, accuracy_radius: params?.horizontalAccuracy }, heading: params?.heading, proximity_notification_radius: params?.proximityAlertRadius },
|
|
1135
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
1136
|
+
}, { dc: getDc(id.dc_id) });
|
|
1090
1137
|
}
|
|
1091
1138
|
async sendInvoice(chatId, title, description, payload, currency, prices, params) {
|
|
1092
1139
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("sendInvoice");
|
|
@@ -1115,7 +1162,7 @@ export class MessageManager {
|
|
|
1115
1162
|
shipping_address_requested: params?.needShippingAddress || undefined,
|
|
1116
1163
|
email_to_provider: params?.sendEmailToProvider || undefined,
|
|
1117
1164
|
phone_to_provider: params?.sendPhoneNumberToProvider || undefined,
|
|
1118
|
-
flexible: params?.
|
|
1165
|
+
flexible: params?.isFlexible || undefined,
|
|
1119
1166
|
};
|
|
1120
1167
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendMedia).call(this, chatId, {
|
|
1121
1168
|
_: "inputMediaInvoice",
|
|
@@ -1123,7 +1170,7 @@ export class MessageManager {
|
|
|
1123
1170
|
description,
|
|
1124
1171
|
invoice,
|
|
1125
1172
|
start_param: params?.startParameter,
|
|
1126
|
-
payload:
|
|
1173
|
+
payload: encodeText(payload),
|
|
1127
1174
|
provider_data: { _: "dataJSON", data: params?.providerData ?? "null" },
|
|
1128
1175
|
provider: params?.providerToken ?? "",
|
|
1129
1176
|
photo: params?.photoUrl
|
|
@@ -1142,42 +1189,6 @@ export class MessageManager {
|
|
|
1142
1189
|
}, params);
|
|
1143
1190
|
return assertMessageType(message, "invoice");
|
|
1144
1191
|
}
|
|
1145
|
-
async addChatMember(chatId, userId, params) {
|
|
1146
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("addChatMember");
|
|
1147
|
-
const chat = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1148
|
-
if (isOneOf(["inputPeerEmpty", "inputPeerSelf", "inputPeerUser", "inputPeerUserFromMessage"], chat)) {
|
|
1149
|
-
throw new InputError("Cannot add members to private chats");
|
|
1150
|
-
}
|
|
1151
|
-
const user = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputUser(userId);
|
|
1152
|
-
if (is("inputPeerChat", chat)) {
|
|
1153
|
-
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.addChatUser", chat_id: chat.chat_id, user_id: user, fwd_limit: params?.historyLimit ?? 0 });
|
|
1154
|
-
return result.missing_invitees.map(constructFailedInvitation);
|
|
1155
|
-
}
|
|
1156
|
-
else if (is("inputPeerChannel", chat)) {
|
|
1157
|
-
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.inviteToChannel", channel: { ...chat, _: "inputChannel" }, users: [user] });
|
|
1158
|
-
return result.missing_invitees.map(constructFailedInvitation);
|
|
1159
|
-
}
|
|
1160
|
-
unreachable();
|
|
1161
|
-
}
|
|
1162
|
-
async addChatMembers(chatId, userIds) {
|
|
1163
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("addChatMembers");
|
|
1164
|
-
const chat = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1165
|
-
if (isOneOf(["inputPeerEmpty", "inputPeerSelf", "inputPeerUser", "inputPeerUserFromMessage"], chat)) {
|
|
1166
|
-
throw new InputError("Cannot add members to private chats");
|
|
1167
|
-
}
|
|
1168
|
-
const users = new Array();
|
|
1169
|
-
for (const userId of userIds) {
|
|
1170
|
-
users.push(await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputUser(userId));
|
|
1171
|
-
}
|
|
1172
|
-
if (is("inputPeerChat", chat)) {
|
|
1173
|
-
throw new InputError("addChatMembers cannot be used with basic groups");
|
|
1174
|
-
}
|
|
1175
|
-
else if (canBeInputChannel(chat)) {
|
|
1176
|
-
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "channels.inviteToChannel", channel: toInputChannel(chat), users });
|
|
1177
|
-
return result.missing_invitees.map(constructFailedInvitation);
|
|
1178
|
-
}
|
|
1179
|
-
unreachable();
|
|
1180
|
-
}
|
|
1181
1192
|
async sendMediaGroup(chatId, media, params) {
|
|
1182
1193
|
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
1183
1194
|
{
|
|
@@ -1190,13 +1201,13 @@ export class MessageManager {
|
|
|
1190
1201
|
for (const media_ of media) {
|
|
1191
1202
|
// deno-lint-ignore no-explicit-any
|
|
1192
1203
|
const thisMediaType = media_?.animation !== undefined ? "animation" : media_?.audio !== undefined ? "audio" : media_?.photo !== undefined ? "photo" : media_?.video !== undefined ? "video" : "document";
|
|
1193
|
-
if (thisMediaType
|
|
1204
|
+
if (thisMediaType === "animation") {
|
|
1194
1205
|
throw new InputError("Media groups cannot consist of animations.");
|
|
1195
1206
|
}
|
|
1196
|
-
if ((firstMediaType
|
|
1207
|
+
if ((firstMediaType === "video" || firstMediaType === "photo") && (thisMediaType !== "video" && thisMediaType !== "photo")) {
|
|
1197
1208
|
throw new InputError(`Media of the type ${firstMediaType} cannot be mixed with those of the type ${thisMediaType}.`);
|
|
1198
1209
|
}
|
|
1199
|
-
if (firstMediaType
|
|
1210
|
+
if (firstMediaType !== "video" && firstMediaType !== "photo" && firstMediaType !== thisMediaType) {
|
|
1200
1211
|
throw new InputError(`Media of the type ${firstMediaType} cannot be mixed with other types.`);
|
|
1201
1212
|
}
|
|
1202
1213
|
}
|
|
@@ -1204,24 +1215,24 @@ export class MessageManager {
|
|
|
1204
1215
|
const multiMedia = new Array();
|
|
1205
1216
|
for (const v of media) {
|
|
1206
1217
|
const randomId = getRandomId();
|
|
1207
|
-
const [message, entities] = v.caption !== undefined ?
|
|
1218
|
+
const [message, entities] = v.caption !== undefined ? this.parseText(v.caption, { entities: v.captionEntities, parseMode: v.parseMode }) : ["", []];
|
|
1208
1219
|
multiMedia.push({ _: "inputSingleMedia", message, entities, random_id: randomId, media: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMedia).call(this, v) });
|
|
1209
1220
|
}
|
|
1210
1221
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1211
1222
|
for (const [i, media_] of multiMedia.entries()) {
|
|
1212
|
-
if (is("inputMediaUploadedPhoto", media_.media)) {
|
|
1213
|
-
const result = as("messageMediaPhoto", await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.uploadMedia", media: media_.media, peer }));
|
|
1214
|
-
const photo = as("photo", result.photo);
|
|
1223
|
+
if (Api.is("inputMediaUploadedPhoto", media_.media)) {
|
|
1224
|
+
const result = Api.as("messageMediaPhoto", await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.uploadMedia", media: media_.media, peer }));
|
|
1225
|
+
const photo = Api.as("photo", result.photo);
|
|
1215
1226
|
multiMedia[i] = { ...media_, media: { _: "inputMediaPhoto", id: { ...photo, _: "inputPhoto" } } };
|
|
1216
1227
|
}
|
|
1217
|
-
else if (is("inputMediaUploadedDocument", media_.media)) {
|
|
1218
|
-
const result = as("messageMediaDocument", await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.uploadMedia", media: media_.media, peer }));
|
|
1219
|
-
const document = as("document", result.document);
|
|
1228
|
+
else if (Api.is("inputMediaUploadedDocument", media_.media)) {
|
|
1229
|
+
const result = Api.as("messageMediaDocument", await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.uploadMedia", media: media_.media, peer }));
|
|
1230
|
+
const document = Api.as("document", result.document);
|
|
1220
1231
|
multiMedia[i] = { ...media_, media: { _: "inputMediaDocument", id: { ...document, _: "inputDocument" } } };
|
|
1221
1232
|
}
|
|
1222
1233
|
}
|
|
1223
|
-
const silent = params?.
|
|
1224
|
-
const noforwards = params?.
|
|
1234
|
+
const silent = params?.isSilent ? true : undefined;
|
|
1235
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
1225
1236
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
1226
1237
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1227
1238
|
_: "messages.sendMultiMedia",
|
|
@@ -1232,9 +1243,9 @@ export class MessageManager {
|
|
|
1232
1243
|
silent,
|
|
1233
1244
|
send_as: sendAs,
|
|
1234
1245
|
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
1235
|
-
allow_paid_floodskip: params?.
|
|
1246
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
1236
1247
|
});
|
|
1237
|
-
return await
|
|
1248
|
+
return await this.updatesToMessages(chatId, result);
|
|
1238
1249
|
}
|
|
1239
1250
|
async readMessages(chatId, untilMessageId) {
|
|
1240
1251
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("readMessages");
|
|
@@ -1254,54 +1265,264 @@ export class MessageManager {
|
|
|
1254
1265
|
const bot = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputUser(botId);
|
|
1255
1266
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params?.chatId || botId);
|
|
1256
1267
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.startBot", bot, peer, random_id: getRandomId(), start_param });
|
|
1257
|
-
return (await
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
_MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(), _MessageManager_instances = new WeakSet(), _MessageManager_checkParams = function _MessageManager_checkParams(params) {
|
|
1261
|
-
if (params && "replyMarkup" in params && params.replyMarkup !== undefined) {
|
|
1262
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("replyMarkup");
|
|
1268
|
+
return (await this.updatesToMessages(botId, result))[0];
|
|
1263
1269
|
}
|
|
1264
|
-
|
|
1265
|
-
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1270
|
+
async transcribeVoice(chatId, messageId) {
|
|
1271
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("transcribeVoice");
|
|
1272
|
+
const message = await this.getMessage(chatId, messageId);
|
|
1273
|
+
if (message === null) {
|
|
1274
|
+
throw new InputError("Message not found.");
|
|
1275
|
+
}
|
|
1276
|
+
if (!isMessageType(message, "voice")) {
|
|
1277
|
+
throw new InputError("Message not voice.");
|
|
1278
|
+
}
|
|
1279
|
+
const cachedTranscription = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_getCachedVoiceTranscription).call(this, message);
|
|
1280
|
+
if (cachedTranscription) {
|
|
1281
|
+
return cachedTranscription;
|
|
1282
|
+
}
|
|
1283
|
+
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1284
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.transcribeAudio", peer, msg_id: messageId });
|
|
1285
|
+
return await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_cacheVoiceTranscription).call(this, message, constructVoiceTranscription(result));
|
|
1269
1286
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1287
|
+
async resolveMessageLink(link) {
|
|
1288
|
+
const parseResult = _a.parseMessageLink(link);
|
|
1289
|
+
if (parseResult === null) {
|
|
1290
|
+
throw new InputError("Invalid messsage link.");
|
|
1291
|
+
}
|
|
1292
|
+
const [chatId, messageId] = parseResult;
|
|
1293
|
+
return await this.getMessage(chatId, messageId);
|
|
1272
1294
|
}
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1295
|
+
static parseMessageLink(link) {
|
|
1296
|
+
let url;
|
|
1297
|
+
try {
|
|
1298
|
+
url = new URL(link);
|
|
1299
|
+
}
|
|
1300
|
+
catch (err) {
|
|
1301
|
+
if (err instanceof TypeError) {
|
|
1302
|
+
try {
|
|
1303
|
+
url = new URL("https://" + link);
|
|
1304
|
+
}
|
|
1305
|
+
catch (err) {
|
|
1306
|
+
if (err instanceof TypeError) {
|
|
1307
|
+
return null;
|
|
1308
|
+
}
|
|
1309
|
+
else {
|
|
1310
|
+
throw err;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
else {
|
|
1315
|
+
throw err;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
1319
|
+
return null;
|
|
1320
|
+
}
|
|
1321
|
+
if (url.host !== "t.me") {
|
|
1322
|
+
return null;
|
|
1323
|
+
}
|
|
1324
|
+
const parts = url.pathname.split("/").filter((v) => v);
|
|
1325
|
+
if (parts.length < 2) {
|
|
1326
|
+
return null;
|
|
1327
|
+
}
|
|
1328
|
+
if (!isNaN(Number(parts[0]))) {
|
|
1329
|
+
return null;
|
|
1330
|
+
}
|
|
1331
|
+
let peer, id;
|
|
1332
|
+
if (parts[0] === "c") {
|
|
1333
|
+
if (parts.length < 3 || parts.length > 4) {
|
|
1334
|
+
return null;
|
|
1335
|
+
}
|
|
1336
|
+
[peer, id] = [Number(parts[1]), Number(parts[parts.length - 1])];
|
|
1337
|
+
if (isNaN(peer)) {
|
|
1338
|
+
return null;
|
|
1339
|
+
}
|
|
1340
|
+
if (isNaN(Number(parts[2]))) {
|
|
1341
|
+
return null;
|
|
1279
1342
|
}
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1343
|
+
peer = Api.getChannelChatId(BigInt(peer));
|
|
1344
|
+
}
|
|
1345
|
+
else {
|
|
1346
|
+
if (parts.length > 3) {
|
|
1347
|
+
return null;
|
|
1348
|
+
}
|
|
1349
|
+
[peer, id] = [parts[0], Number(parts[parts.length - 1])];
|
|
1350
|
+
if (isNaN(Number(parts[1]))) {
|
|
1351
|
+
return null;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
if (isNaN(id)) {
|
|
1355
|
+
return null;
|
|
1356
|
+
}
|
|
1357
|
+
if (typeof peer === "string") {
|
|
1358
|
+
try {
|
|
1359
|
+
if (getUsername(peer) !== peer) {
|
|
1360
|
+
return null;
|
|
1284
1361
|
}
|
|
1285
|
-
messages.push(message);
|
|
1286
1362
|
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1363
|
+
catch (err) {
|
|
1364
|
+
if (err instanceof InputError) {
|
|
1365
|
+
return null;
|
|
1366
|
+
}
|
|
1367
|
+
else {
|
|
1368
|
+
throw err;
|
|
1369
|
+
}
|
|
1289
1370
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1371
|
+
}
|
|
1372
|
+
return [peer, id];
|
|
1373
|
+
}
|
|
1374
|
+
async getStickerSet(name) {
|
|
1375
|
+
if (name.includes("/")) {
|
|
1376
|
+
let valid = false;
|
|
1377
|
+
try {
|
|
1378
|
+
const url = new URL(name);
|
|
1379
|
+
const pathname = "/addstickers/";
|
|
1380
|
+
valid = (url.protocol === "http:" || url.protocol === "https:") && url.hostname === "t.me" && url.pathname.startsWith(pathname) && url.pathname.length > PackShortNameInvalid.length;
|
|
1381
|
+
if (valid) {
|
|
1382
|
+
name = url.pathname.slice(pathname.length);
|
|
1383
|
+
if (name.endsWith("/")) {
|
|
1384
|
+
name = name.slice(0, -1);
|
|
1385
|
+
if (name === "") {
|
|
1386
|
+
valid = false;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
catch (err) {
|
|
1392
|
+
if (err instanceof TypeError) {
|
|
1393
|
+
valid = false;
|
|
1394
|
+
}
|
|
1395
|
+
else {
|
|
1396
|
+
throw err;
|
|
1397
|
+
}
|
|
1292
1398
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1399
|
+
if (!valid) {
|
|
1400
|
+
throw new InputError("Invalid sticker set name or link.");
|
|
1295
1401
|
}
|
|
1296
1402
|
}
|
|
1403
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.getStickerSet", hash: 0, stickerset: { _: "inputStickerSetShortName", short_name: name } });
|
|
1404
|
+
return constructStickerSet(result);
|
|
1297
1405
|
}
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1406
|
+
async openMiniApp(botId, chatId, params) {
|
|
1407
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("openMiniApp");
|
|
1408
|
+
const from_bot_menu = params?.isFromMenu ? true : undefined;
|
|
1409
|
+
const silent = params?.isSilent ? true : undefined;
|
|
1410
|
+
const compact = params?.mode === "compact" ? true : undefined;
|
|
1411
|
+
const fullscreen = params?.mode === "fullscreen" ? true : undefined;
|
|
1412
|
+
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1413
|
+
const bot = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputUser(botId);
|
|
1414
|
+
const url = params?.url;
|
|
1415
|
+
const start_param = params?.startParameter;
|
|
1416
|
+
const theme_params = params?.themeParameters ? { _: "dataJSON", data: params.themeParameters } : undefined;
|
|
1417
|
+
const platform = __classPrivateFieldGet(this, _MessageManager_c, "f").langPack ?? "";
|
|
1418
|
+
const reply_to = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params);
|
|
1419
|
+
const send_as = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
1420
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1421
|
+
_: "messages.requestWebView",
|
|
1422
|
+
from_bot_menu,
|
|
1423
|
+
silent,
|
|
1424
|
+
compact,
|
|
1425
|
+
fullscreen,
|
|
1426
|
+
peer,
|
|
1427
|
+
bot,
|
|
1428
|
+
url,
|
|
1429
|
+
start_param,
|
|
1430
|
+
theme_params,
|
|
1431
|
+
platform,
|
|
1432
|
+
reply_to,
|
|
1433
|
+
send_as,
|
|
1434
|
+
});
|
|
1435
|
+
return constructMiniAppInfo(result);
|
|
1436
|
+
}
|
|
1437
|
+
async getSavedMessages(chatId, params) {
|
|
1438
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("getSavedMessages");
|
|
1439
|
+
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1440
|
+
const limit = getLimit(params?.limit);
|
|
1441
|
+
let offsetId = params?.offsetId ?? 0;
|
|
1442
|
+
if (offsetId < 0) {
|
|
1443
|
+
offsetId = 0;
|
|
1444
|
+
}
|
|
1445
|
+
let offsetDate = params?.offsetDate ?? 0;
|
|
1446
|
+
if (offsetDate < 0) {
|
|
1447
|
+
offsetDate = 0;
|
|
1448
|
+
}
|
|
1449
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1450
|
+
_: "messages.getSavedHistory",
|
|
1451
|
+
peer,
|
|
1452
|
+
limit,
|
|
1453
|
+
offset_id: offsetId,
|
|
1454
|
+
offset_date: offsetDate,
|
|
1455
|
+
add_offset: params?.addOffset ?? 0,
|
|
1456
|
+
hash: 0n,
|
|
1457
|
+
max_id: 0,
|
|
1458
|
+
min_id: 0,
|
|
1459
|
+
});
|
|
1460
|
+
if (!("messages" in result)) {
|
|
1461
|
+
unreachable();
|
|
1462
|
+
}
|
|
1463
|
+
const messages = new Array();
|
|
1464
|
+
for (const message_ of result.messages) {
|
|
1465
|
+
const message = await this.constructMessage(message_, false);
|
|
1301
1466
|
messages.push(message);
|
|
1302
1467
|
}
|
|
1468
|
+
return messages;
|
|
1469
|
+
}
|
|
1470
|
+
async getSavedChats(params) {
|
|
1471
|
+
const limit = getLimit(params?.limit);
|
|
1472
|
+
let offsetId = params?.offsetId ?? 0;
|
|
1473
|
+
if (offsetId < 0) {
|
|
1474
|
+
offsetId = 0;
|
|
1475
|
+
}
|
|
1476
|
+
let offsetDate = params?.offsetDate ?? 0;
|
|
1477
|
+
if (offsetDate < 0) {
|
|
1478
|
+
offsetDate = 0;
|
|
1479
|
+
}
|
|
1480
|
+
let offsetPeer = { _: "inputPeerEmpty" };
|
|
1481
|
+
if (params?.offsetChatId !== undefined) {
|
|
1482
|
+
offsetPeer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.offsetChatId);
|
|
1483
|
+
}
|
|
1484
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1485
|
+
_: "messages.getSavedDialogs",
|
|
1486
|
+
hash: 0n,
|
|
1487
|
+
limit,
|
|
1488
|
+
offset_date: offsetDate,
|
|
1489
|
+
offset_id: offsetId,
|
|
1490
|
+
offset_peer: offsetPeer,
|
|
1491
|
+
exclude_pinned: params?.excludePinned || undefined,
|
|
1492
|
+
});
|
|
1493
|
+
return constructSavedChats(result, __classPrivateFieldGet(this, _MessageManager_c, "f").getPeer, this.getMessage.bind(this), __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.getStickerSetName.bind(__classPrivateFieldGet(this, _MessageManager_c, "f").fileManager));
|
|
1494
|
+
}
|
|
1495
|
+
async getMessageReactions(chatId, messageId, params) {
|
|
1496
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("getMessageReactions");
|
|
1497
|
+
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1498
|
+
const id = messageId;
|
|
1499
|
+
const reactions = params?.reaction ? reactionToTlObject(params.reaction) : undefined;
|
|
1500
|
+
const offset = params?.offset;
|
|
1501
|
+
const limit = getLimit(params?.limit);
|
|
1502
|
+
const messageReactionsList = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1503
|
+
_: "messages.getMessageReactionsList",
|
|
1504
|
+
peer,
|
|
1505
|
+
id,
|
|
1506
|
+
reactions,
|
|
1507
|
+
offset,
|
|
1508
|
+
limit,
|
|
1509
|
+
});
|
|
1510
|
+
return constructMessageReactionList(messageReactionsList);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
_a = MessageManager, _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(), _MessageManager_instances = new WeakSet(), _MessageManager_checkParams = function _MessageManager_checkParams(params) {
|
|
1514
|
+
if (params && "replyMarkup" in params && params.replyMarkup !== undefined) {
|
|
1515
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("replyMarkup");
|
|
1516
|
+
}
|
|
1517
|
+
if (params && "businessConnectionId" in params && params.businessConnectionId !== undefined) {
|
|
1518
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("businessConnectionId");
|
|
1519
|
+
}
|
|
1520
|
+
if (params && "sendAs" in params && params.sendAs !== undefined) {
|
|
1521
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("sendAs");
|
|
1522
|
+
}
|
|
1523
|
+
if (params && "sendAt" in params && params.sendAt !== undefined) {
|
|
1524
|
+
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("businessConsendAtnectionId");
|
|
1303
1525
|
}
|
|
1304
|
-
return messages;
|
|
1305
1526
|
}, _MessageManager_constructReplyMarkup = async function _MessageManager_constructReplyMarkup(params) {
|
|
1306
1527
|
if (params?.replyMarkup) {
|
|
1307
1528
|
__classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("replyMarkup");
|
|
@@ -1317,29 +1538,31 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1317
1538
|
const topMsgId = params?.messageThreadId;
|
|
1318
1539
|
if (!params?.replyTo) {
|
|
1319
1540
|
if (topMsgId) {
|
|
1320
|
-
return { _: "inputReplyToMessage", reply_to_msg_id: topMsgId };
|
|
1541
|
+
return { _: "inputReplyToMessage", reply_to_msg_id: topMsgId, top_msg_id: topMsgId };
|
|
1321
1542
|
}
|
|
1322
1543
|
else {
|
|
1323
1544
|
return undefined;
|
|
1324
1545
|
}
|
|
1325
1546
|
}
|
|
1326
1547
|
if ("messageId" in params.replyTo) {
|
|
1327
|
-
return { _: "inputReplyToMessage", reply_to_msg_id: params.replyTo.messageId, top_msg_id: topMsgId, quote_text: params.replyTo.quote?.text, quote_entities: await Promise.all(params.replyTo.quote?.entities.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").
|
|
1548
|
+
return { _: "inputReplyToMessage", reply_to_msg_id: params.replyTo.messageId, top_msg_id: topMsgId, quote_text: params.replyTo.quote?.text, quote_entities: await Promise.all(params.replyTo.quote?.entities.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getPeer)) ?? []), quote_offset: params.replyTo.quote?.offset };
|
|
1328
1549
|
}
|
|
1329
1550
|
else {
|
|
1330
1551
|
return { _: "inputReplyToStory", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.replyTo.chatId), story_id: params.replyTo.storyId };
|
|
1331
1552
|
}
|
|
1332
|
-
},
|
|
1553
|
+
}, _MessageManager_isM4a = function _MessageManager_isM4a(firstPart) {
|
|
1554
|
+
return firstPart.length >= 10 && startsWith(firstPart.subarray(4), new Uint8Array([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34]));
|
|
1555
|
+
}, _MessageManager_sendDocumentInner = async function _MessageManager_sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = true, expectedMimeTypes, createName) {
|
|
1333
1556
|
let media = null;
|
|
1334
1557
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
1335
1558
|
const ttl_seconds = params && "selfDestruct" in params && typeof params.selfDestruct !== undefined ? selfDestructOptionToInt(params.selfDestruct) : undefined;
|
|
1336
1559
|
if (typeof document === "string") {
|
|
1337
1560
|
const fileId = this.resolveFileId(document, fileType);
|
|
1338
|
-
if (fileId
|
|
1339
|
-
media = { _: "inputMediaDocument", id: { ...fileId, _: "inputDocument" }, spoiler, query: otherAttribs.find((v) => is("documentAttributeSticker", v))?.alt || undefined, ttl_seconds };
|
|
1561
|
+
if (fileId !== null) {
|
|
1562
|
+
media = { _: "inputMediaDocument", id: { ...fileId, _: "inputDocument" }, spoiler, query: otherAttribs.find((v) => Api.is("documentAttributeSticker", v))?.alt || undefined, ttl_seconds };
|
|
1340
1563
|
}
|
|
1341
1564
|
}
|
|
1342
|
-
if (media
|
|
1565
|
+
if (media === null) {
|
|
1343
1566
|
if (typeof document === "string" && isHttpUrl(document)) {
|
|
1344
1567
|
if (!urlSupported) {
|
|
1345
1568
|
throw new InputError("URL not supported.");
|
|
@@ -1348,24 +1571,28 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1348
1571
|
}
|
|
1349
1572
|
else {
|
|
1350
1573
|
let mimeType;
|
|
1351
|
-
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(document, params, (name) => {
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
unreachable();
|
|
1574
|
+
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(document, params, (name, firstPart) => {
|
|
1575
|
+
if (!params?.fileName && firstPart && createName) {
|
|
1576
|
+
name = createName(firstPart);
|
|
1355
1577
|
}
|
|
1356
|
-
|
|
1578
|
+
mimeType = params?.mimeType ?? contentType(name.split(".").slice(-1)[0]);
|
|
1579
|
+
if (name.endsWith(".tgs") && fileType === FileType.Document) {
|
|
1357
1580
|
name += "-";
|
|
1358
1581
|
}
|
|
1359
1582
|
return name;
|
|
1360
1583
|
});
|
|
1361
|
-
|
|
1584
|
+
mimeType ??= FALLBACK_MIME_TYPE;
|
|
1585
|
+
if (mimeType && expectedMimeTypes && !expectedMimeTypes.includes(mimeType)) {
|
|
1586
|
+
unreachable();
|
|
1587
|
+
}
|
|
1588
|
+
if (Api.is("inputFileStoryDocument", file)) {
|
|
1362
1589
|
unreachable();
|
|
1363
1590
|
}
|
|
1364
1591
|
let thumb = undefined;
|
|
1365
1592
|
if (params?.thumbnail) {
|
|
1366
1593
|
thumb = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(params.thumbnail, { chunkSize: params?.chunkSize, signal: params?.signal });
|
|
1367
1594
|
}
|
|
1368
|
-
media = { _: "inputMediaUploadedDocument", file, thumb, spoiler, attributes: [{ _: "documentAttributeFilename", file_name: file.name }, ...otherAttribs], mime_type: mimeType, force_file: fileType
|
|
1595
|
+
media = { _: "inputMediaUploadedDocument", file, thumb, spoiler, attributes: [{ _: "documentAttributeFilename", file_name: file.name }, ...otherAttribs], mime_type: mimeType, force_file: fileType === FileType.Document ? true : undefined, ttl_seconds };
|
|
1369
1596
|
}
|
|
1370
1597
|
}
|
|
1371
1598
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendMedia).call(this, chatId, media, params);
|
|
@@ -1379,12 +1606,12 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1379
1606
|
}
|
|
1380
1607
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
1381
1608
|
const randomId = getRandomId();
|
|
1382
|
-
const silent = params?.
|
|
1383
|
-
const noforwards = params?.
|
|
1609
|
+
const silent = params?.isSilent ? true : undefined;
|
|
1610
|
+
const noforwards = params?.isContentProtected ? true : undefined;
|
|
1384
1611
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined;
|
|
1385
1612
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
1386
1613
|
const caption_ = params?.caption;
|
|
1387
|
-
const parseResult = caption_ !== undefined ?
|
|
1614
|
+
const parseResult = caption_ !== undefined ? this.parseText(caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
1388
1615
|
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
1389
1616
|
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
1390
1617
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
@@ -1400,20 +1627,46 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1400
1627
|
message: caption ?? "",
|
|
1401
1628
|
entities: captionEntities,
|
|
1402
1629
|
effect: params?.effectId ? BigInt(params.effectId) : undefined,
|
|
1403
|
-
schedule_date: params?.sendAt
|
|
1404
|
-
allow_paid_floodskip: params?.
|
|
1405
|
-
}, params?.businessConnectionId);
|
|
1406
|
-
return (await
|
|
1630
|
+
schedule_date: params?.sendAt,
|
|
1631
|
+
allow_paid_floodskip: params?.isPaidBroadcast ? true : undefined,
|
|
1632
|
+
}, { businessConnectionId: params?.businessConnectionId });
|
|
1633
|
+
return (await this.updatesToMessages(chatId, result, params?.businessConnectionId))[0];
|
|
1634
|
+
}, _MessageManager_editInlineMessageTextInner = async function _MessageManager_editInlineMessageTextInner(inlineMessageId, text, params, allowEmpty = true) {
|
|
1635
|
+
__classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_checkParams).call(this, params);
|
|
1636
|
+
const [message, entities] = this.parseText(text, params);
|
|
1637
|
+
if (!allowEmpty && !message) {
|
|
1638
|
+
throw new InputError("Message text cannot be empty.");
|
|
1639
|
+
}
|
|
1640
|
+
const id = await deserializeInlineMessageId(inlineMessageId);
|
|
1641
|
+
if (params?.linkPreview && params.linkPreview.type !== "input") {
|
|
1642
|
+
throw new InputError("Expected link preview of type input.");
|
|
1643
|
+
}
|
|
1644
|
+
const noWebpage = params?.linkPreview && params.linkPreview.type === "input" && params.linkPreview.isDisabled ? true : undefined;
|
|
1645
|
+
const invertMedia = params?.linkPreview?.isAboveText ? true : undefined;
|
|
1646
|
+
let media = undefined;
|
|
1647
|
+
if (!noWebpage && params?.linkPreview?.url) {
|
|
1648
|
+
media = { _: "inputMediaWebPage", url: params.linkPreview.url, force_large_media: params.linkPreview.mediaSize === "large" ? true : undefined, force_small_media: params.linkPreview.mediaSize === "small" ? true : undefined, optional: message.length ? undefined : true };
|
|
1649
|
+
}
|
|
1650
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1651
|
+
_: "messages.editInlineBotMessage",
|
|
1652
|
+
id,
|
|
1653
|
+
entities,
|
|
1654
|
+
message,
|
|
1655
|
+
media,
|
|
1656
|
+
no_webpage: noWebpage,
|
|
1657
|
+
invert_media: invertMedia,
|
|
1658
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
1659
|
+
}, { dc: getDc(id.dc_id) });
|
|
1407
1660
|
}, _MessageManager_resolveInputMediaInner = async function _MessageManager_resolveInputMediaInner(document, media, fileType, otherAttribs) {
|
|
1408
1661
|
let media_ = null;
|
|
1409
1662
|
const spoiler = "hasSpoiler" in media && media.hasSpoiler ? true : undefined;
|
|
1410
1663
|
if (typeof document === "string") {
|
|
1411
1664
|
const fileId = this.resolveFileId(document, fileType);
|
|
1412
|
-
if (fileId
|
|
1413
|
-
media_ = { _: "inputMediaDocument", id: { ...fileId, _: "inputDocument" }, spoiler, query: otherAttribs.find((v) => is("documentAttributeSticker", v))?.alt || undefined };
|
|
1665
|
+
if (fileId !== null) {
|
|
1666
|
+
media_ = { _: "inputMediaDocument", id: { ...fileId, _: "inputDocument" }, spoiler, query: otherAttribs.find((v) => Api.is("documentAttributeSticker", v))?.alt || undefined };
|
|
1414
1667
|
}
|
|
1415
1668
|
}
|
|
1416
|
-
if (media_
|
|
1669
|
+
if (media_ === null) {
|
|
1417
1670
|
if (typeof document === "string" && isHttpUrl(document)) {
|
|
1418
1671
|
media_ = { _: "inputMediaDocumentExternal", url: document, spoiler };
|
|
1419
1672
|
}
|
|
@@ -1421,19 +1674,19 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1421
1674
|
let mimeType;
|
|
1422
1675
|
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(document, media, (name) => {
|
|
1423
1676
|
mimeType = media?.mimeType ?? contentType(name.split(".").slice(-1)[0]) ?? FALLBACK_MIME_TYPE;
|
|
1424
|
-
if (name.endsWith(".tgs") && fileType
|
|
1677
|
+
if (name.endsWith(".tgs") && fileType === FileType.Document) {
|
|
1425
1678
|
name += "-";
|
|
1426
1679
|
}
|
|
1427
1680
|
return name;
|
|
1428
1681
|
});
|
|
1429
|
-
if (is("inputFileStoryDocument", file)) {
|
|
1682
|
+
if (Api.is("inputFileStoryDocument", file)) {
|
|
1430
1683
|
unreachable();
|
|
1431
1684
|
}
|
|
1432
1685
|
let thumb = undefined;
|
|
1433
1686
|
if ("thumbnail" in media && media.thumbnail) {
|
|
1434
1687
|
thumb = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(media.thumbnail, { chunkSize: media?.chunkSize, signal: media?.signal });
|
|
1435
1688
|
}
|
|
1436
|
-
media_ = { _: "inputMediaUploadedDocument", file, thumb, spoiler, attributes: [{ _: "documentAttributeFilename", file_name: file.name }, ...otherAttribs], mime_type: mimeType, force_file: fileType
|
|
1689
|
+
media_ = { _: "inputMediaUploadedDocument", file, thumb, spoiler, attributes: [{ _: "documentAttributeFilename", file_name: file.name }, ...otherAttribs], mime_type: mimeType, force_file: fileType === FileType.Document ? true : undefined };
|
|
1437
1690
|
}
|
|
1438
1691
|
}
|
|
1439
1692
|
return media_;
|
|
@@ -1458,11 +1711,11 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1458
1711
|
const ttl_seconds = "selfDestruct" in media && media.selfDestruct !== undefined ? selfDestructOptionToInt(media.selfDestruct) : undefined;
|
|
1459
1712
|
if (typeof media.photo === "string") {
|
|
1460
1713
|
const fileId = this.resolveFileId(media.photo, [FileType.Photo, FileType.ProfilePhoto]);
|
|
1461
|
-
if (fileId
|
|
1714
|
+
if (fileId !== null) {
|
|
1462
1715
|
media_ = { _: "inputMediaPhoto", id: { ...fileId, _: "inputPhoto" }, spoiler, ttl_seconds };
|
|
1463
1716
|
}
|
|
1464
1717
|
}
|
|
1465
|
-
if (media_
|
|
1718
|
+
if (media_ === null) {
|
|
1466
1719
|
if (typeof media.photo === "string" && isHttpUrl(media.photo)) {
|
|
1467
1720
|
media_ = { _: "inputMediaPhotoExternal", url: media.photo, spoiler };
|
|
1468
1721
|
}
|
|
@@ -1484,9 +1737,54 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1484
1737
|
else {
|
|
1485
1738
|
unreachable();
|
|
1486
1739
|
}
|
|
1740
|
+
}, _MessageManager_resolveInputMediaUpload = async function _MessageManager_resolveInputMediaUpload(media, businessConnectionId) {
|
|
1741
|
+
const inputMedia = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMedia).call(this, media);
|
|
1742
|
+
if (Api.is("inputMediaUploadedPhoto", inputMedia) || Api.is("inputMediaUploadedDocument", inputMedia)) {
|
|
1743
|
+
const messageMedia = await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({
|
|
1744
|
+
_: "messages.uploadMedia",
|
|
1745
|
+
peer: { _: "inputPeerSelf" },
|
|
1746
|
+
media: inputMedia,
|
|
1747
|
+
business_connection_id: businessConnectionId,
|
|
1748
|
+
});
|
|
1749
|
+
if (("photo" in messageMedia) && Api.is("photo", messageMedia.photo)) {
|
|
1750
|
+
return {
|
|
1751
|
+
_: "inputMediaPhoto",
|
|
1752
|
+
id: {
|
|
1753
|
+
_: "inputPhoto",
|
|
1754
|
+
id: messageMedia.photo.id,
|
|
1755
|
+
access_hash: messageMedia.photo.access_hash,
|
|
1756
|
+
file_reference: messageMedia.photo.file_reference,
|
|
1757
|
+
},
|
|
1758
|
+
spoiler: "hasSpoiler" in media && media.hasSpoiler ? true : undefined,
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
else if ("document" in messageMedia && Api.is("document", messageMedia.document)) {
|
|
1762
|
+
return {
|
|
1763
|
+
_: "inputMediaDocument",
|
|
1764
|
+
id: { _: "inputDocument", id: messageMedia.document.id, access_hash: messageMedia.document.access_hash, file_reference: messageMedia.document.file_reference },
|
|
1765
|
+
spoiler: "hasSpoiler" in media && media.hasSpoiler ? true : undefined,
|
|
1766
|
+
};
|
|
1767
|
+
}
|
|
1768
|
+
else {
|
|
1769
|
+
unreachable();
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
return inputMedia;
|
|
1487
1773
|
}, _MessageManager_sendReaction = async function _MessageManager_sendReaction(chatId, messageId, reactions, params) {
|
|
1488
|
-
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.sendReaction", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), msg_id: checkMessageId(messageId), reaction: reactions.map((v) => reactionToTlObject(v)), big: params?.
|
|
1489
|
-
},
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1774
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").invoke({ _: "messages.sendReaction", peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId), msg_id: checkMessageId(messageId), reaction: reactions.map((v) => reactionToTlObject(v)), big: params?.isBig ? true : undefined, add_to_recent: params?.addToRecents ? true : undefined });
|
|
1775
|
+
}, _MessageManager_getCachedVoiceTranscription = async function _MessageManager_getCachedVoiceTranscription(message) {
|
|
1776
|
+
const reference = await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.getVoiceTranscriptionReference(message.chat.id, message.id, fromUnixTimestamp(message.editDate ?? message.date));
|
|
1777
|
+
if (!reference) {
|
|
1778
|
+
return null;
|
|
1779
|
+
}
|
|
1780
|
+
const voiceTranscription = await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.getVoiceTranscription(reference);
|
|
1781
|
+
if (!voiceTranscription || !voiceTranscription.isCompleted) {
|
|
1782
|
+
return null;
|
|
1783
|
+
}
|
|
1784
|
+
return voiceTranscription;
|
|
1785
|
+
}, _MessageManager_cacheVoiceTranscription = async function _MessageManager_cacheVoiceTranscription(message, voiceTranscription) {
|
|
1786
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.setVoiceTranscriptionReference(message.chat.id, message.id, fromUnixTimestamp(message.editDate ?? message.date), BigInt(voiceTranscription.id));
|
|
1787
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").messageStorage.setVoiceTranscription(voiceTranscription);
|
|
1788
|
+
return voiceTranscription;
|
|
1492
1789
|
};
|
|
1790
|
+
_MessageManager_CAPTIONABLE_MESSAGE_TYPES = { value: ["photo", "document", "video", "animation", "voice", "audio", "video"] };
|