@mtkruto/node 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/0_deps.d.ts +1 -1
- package/esm/0_deps.js +1 -1
- package/esm/4_constants.js +3 -3
- package/esm/client/0_params.d.ts +6 -2
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.js +2 -2
- package/esm/client/0_utilities.d.ts +4 -4
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +1 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +6 -0
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +3 -3
- package/{script/deps/jsr.io/@std/io/0.224.9 → esm/deps/jsr.io/@std/io/0.225.0}/_constants.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
- package/esm/transport/2_transport_provider.js +4 -4
- package/esm/utilities/0_units.js +3 -3
- package/esm/utilities/2_queue.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +1 -1
- package/script/0_deps.js +3 -3
- package/script/4_constants.js +3 -3
- package/script/4_errors.js +2 -2
- package/script/client/0_filters.js +1 -2
- package/script/client/0_html.js +1 -2
- package/script/client/0_markdown.js +2 -2
- package/script/client/0_message.js +5 -6
- package/script/client/0_params.d.ts +6 -2
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.js +8 -8
- package/script/client/0_utilities.d.ts +4 -4
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +16 -16
- package/script/client/1_composer.js +4 -4
- package/script/client/2_update_manager.js +1 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +6 -0
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +2 -2
- package/script/deps/deno.land/std@0.224.0/io/write_all.js +2 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +2 -2
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.js +2 -2
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/Node.js +9 -9
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/mod.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.js +3 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.js +5 -6
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.js +6 -7
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.js +6 -7
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.js +5 -6
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.js +8 -9
- package/script/deps/deno.land/x/tgcrypto@0.4.1/mod.js +10 -11
- package/script/deps/jsr.io/@std/assert/1.0.6/almost_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/array_includes.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/assert.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/equal.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/exists.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/fail.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/false.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/greater.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/is_error.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/less.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/rejects.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/string_includes.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/throws.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/unimplemented.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/unreachable.js +1 -2
- package/script/deps/jsr.io/@std/bytes/1.0.2/concat.js +1 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +1 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.js +2 -3
- package/script/deps/jsr.io/@std/internal/1.0.4/build_message.js +3 -4
- package/script/deps/jsr.io/@std/internal/1.0.4/diff.js +5 -6
- package/script/deps/jsr.io/@std/internal/1.0.4/diff_str.js +4 -5
- package/script/deps/jsr.io/@std/internal/1.0.4/format.js +1 -2
- package/script/deps/jsr.io/@std/internal/1.0.4/styles.js +10 -11
- package/{esm/deps/jsr.io/@std/io/0.224.9 → script/deps/jsr.io/@std/io/0.225.0}/_constants.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +2 -3
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/media-types/1.0.3/_util.js +8 -9
- package/script/deps/jsr.io/@std/media-types/1.0.3/all_extensions.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/content_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/extension.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/format_media_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/get_charset.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/parse_media_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/type_by_extension.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/assert_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/basename.js +3 -4
- package/script/deps/jsr.io/@std/path/1.0.6/_common/common.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/format.js +2 -3
- package/script/deps/jsr.io/@std/path/1.0.6/_common/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/glob_to_reg_exp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize_string.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/strip_trailing_separators.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/common.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/is_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/_util.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/to_namespaced_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/to_namespaced_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/_util.js +3 -4
- package/script/deps/jsr.io/@std/path/1.0.6/windows/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/to_namespaced_path.js +1 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/utils/uint8.js +1 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.js +2 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/adler32.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/crc32.js +2 -3
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/deflate.js +6 -6
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inffast.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inflate.js +10 -10
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inftrees.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/trees.js +5 -6
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +1 -2
- package/script/storage/1_utilities.js +7 -7
- package/script/tl/1_utilities.js +9 -10
- package/script/tl/2_deserialize.js +1 -2
- package/script/tl/2_serialize.js +1 -2
- package/script/tl/3_utilities.js +6 -7
- package/script/tl/4_rpc_result.js +2 -2
- package/script/tl/5_message.js +6 -6
- package/script/transport/0_obfuscation.js +1 -2
- package/script/transport/2_transport_provider.js +7 -8
- package/script/transport/3_transport_provider_tcp.js +1 -2
- package/script/types/0_birthday.js +1 -2
- package/script/types/0_callback_query_answer.js +1 -2
- package/script/types/0_callback_query_question.js +1 -2
- package/script/types/0_chat_administrator_rights.js +2 -3
- package/script/types/0_chat_member_rights.js +2 -3
- package/script/types/0_chat_photo.js +1 -2
- package/script/types/0_contact.js +1 -2
- package/script/types/0_dice.js +1 -2
- package/script/types/0_failed_invitation.js +1 -2
- package/script/types/0_giveaway_parameters.js +1 -2
- package/script/types/0_invoice.js +1 -2
- package/script/types/0_link_preview.js +1 -2
- package/script/types/0_live_stream_channel.js +1 -2
- package/script/types/0_location.js +1 -2
- package/script/types/0_mask_position.js +1 -2
- package/script/types/0_message_entity.js +3 -4
- package/script/types/0_message_search_filter.js +1 -2
- package/script/types/0_mini_app_info.js +1 -2
- package/script/types/0_opening_hours.js +1 -2
- package/script/types/0_reaction.js +3 -4
- package/script/types/0_refunded_payment.js +1 -2
- package/script/types/0_restriction_reason.js +1 -2
- package/script/types/0_self_destruct_option.js +1 -2
- package/script/types/0_shipping_address.js +1 -2
- package/script/types/0_thumbnail.js +1 -2
- package/script/types/0_video_chat.js +1 -2
- package/script/types/0_voice.js +1 -2
- package/script/types/1_animation.js +1 -2
- package/script/types/1_audio.js +1 -2
- package/script/types/1_bot_command_scope.js +1 -2
- package/script/types/1_chat_p.js +1 -2
- package/script/types/1_document.js +1 -2
- package/script/types/1_giveaway.js +1 -2
- package/script/types/1_keyboard_button.js +2 -3
- package/script/types/1_message_reaction.js +1 -2
- package/script/types/1_order_info.js +1 -2
- package/script/types/1_photo.js +2 -3
- package/script/types/1_poll_option.js +1 -2
- package/script/types/1_reaction_count.js +1 -2
- package/script/types/1_reply_quote.js +1 -2
- package/script/types/1_sticker.js +1 -2
- package/script/types/1_story_privacy.js +2 -3
- package/script/types/1_story_reaction.js +1 -2
- package/script/types/1_user.js +1 -2
- package/script/types/1_venue.js +1 -2
- package/script/types/1_video.js +1 -2
- package/script/types/1_video_note.js +1 -2
- package/script/types/2_business_connection.js +1 -2
- package/script/types/2_chat.js +1 -2
- package/script/types/2_chat_member.js +1 -2
- package/script/types/2_chosen_inline_result.js +1 -2
- package/script/types/2_forward_header.js +1 -2
- package/script/types/2_game.js +1 -2
- package/script/types/2_inactive_chat.js +1 -2
- package/script/types/2_inline_keyboard_button.js +2 -3
- package/script/types/2_inline_query.js +1 -2
- package/script/types/2_invite_link.js +1 -2
- package/script/types/2_message_reaction_count.js +1 -2
- package/script/types/2_message_reactions.js +1 -2
- package/script/types/2_poll.js +1 -2
- package/script/types/2_pre_checkout_query.js +1 -2
- package/script/types/2_story_content.js +1 -2
- package/script/types/2_story_interactions.js +1 -2
- package/script/types/2_story_interactive_area.js +2 -3
- package/script/types/2_successful_payment.js +1 -2
- package/script/types/3_chat_member_updated.js +1 -2
- package/script/types/3_join_request.js +1 -2
- package/script/types/3_reply_markup.js +2 -3
- package/script/types/3_story.js +1 -2
- package/script/types/4_inline_query_result.js +2 -3
- package/script/types/4_message.js +2 -3
- package/script/types/5_callback_query.js +2 -3
- package/script/types/5_chat_list_item.js +5 -6
- package/script/types/5_inline_query_answer.js +1 -2
- package/script/types/_file_id.js +5 -5
- package/script/utilities/0_bigint.js +6 -7
- package/script/utilities/0_buffer.js +1 -2
- package/script/utilities/0_color.js +2 -3
- package/script/utilities/0_env.js +2 -3
- package/script/utilities/0_hash.js +2 -3
- package/script/utilities/0_object.js +1 -2
- package/script/utilities/0_rle.js +2 -3
- package/script/utilities/0_units.js +3 -3
- package/script/utilities/1_auth.js +1 -2
- package/script/utilities/1_base64.js +2 -3
- package/script/utilities/1_logger.js +5 -5
- package/script/utilities/1_math.js +1 -2
- package/script/utilities/1_misc.js +8 -8
- package/script/utilities/2_queue.d.ts.map +1 -1
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transportProviderTcp =
|
|
3
|
+
exports.transportProviderTcp = transportProviderTcp;
|
|
4
4
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
5
5
|
const _1_connection_tcp_node_js_1 = require("../connection/1_connection_tcp.node.js");
|
|
6
6
|
const _1_transport_abridged_js_1 = require("./1_transport_abridged.js");
|
|
@@ -16,4 +16,3 @@ function transportProviderTcp(params) {
|
|
|
16
16
|
return { connection, transport, dcId: (0, _2_transport_provider_js_1.getDcId)(dc, cdn) };
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
exports.transportProviderTcp = transportProviderTcp;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructBirthday =
|
|
22
|
+
exports.constructBirthday = constructBirthday;
|
|
23
23
|
function constructBirthday(birthday) {
|
|
24
24
|
return {
|
|
25
25
|
day: birthday.day,
|
|
@@ -27,4 +27,3 @@ function constructBirthday(birthday) {
|
|
|
27
27
|
year: birthday.year,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.constructBirthday = constructBirthday;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructCallbackQueryAnswer =
|
|
22
|
+
exports.constructCallbackQueryAnswer = constructCallbackQueryAnswer;
|
|
23
23
|
function constructCallbackQueryAnswer(answer) {
|
|
24
24
|
return {
|
|
25
25
|
alert: !!answer.alert,
|
|
@@ -27,4 +27,3 @@ function constructCallbackQueryAnswer(answer) {
|
|
|
27
27
|
url: answer.url ?? "",
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.constructCallbackQueryAnswer = constructCallbackQueryAnswer;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.validateCallbackQueryQuestion =
|
|
22
|
+
exports.validateCallbackQueryQuestion = validateCallbackQueryQuestion;
|
|
23
23
|
const _0_errors_js_1 = require("../0_errors.js");
|
|
24
24
|
function validateCallbackQueryQuestion(q) {
|
|
25
25
|
if (!["game", "password", "button"].includes(q.type)) {
|
|
@@ -32,4 +32,3 @@ function validateCallbackQueryQuestion(q) {
|
|
|
32
32
|
throw new _0_errors_js_1.InputError("Got empty button data.");
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
exports.validateCallbackQueryQuestion = validateCallbackQueryQuestion;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructChatAdministratorRights = constructChatAdministratorRights;
|
|
23
|
+
exports.chatAdministratorRightsToTlObject = chatAdministratorRightsToTlObject;
|
|
23
24
|
function constructChatAdministratorRights(rights_) {
|
|
24
25
|
const rights = {
|
|
25
26
|
isAnonymous: rights_.anonymous || false,
|
|
@@ -45,8 +46,6 @@ function constructChatAdministratorRights(rights_) {
|
|
|
45
46
|
}
|
|
46
47
|
return rights;
|
|
47
48
|
}
|
|
48
|
-
exports.constructChatAdministratorRights = constructChatAdministratorRights;
|
|
49
49
|
function chatAdministratorRightsToTlObject(rights) {
|
|
50
50
|
return { _: "chatAdminRights", anonymous: rights.isAnonymous || undefined, other: rights.canManageChat || undefined, delete_messages: rights.canDeleteMessages || undefined, manage_call: rights.canManageChat || undefined, ban_users: rights.canRestrictMembers || undefined, add_admins: rights.canPromoteMembers || undefined, change_info: rights.canChangeInfo || undefined, invite_users: rights.canInviteUsers || undefined };
|
|
51
51
|
}
|
|
52
|
-
exports.chatAdministratorRightsToTlObject = chatAdministratorRightsToTlObject;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructChatMemberRights = constructChatMemberRights;
|
|
23
|
+
exports.chatMemberRightsToTlObject = chatMemberRightsToTlObject;
|
|
23
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
25
|
function constructChatMemberRights(rights) {
|
|
25
26
|
return {
|
|
@@ -42,7 +43,6 @@ function constructChatMemberRights(rights) {
|
|
|
42
43
|
canManageTopics: rights.manage_topics ? true : undefined,
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
exports.constructChatMemberRights = constructChatMemberRights;
|
|
46
46
|
function chatMemberRightsToTlObject(rights, untilDate) {
|
|
47
47
|
return {
|
|
48
48
|
_: "chatBannedRights",
|
|
@@ -66,4 +66,3 @@ function chatMemberRightsToTlObject(rights, untilDate) {
|
|
|
66
66
|
manage_topics: rights?.canManageTopics ? true : undefined,
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
exports.chatMemberRightsToTlObject = chatMemberRightsToTlObject;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructChatPhoto =
|
|
22
|
+
exports.constructChatPhoto = constructChatPhoto;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
const _file_id_js_1 = require("./_file_id.js");
|
|
@@ -59,4 +59,3 @@ function constructChatPhoto(photo, chatId, chatAccessHash) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
exports.constructChatPhoto = constructChatPhoto;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructContact =
|
|
22
|
+
exports.constructContact = constructContact;
|
|
23
23
|
function constructContact(contact) {
|
|
24
24
|
return {
|
|
25
25
|
phoneNumber: contact.phone_number,
|
|
@@ -29,4 +29,3 @@ function constructContact(contact) {
|
|
|
29
29
|
vcard: contact.vcard || undefined,
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
exports.constructContact = constructContact;
|
package/script/types/0_dice.js
CHANGED
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructDice =
|
|
22
|
+
exports.constructDice = constructDice;
|
|
23
23
|
function constructDice(dice_) {
|
|
24
24
|
return { emoji: dice_.emoticon, value: dice_.value };
|
|
25
25
|
}
|
|
26
|
-
exports.constructDice = constructDice;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructFailedInvitation =
|
|
22
|
+
exports.constructFailedInvitation = constructFailedInvitation;
|
|
23
23
|
function constructFailedInvitation(missingInvitee) {
|
|
24
24
|
return {
|
|
25
25
|
userId: Number(missingInvitee.user_id),
|
|
@@ -27,4 +27,3 @@ function constructFailedInvitation(missingInvitee) {
|
|
|
27
27
|
premiumRequiredToSendMessage: !!missingInvitee.premium_required_for_pm,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.constructFailedInvitation = constructFailedInvitation;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructGiveawayParameters =
|
|
22
|
+
exports.constructGiveawayParameters = constructGiveawayParameters;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
function constructGiveawayParameters(g) {
|
|
@@ -30,4 +30,3 @@ function constructGiveawayParameters(g) {
|
|
|
30
30
|
const winnerSelectionDate = (0, _1_utilities_js_1.fromUnixTimestamp)(g.until_date);
|
|
31
31
|
return { boostedChatId, additionalChatIds, winnerSelectionDate, onlyNewMembers, countries };
|
|
32
32
|
}
|
|
33
|
-
exports.constructGiveawayParameters = constructGiveawayParameters;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructInvoice =
|
|
22
|
+
exports.constructInvoice = constructInvoice;
|
|
23
23
|
function constructInvoice(invoice) {
|
|
24
24
|
return {
|
|
25
25
|
title: invoice.title,
|
|
@@ -29,4 +29,3 @@ function constructInvoice(invoice) {
|
|
|
29
29
|
totalAmount: Number(invoice.total_amount),
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
exports.constructInvoice = constructInvoice;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructLinkPreview =
|
|
22
|
+
exports.constructLinkPreview = constructLinkPreview;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
function constructLinkPreview(media, invert) {
|
|
25
25
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
@@ -29,4 +29,3 @@ function constructLinkPreview(media, invert) {
|
|
|
29
29
|
putAboveText: !!invert,
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
exports.constructLinkPreview = constructLinkPreview;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructLiveStreamChannel =
|
|
22
|
+
exports.constructLiveStreamChannel = constructLiveStreamChannel;
|
|
23
23
|
function constructLiveStreamChannel(channel) {
|
|
24
24
|
return {
|
|
25
25
|
id: channel.channel,
|
|
@@ -27,4 +27,3 @@ function constructLiveStreamChannel(channel) {
|
|
|
27
27
|
timestamp: Number(channel.last_timestamp_ms),
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.constructLiveStreamChannel = constructLiveStreamChannel;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructLocation =
|
|
22
|
+
exports.constructLocation = constructLocation;
|
|
23
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
24
|
function constructLocation(geo_) {
|
|
25
25
|
if ((0, _2_tl_js_1.is)("messageMediaGeo", geo_)) {
|
|
@@ -50,4 +50,3 @@ function constructLocation(geo_) {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
exports.constructLocation = constructLocation;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructMaskPosition =
|
|
22
|
+
exports.constructMaskPosition = constructMaskPosition;
|
|
23
23
|
function constructMaskPosition({ n, x, y, zoom }) {
|
|
24
24
|
return {
|
|
25
25
|
point: n == 0 ? "forehead" : n == 1 ? "eyes" : n == 2 ? "mouth" : "chin",
|
|
@@ -28,4 +28,3 @@ function constructMaskPosition({ n, x, y, zoom }) {
|
|
|
28
28
|
scale: zoom,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
exports.constructMaskPosition = constructMaskPosition;
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructMessageEntity = constructMessageEntity;
|
|
23
|
+
exports.messageEntityToTlObject = messageEntityToTlObject;
|
|
24
|
+
exports.sortMessageEntities = sortMessageEntities;
|
|
23
25
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
26
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
27
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -85,7 +87,6 @@ function constructMessageEntity(obj) {
|
|
|
85
87
|
return null;
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
|
-
exports.constructMessageEntity = constructMessageEntity;
|
|
89
90
|
async function messageEntityToTlObject(entity, getEntity) {
|
|
90
91
|
const { offset, length } = entity;
|
|
91
92
|
switch (entity.type) {
|
|
@@ -151,7 +152,6 @@ async function messageEntityToTlObject(entity, getEntity) {
|
|
|
151
152
|
return { _: "messageEntityCustomEmoji", offset, length, document_id: BigInt(entity.customEmojiId) };
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
|
-
exports.messageEntityToTlObject = messageEntityToTlObject;
|
|
155
155
|
const priorities = {
|
|
156
156
|
"mention": 50,
|
|
157
157
|
"hashtag": 50,
|
|
@@ -186,4 +186,3 @@ function sortMessageEntities(entities) {
|
|
|
186
186
|
return priority < otherPriority ? -1 : 1;
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
exports.sortMessageEntities = sortMessageEntities;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.messageSearchFilterToTlObject =
|
|
22
|
+
exports.messageSearchFilterToTlObject = messageSearchFilterToTlObject;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
function messageSearchFilterToTlObject(filter) {
|
|
25
25
|
switch (filter) {
|
|
@@ -55,4 +55,3 @@ function messageSearchFilterToTlObject(filter) {
|
|
|
55
55
|
(0, _0_deps_js_1.unreachable)();
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
exports.messageSearchFilterToTlObject = messageSearchFilterToTlObject;
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructMiniAppInfo =
|
|
22
|
+
exports.constructMiniAppInfo = constructMiniAppInfo;
|
|
23
23
|
function constructMiniAppInfo(url) {
|
|
24
24
|
return { url };
|
|
25
25
|
}
|
|
26
|
-
exports.constructMiniAppInfo = constructMiniAppInfo;
|
|
@@ -19,11 +19,10 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructOpeningHours =
|
|
22
|
+
exports.constructOpeningHours = constructOpeningHours;
|
|
23
23
|
function constructOpeningHours(hours) {
|
|
24
24
|
return {
|
|
25
25
|
timezone: hours.timezone_id,
|
|
26
26
|
intervals: hours.weekly_open.map((v) => [v.start_minute, v.end_minute]),
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
exports.constructOpeningHours = constructOpeningHours;
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructReaction = constructReaction;
|
|
23
|
+
exports.reactionToTlObject = reactionToTlObject;
|
|
24
|
+
exports.reactionEqual = reactionEqual;
|
|
23
25
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
26
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
27
|
function constructReaction(reaction) {
|
|
@@ -36,11 +38,9 @@ function constructReaction(reaction) {
|
|
|
36
38
|
(0, _0_deps_js_1.unreachable)();
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
|
-
exports.constructReaction = constructReaction;
|
|
40
41
|
function reactionToTlObject(reaction) {
|
|
41
42
|
return reaction.type == "emoji" ? ({ _: "reactionEmoji", emoticon: reaction.emoji }) : reaction.type == "custom" ? ({ _: "reactionCustomEmoji", document_id: BigInt(reaction.id) }) : { _: "reactionPaid" };
|
|
42
43
|
}
|
|
43
|
-
exports.reactionToTlObject = reactionToTlObject;
|
|
44
44
|
function reactionEqual(left, right) {
|
|
45
45
|
if (left.type == "emoji") {
|
|
46
46
|
if (right.type == "emoji" && left.emoji == right.emoji) {
|
|
@@ -54,4 +54,3 @@ function reactionEqual(left, right) {
|
|
|
54
54
|
}
|
|
55
55
|
return false;
|
|
56
56
|
}
|
|
57
|
-
exports.reactionEqual = reactionEqual;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructRefundedPayment =
|
|
22
|
+
exports.constructRefundedPayment = constructRefundedPayment;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
function constructRefundedPayment(action) {
|
|
25
25
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
@@ -30,4 +30,3 @@ function constructRefundedPayment(action) {
|
|
|
30
30
|
providerPaymentChargeId: action.charge.provider_charge_id,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
exports.constructRefundedPayment = constructRefundedPayment;
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructRestrictionReason =
|
|
22
|
+
exports.constructRestrictionReason = constructRestrictionReason;
|
|
23
23
|
function constructRestrictionReason(rr) {
|
|
24
24
|
return { platform: rr.platform, reason: rr.reason, text: rr.text };
|
|
25
25
|
}
|
|
26
|
-
exports.constructRestrictionReason = constructRestrictionReason;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.selfDestructOptionToInt =
|
|
22
|
+
exports.selfDestructOptionToInt = selfDestructOptionToInt;
|
|
23
23
|
const _0_errors_js_1 = require("../0_errors.js");
|
|
24
24
|
function selfDestructOptionToInt(option) {
|
|
25
25
|
if (option == "afterOpen") {
|
|
@@ -40,4 +40,3 @@ function selfDestructOptionToInt(option) {
|
|
|
40
40
|
throw new _0_errors_js_1.InputError("Invalid self destruct option.");
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
exports.selfDestructOptionToInt = selfDestructOptionToInt;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructShippingAddress =
|
|
22
|
+
exports.constructShippingAddress = constructShippingAddress;
|
|
23
23
|
function constructShippingAddress(shippingAddress) {
|
|
24
24
|
return {
|
|
25
25
|
countryCode: shippingAddress.country_iso2,
|
|
@@ -30,4 +30,3 @@ function constructShippingAddress(shippingAddress) {
|
|
|
30
30
|
postCode: shippingAddress.post_code,
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
exports.constructShippingAddress = constructShippingAddress;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructThumbnail =
|
|
22
|
+
exports.constructThumbnail = constructThumbnail;
|
|
23
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
24
|
const _file_id_js_1 = require("./_file_id.js");
|
|
25
25
|
function constructThumbnail(size, file) {
|
|
@@ -39,4 +39,3 @@ function constructThumbnail(size, file) {
|
|
|
39
39
|
fileSize: size.size,
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
exports.constructThumbnail = constructThumbnail;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructVideoChat =
|
|
22
|
+
exports.constructVideoChat = constructVideoChat;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
function constructVideoChat(call) {
|
|
@@ -57,4 +57,3 @@ function constructVideoChat(call) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
exports.constructVideoChat = constructVideoChat;
|
package/script/types/0_voice.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructVoice =
|
|
22
|
+
exports.constructVoice = constructVoice;
|
|
23
23
|
function constructVoice(document, audioAttributes, fileId, fileUniqueId) {
|
|
24
24
|
return {
|
|
25
25
|
fileId,
|
|
@@ -29,4 +29,3 @@ function constructVoice(document, audioAttributes, fileId, fileUniqueId) {
|
|
|
29
29
|
fileSize: Number(document.size),
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
exports.constructVoice = constructVoice;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructAnimation =
|
|
22
|
+
exports.constructAnimation = constructAnimation;
|
|
23
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
24
|
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
25
25
|
function constructAnimation(document, videoAttribute, fileAttribute, fileId, fileUniqueId) {
|
|
@@ -35,4 +35,3 @@ function constructAnimation(document, videoAttribute, fileAttribute, fileId, fil
|
|
|
35
35
|
fileSize: Number(document.size),
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
exports.constructAnimation = constructAnimation;
|
package/script/types/1_audio.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructAudio =
|
|
22
|
+
exports.constructAudio = constructAudio;
|
|
23
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
24
|
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
25
25
|
function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
@@ -34,4 +34,3 @@ function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
|
34
34
|
thumbnails: document.thumbs ? document.thumbs.map((v) => (0, _2_tl_js_1.is)("photoSize", v) ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
exports.constructAudio = constructAudio;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.botCommandScopeToTlObject =
|
|
22
|
+
exports.botCommandScopeToTlObject = botCommandScopeToTlObject;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
async function botCommandScopeToTlObject(scope, getInputPeer) {
|
|
@@ -47,4 +47,3 @@ async function botCommandScopeToTlObject(scope, getInputPeer) {
|
|
|
47
47
|
(0, _0_deps_js_1.unreachable)();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
exports.botCommandScopeToTlObject = botCommandScopeToTlObject;
|
package/script/types/1_chat_p.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructChatP =
|
|
22
|
+
exports.constructChatP = constructChatP;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -109,4 +109,3 @@ function constructChatP(chat) {
|
|
|
109
109
|
(0, _0_deps_js_1.unreachable)();
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
exports.constructChatP = constructChatP;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructDocument =
|
|
22
|
+
exports.constructDocument = constructDocument;
|
|
23
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
24
|
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
25
25
|
function constructDocument(document, fileNameAttribute, fileId, fileUniqueId) {
|
|
@@ -32,4 +32,3 @@ function constructDocument(document, fileNameAttribute, fileId, fileUniqueId) {
|
|
|
32
32
|
fileSize: Number(document.size),
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
exports.constructDocument = constructDocument;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructGiveaway =
|
|
22
|
+
exports.constructGiveaway = constructGiveaway;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _0_giveaway_parameters_js_1 = require("./0_giveaway_parameters.js");
|
|
25
25
|
function constructGiveaway(g) {
|
|
@@ -29,4 +29,3 @@ function constructGiveaway(g) {
|
|
|
29
29
|
const parameters = (0, _0_giveaway_parameters_js_1.constructGiveawayParameters)(g);
|
|
30
30
|
return (0, _1_utilities_js_1.cleanObject)({ parameters, winnerCount, premiumMonthCount, starCount: starCount ? Number(starCount) : undefined });
|
|
31
31
|
}
|
|
32
|
-
exports.constructGiveaway = constructGiveaway;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructKeyboardButton = constructKeyboardButton;
|
|
23
|
+
exports.keyboardButtonToTlObject = keyboardButtonToTlObject;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
26
|
const _0_chat_administrator_rights_js_1 = require("./0_chat_administrator_rights.js");
|
|
@@ -100,7 +101,6 @@ function constructKeyboardButton(button_) {
|
|
|
100
101
|
(0, _0_deps_js_1.unreachable)();
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
exports.constructKeyboardButton = constructKeyboardButton;
|
|
104
104
|
function keyboardButtonToTlObject(button) {
|
|
105
105
|
if ("requestUser" in button) {
|
|
106
106
|
return { _: "keyboardButtonRequestPeer", text: button.text, button_id: button.requestUser.requestId, peer_type: ({ _: "requestPeerTypeUser", bot: button.requestUser.userIsBot, premium: button.requestUser.userIsPremium }), max_quantity: 1 };
|
|
@@ -129,4 +129,3 @@ function keyboardButtonToTlObject(button) {
|
|
|
129
129
|
return { _: "keyboardButton", text: button.text };
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
exports.keyboardButtonToTlObject = keyboardButtonToTlObject;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructMessageReaction =
|
|
22
|
+
exports.constructMessageReaction = constructMessageReaction;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
const _0_reaction_js_1 = require("./0_reaction.js");
|
|
@@ -42,4 +42,3 @@ function constructMessageReaction(reaction_, recentReactions) {
|
|
|
42
42
|
const chosen = reaction_.chosen_order !== undefined ? true : false;
|
|
43
43
|
return { reaction, count, choosers, chosen };
|
|
44
44
|
}
|
|
45
|
-
exports.constructMessageReaction = constructMessageReaction;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructOrderInfo =
|
|
22
|
+
exports.constructOrderInfo = constructOrderInfo;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _0_shipping_address_js_1 = require("./0_shipping_address.js");
|
|
25
25
|
function constructOrderInfo(info) {
|
|
@@ -30,4 +30,3 @@ function constructOrderInfo(info) {
|
|
|
30
30
|
shippingAddress: info.shipping_address ? (0, _0_shipping_address_js_1.constructShippingAddress)(info.shipping_address) : undefined,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
exports.constructOrderInfo = constructOrderInfo;
|
package/script/types/1_photo.js
CHANGED
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructPhoto = constructPhoto;
|
|
23
|
+
exports.getPhotoSizes = getPhotoSizes;
|
|
23
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
25
|
const _file_id_js_1 = require("./_file_id.js");
|
|
25
26
|
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
@@ -33,7 +34,6 @@ function constructPhoto(photo) {
|
|
|
33
34
|
thumbnails: sizes.slice(0, -1).map((v) => (0, _0_thumbnail_js_1.constructThumbnail)(v, photo)),
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
|
-
exports.constructPhoto = constructPhoto;
|
|
37
37
|
function getPhotoSizes(photo) {
|
|
38
38
|
const sizes = photo.sizes
|
|
39
39
|
.map((v) => {
|
|
@@ -49,4 +49,3 @@ function getPhotoSizes(photo) {
|
|
|
49
49
|
const largest = sizes.slice(-1)[0];
|
|
50
50
|
return { sizes, largest };
|
|
51
51
|
}
|
|
52
|
-
exports.getPhotoSizes = getPhotoSizes;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructPollOption =
|
|
22
|
+
exports.constructPollOption = constructPollOption;
|
|
23
23
|
const _0_message_entity_js_1 = require("./0_message_entity.js");
|
|
24
24
|
function constructPollOption(option, results) {
|
|
25
25
|
return {
|
|
@@ -28,4 +28,3 @@ function constructPollOption(option, results) {
|
|
|
28
28
|
voterCount: results.find((v) => v.option.every((v, i) => option.option[i] == v))?.voters ?? 0,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
exports.constructPollOption = constructPollOption;
|
|
@@ -19,11 +19,10 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructReactionCount =
|
|
22
|
+
exports.constructReactionCount = constructReactionCount;
|
|
23
23
|
const _0_reaction_js_1 = require("./0_reaction.js");
|
|
24
24
|
function constructReactionCount(reaction_) {
|
|
25
25
|
const reaction = (0, _0_reaction_js_1.constructReaction)(reaction_.reaction);
|
|
26
26
|
const count = reaction_.count;
|
|
27
27
|
return { reaction, count };
|
|
28
28
|
}
|
|
29
|
-
exports.constructReactionCount = constructReactionCount;
|