@mtkruto/node 0.0.997 → 0.0.999
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 +2 -2
- package/esm/0_deps.js +2 -2
- package/esm/3_types.d.ts +39 -3
- package/esm/3_types.js +39 -3
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_html.js +1 -1
- package/esm/client/3_types.d.ts +3 -6
- package/esm/client/3_types.js +1 -1
- package/esm/client/4_client.d.ts +20 -5
- package/esm/client/4_client.js +56 -40
- package/esm/connection/1_connection_web_socket.js +2 -1
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.js +14 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +14 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less.js +14 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +14 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
- package/{script/deps/deno.land/std@0.200.0 → esm/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +8 -1
- package/esm/tl/3_tl_reader.d.ts +1 -1
- package/esm/tl/3_tl_reader.js +6 -0
- package/esm/tl/4_tl_writer.js +8 -0
- package/esm/tl/6_message.js +3 -0
- package/esm/types/0_bot_command.d.ts +4 -0
- package/esm/types/0_chat_action.d.ts +1 -1
- package/esm/types/0_chat_id.d.ts +4 -0
- package/esm/types/0_chat_id.js +1 -0
- package/esm/types/0_chat_photo.js +1 -1
- package/esm/types/0_input_contact_message_content.d.ts +6 -0
- package/esm/types/0_input_contact_message_content.js +1 -0
- package/esm/types/0_input_location_message_content.d.ts +8 -0
- package/esm/types/0_input_location_message_content.js +1 -0
- package/esm/types/0_input_venue_message_content.d.ts +10 -0
- package/esm/types/0_input_venue_message_content.js +1 -0
- package/esm/types/0_labeled_price.d.ts +4 -0
- package/esm/types/0_labeled_price.js +1 -0
- package/esm/types/0_message_entity.d.ts +10 -10
- package/esm/types/0_message_entity.js +12 -12
- package/esm/types/0_parse_mode.d.ts +1 -0
- package/esm/types/0_parse_mode.js +1 -0
- package/esm/types/0_thumbnail.js +1 -1
- package/esm/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
- package/esm/types/1__getters.js +1 -0
- package/esm/types/1_bot_command_scope.d.ts +32 -0
- package/esm/types/1_bot_command_scope.js +27 -0
- package/esm/types/1_chat.d.ts +5 -10
- package/esm/types/1_chat.js +4 -11
- package/esm/types/1_inline_query_result_button.d.ts +6 -0
- package/esm/types/1_inline_query_result_button.js +1 -0
- package/esm/types/1_input_invoice_message_content.d.ts +23 -0
- package/esm/types/1_input_invoice_message_content.js +1 -0
- package/esm/types/1_input_text_message_content.d.ts +8 -0
- package/esm/types/1_input_text_message_content.js +1 -0
- package/esm/types/1_photo.js +1 -1
- package/esm/types/1_sticker.d.ts +2 -2
- package/esm/types/1_sticker.js +1 -1
- package/esm/types/2_game.js +1 -1
- package/esm/types/{1_inline_keyboard_button.d.ts → 2_inline_keyboard_button.d.ts} +2 -2
- package/esm/types/2_inline_query.d.ts +1 -1
- package/esm/types/2_input_message_content.d.ts +6 -0
- package/esm/types/2_input_message_content.js +1 -0
- package/{script/types/2_inline_keyboard_markup.d.ts → esm/types/3_inline_keyboard_markup.d.ts} +3 -2
- package/esm/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +1 -1
- package/esm/types/3_message.d.ts +2 -2
- package/esm/types/3_message.js +5 -5
- package/esm/types/4_callback_query.d.ts +1 -1
- package/esm/types/4_inline_query_result_article.d.ts +15 -0
- package/esm/types/4_inline_query_result_article.js +1 -0
- package/esm/types/4_inline_query_result_audio.d.ts +17 -0
- package/esm/types/4_inline_query_result_audio.js +1 -0
- package/esm/types/4_inline_query_result_cached_audio.d.ts +14 -0
- package/esm/types/4_inline_query_result_cached_audio.js +1 -0
- package/esm/types/4_inline_query_result_cached_document.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_document.js +1 -0
- package/esm/types/4_inline_query_result_cached_gif.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_gif.js +1 -0
- package/esm/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_mpeg4_gif.js +1 -0
- package/esm/types/4_inline_query_result_cached_photo.d.ts +16 -0
- package/esm/types/4_inline_query_result_cached_photo.js +1 -0
- package/esm/types/4_inline_query_result_cached_sticker.d.ts +9 -0
- package/esm/types/4_inline_query_result_cached_sticker.js +1 -0
- package/esm/types/4_inline_query_result_cached_video.d.ts +16 -0
- package/esm/types/4_inline_query_result_cached_video.js +1 -0
- package/esm/types/4_inline_query_result_cached_voice.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_voice.js +1 -0
- package/esm/types/4_inline_query_result_contact.d.ts +15 -0
- package/esm/types/4_inline_query_result_contact.js +1 -0
- package/esm/types/4_inline_query_result_document.d.ts +18 -0
- package/esm/types/4_inline_query_result_document.js +1 -0
- package/esm/types/4_inline_query_result_game.d.ts +7 -0
- package/esm/types/4_inline_query_result_game.js +1 -0
- package/esm/types/4_inline_query_result_gif.d.ts +20 -0
- package/esm/types/4_inline_query_result_gif.js +1 -0
- package/esm/types/4_inline_query_result_location.d.ts +18 -0
- package/esm/types/4_inline_query_result_location.js +1 -0
- package/esm/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
- package/esm/types/4_inline_query_result_mpeg4_gif.js +1 -0
- package/esm/types/4_inline_query_result_photo.d.ts +19 -0
- package/esm/types/4_inline_query_result_photo.js +1 -0
- package/esm/types/4_inline_query_result_venue.d.ts +19 -0
- package/esm/types/4_inline_query_result_venue.js +1 -0
- package/esm/types/4_inline_query_result_video.d.ts +21 -0
- package/esm/types/4_inline_query_result_video.js +1 -0
- package/esm/types/4_inline_query_result_voice.d.ts +16 -0
- package/esm/types/4_inline_query_result_voice.js +1 -0
- package/esm/types/4_reply_markup.d.ts +7 -0
- package/esm/types/4_reply_markup.js +22 -0
- package/esm/types/5_inline_query_result.d.ts +29 -0
- package/esm/types/5_inline_query_result.js +256 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +2 -2
- package/script/0_deps.js +2 -2
- package/script/3_types.d.ts +39 -3
- package/script/3_types.js +39 -3
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_html.js +1 -1
- package/script/client/3_types.d.ts +3 -6
- package/script/client/3_types.js +3 -0
- package/script/client/4_client.d.ts +20 -5
- package/script/client/4_client.js +55 -39
- package/script/connection/1_connection_web_socket.js +2 -1
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater.js +18 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +18 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
- package/script/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less.js +18 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +18 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
- package/{esm/deps/deno.land/std@0.200.0 → script/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +10 -3
- package/script/tl/3_tl_reader.d.ts +1 -1
- package/script/tl/3_tl_reader.js +6 -0
- package/script/tl/4_tl_writer.js +8 -0
- package/script/tl/6_message.js +3 -0
- package/script/types/0_bot_command.d.ts +4 -0
- package/script/types/0_chat_action.d.ts +1 -1
- package/script/types/0_chat_id.d.ts +4 -0
- package/script/types/0_chat_id.js +2 -0
- package/script/types/0_chat_photo.js +7 -7
- package/script/types/0_input_contact_message_content.d.ts +6 -0
- package/script/types/0_input_contact_message_content.js +2 -0
- package/script/types/0_input_location_message_content.d.ts +8 -0
- package/script/types/0_input_location_message_content.js +2 -0
- package/script/types/0_input_venue_message_content.d.ts +10 -0
- package/script/types/0_input_venue_message_content.js +2 -0
- package/script/types/0_labeled_price.d.ts +4 -0
- package/script/types/0_labeled_price.js +2 -0
- package/script/types/0_message_entity.d.ts +10 -10
- package/script/types/0_message_entity.js +12 -12
- package/script/types/0_parse_mode.d.ts +1 -0
- package/script/types/0_parse_mode.js +2 -0
- package/script/types/0_thumbnail.js +5 -5
- package/script/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
- package/script/types/1__getters.js +2 -0
- package/script/types/1_bot_command_scope.d.ts +32 -0
- package/script/types/1_bot_command_scope.js +31 -0
- package/script/types/1_chat.d.ts +5 -10
- package/script/types/1_chat.js +5 -12
- package/script/types/1_inline_query_result_button.d.ts +6 -0
- package/script/types/1_inline_query_result_button.js +2 -0
- package/script/types/1_input_invoice_message_content.d.ts +23 -0
- package/script/types/1_input_invoice_message_content.js +2 -0
- package/script/types/1_input_text_message_content.d.ts +8 -0
- package/script/types/1_input_text_message_content.js +2 -0
- package/script/types/1_photo.js +5 -5
- package/script/types/1_sticker.d.ts +2 -2
- package/script/types/1_sticker.js +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/{1_inline_keyboard_button.d.ts → 2_inline_keyboard_button.d.ts} +2 -2
- package/script/types/2_inline_query.d.ts +1 -1
- package/script/types/2_input_message_content.d.ts +6 -0
- package/script/types/2_input_message_content.js +2 -0
- package/{esm/types/2_inline_keyboard_markup.d.ts → script/types/3_inline_keyboard_markup.d.ts} +3 -2
- package/script/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +3 -3
- package/script/types/3_message.d.ts +2 -2
- package/script/types/3_message.js +14 -14
- package/script/types/4_callback_query.d.ts +1 -1
- package/script/types/4_inline_query_result_article.d.ts +15 -0
- package/script/types/4_inline_query_result_article.js +2 -0
- package/script/types/4_inline_query_result_audio.d.ts +17 -0
- package/script/types/4_inline_query_result_audio.js +2 -0
- package/script/types/4_inline_query_result_cached_audio.d.ts +14 -0
- package/script/types/4_inline_query_result_cached_audio.js +2 -0
- package/script/types/4_inline_query_result_cached_document.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_document.js +2 -0
- package/script/types/4_inline_query_result_cached_gif.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_gif.js +2 -0
- package/script/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_mpeg4_gif.js +2 -0
- package/script/types/4_inline_query_result_cached_photo.d.ts +16 -0
- package/script/types/4_inline_query_result_cached_photo.js +2 -0
- package/script/types/4_inline_query_result_cached_sticker.d.ts +9 -0
- package/script/types/4_inline_query_result_cached_sticker.js +2 -0
- package/script/types/4_inline_query_result_cached_video.d.ts +16 -0
- package/script/types/4_inline_query_result_cached_video.js +2 -0
- package/script/types/4_inline_query_result_cached_voice.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_voice.js +2 -0
- package/script/types/4_inline_query_result_contact.d.ts +15 -0
- package/script/types/4_inline_query_result_contact.js +2 -0
- package/script/types/4_inline_query_result_document.d.ts +18 -0
- package/script/types/4_inline_query_result_document.js +2 -0
- package/script/types/4_inline_query_result_game.d.ts +7 -0
- package/script/types/4_inline_query_result_game.js +2 -0
- package/script/types/4_inline_query_result_gif.d.ts +20 -0
- package/script/types/4_inline_query_result_gif.js +2 -0
- package/script/types/4_inline_query_result_location.d.ts +18 -0
- package/script/types/4_inline_query_result_location.js +2 -0
- package/script/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
- package/script/types/4_inline_query_result_mpeg4_gif.js +2 -0
- package/script/types/4_inline_query_result_photo.d.ts +19 -0
- package/script/types/4_inline_query_result_photo.js +2 -0
- package/script/types/4_inline_query_result_venue.d.ts +19 -0
- package/script/types/4_inline_query_result_venue.js +2 -0
- package/script/types/4_inline_query_result_video.d.ts +21 -0
- package/script/types/4_inline_query_result_video.js +2 -0
- package/script/types/4_inline_query_result_voice.d.ts +16 -0
- package/script/types/4_inline_query_result_voice.js +2 -0
- package/script/types/4_reply_markup.d.ts +7 -0
- package/script/types/4_reply_markup.js +26 -0
- package/script/types/5_inline_query_result.d.ts +29 -0
- package/script/types/5_inline_query_result.js +260 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
- /package/esm/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
- /package/esm/types/{!0_file_id.js → 0__file_id.js} +0 -0
- /package/esm/types/{!0_misc.js → 0_bot_command.js} +0 -0
- /package/esm/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
- /package/script/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
- /package/script/types/{!0_file_id.js → 0__file_id.js} +0 -0
- /package/script/types/{!0_misc.js → 0_bot_command.js} +0 -0
- /package/script/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
|
@@ -13,6 +13,7 @@ const _0_password_js_1 = require("./0_password.js");
|
|
|
13
13
|
const _0_html_js_1 = require("./0_html.js");
|
|
14
14
|
const _2_client_plain_js_1 = require("./2_client_plain.js");
|
|
15
15
|
const _1_client_abstract_js_1 = require("./1_client_abstract.js");
|
|
16
|
+
const _3_types_js_2 = require("./3_types.js");
|
|
16
17
|
const d = (0, _0_deps_js_1.debug)("Client");
|
|
17
18
|
const dGap = (0, _0_deps_js_1.debug)("Client/recoverUpdateGap");
|
|
18
19
|
const dGapC = (0, _0_deps_js_1.debug)("Client/recoverChannelUpdateGap");
|
|
@@ -30,7 +31,6 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
30
31
|
* @param storage The storage provider to use. Defaults to memory storage.
|
|
31
32
|
* @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
|
|
32
33
|
* @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
|
|
33
|
-
* @param params Other parameters.
|
|
34
34
|
*/
|
|
35
35
|
constructor(storage = new _3_storage_js_1.StorageMemory(), apiId = 0, apiHash = "", params) {
|
|
36
36
|
super(params);
|
|
@@ -215,15 +215,22 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
215
215
|
writable: true,
|
|
216
216
|
value: new _1_utilities_js_1.Queue("processUpdates")
|
|
217
217
|
});
|
|
218
|
-
Object.defineProperty(this, "
|
|
218
|
+
Object.defineProperty(this, "usernameResolver", {
|
|
219
219
|
enumerable: true,
|
|
220
220
|
configurable: true,
|
|
221
221
|
writable: true,
|
|
222
|
-
value: (
|
|
223
|
-
|
|
222
|
+
value: async (v) => {
|
|
223
|
+
const inputPeer = await this.getInputPeer(v).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.InputPeerUser));
|
|
224
|
+
return new _2_tl_js_1.types.InputUser({ userId: inputPeer.userId, accessHash: inputPeer.accessHash });
|
|
224
225
|
}
|
|
225
226
|
});
|
|
226
|
-
this
|
|
227
|
+
Object.defineProperty(this, "handle", {
|
|
228
|
+
enumerable: true,
|
|
229
|
+
configurable: true,
|
|
230
|
+
writable: true,
|
|
231
|
+
value: _3_types_js_2.skip
|
|
232
|
+
});
|
|
233
|
+
this.parseMode = params?.parseMode ?? null;
|
|
227
234
|
this.appVersion = params?.appVersion ?? _4_constants_js_1.APP_VERSION;
|
|
228
235
|
this.deviceModel = params?.deviceModel ?? _4_constants_js_1.DEVICE_MODEL;
|
|
229
236
|
this.langCode = params?.langCode ?? _4_constants_js_1.LANG_CODE;
|
|
@@ -1224,9 +1231,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1224
1231
|
const entities_ = params?.entities ?? [];
|
|
1225
1232
|
const parseMode = params?.parseMode ?? this.parseMode;
|
|
1226
1233
|
switch (parseMode) {
|
|
1227
|
-
case
|
|
1234
|
+
case null:
|
|
1228
1235
|
break;
|
|
1229
|
-
case "
|
|
1236
|
+
case "HTML": {
|
|
1230
1237
|
const [newText, entitiesToPush] = (0, _0_html_js_1.parseHtml)(text);
|
|
1231
1238
|
text = newText;
|
|
1232
1239
|
for (const entity of entitiesToPush) {
|
|
@@ -1509,29 +1516,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1509
1516
|
}));
|
|
1510
1517
|
}
|
|
1511
1518
|
async constructReplyMarkup(params) {
|
|
1512
|
-
let replyMarkup = undefined;
|
|
1513
1519
|
if (params?.replyMarkup) {
|
|
1514
1520
|
await this.assertBot("replyMarkup");
|
|
1515
|
-
|
|
1516
|
-
replyMarkup = await (0, _3_types_js_1.inlineKeyboardMarkupToTlObject)(params.replyMarkup, async (v) => {
|
|
1517
|
-
const inputPeer = await this.getInputPeer(v).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.InputPeerUser));
|
|
1518
|
-
return new _2_tl_js_1.types.InputUser({ userId: inputPeer.userId, accessHash: inputPeer.accessHash });
|
|
1519
|
-
});
|
|
1520
|
-
}
|
|
1521
|
-
else if ("keyboard" in params.replyMarkup) {
|
|
1522
|
-
replyMarkup = (0, _3_types_js_1.replyKeyboardMarkupToTlObject)(params.replyMarkup);
|
|
1523
|
-
}
|
|
1524
|
-
else if ("removeKeyboard" in params.replyMarkup) {
|
|
1525
|
-
replyMarkup = (0, _3_types_js_1.replyKeyboardRemoveToTlObject)(params.replyMarkup);
|
|
1526
|
-
}
|
|
1527
|
-
else if ("forceReply" in params.replyMarkup) {
|
|
1528
|
-
replyMarkup = (0, _3_types_js_1.forceReplyToTlObject)(params.replyMarkup);
|
|
1529
|
-
}
|
|
1530
|
-
else {
|
|
1531
|
-
throw new Error("The replyMarkup parameter has an unexpected type");
|
|
1532
|
-
}
|
|
1521
|
+
return (0, _3_types_js_1.replyMarkupToTlObject)(params.replyMarkup, this.usernameResolver.bind(this));
|
|
1533
1522
|
}
|
|
1534
|
-
return replyMarkup;
|
|
1535
1523
|
}
|
|
1536
1524
|
static assertMsgHas(message, key) {
|
|
1537
1525
|
if (!(key in message) || message[key] === undefined) {
|
|
@@ -1601,42 +1589,70 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1601
1589
|
async sendChatAction(chatId, action_, messageThreadId) {
|
|
1602
1590
|
let action;
|
|
1603
1591
|
switch (action_) {
|
|
1604
|
-
case "
|
|
1592
|
+
case "type":
|
|
1605
1593
|
action = new _2_tl_js_1.types.SendMessageTypingAction();
|
|
1606
1594
|
break;
|
|
1607
|
-
case "
|
|
1595
|
+
case "uploadPhoto":
|
|
1608
1596
|
action = new _2_tl_js_1.types.SendMessageUploadPhotoAction({ progress: 0 });
|
|
1609
1597
|
break;
|
|
1610
|
-
case "
|
|
1598
|
+
case "recordVideo":
|
|
1611
1599
|
action = new _2_tl_js_1.types.SendMessageRecordVideoAction();
|
|
1612
1600
|
break;
|
|
1613
|
-
case "
|
|
1601
|
+
case "uploadVideo":
|
|
1614
1602
|
action = new _2_tl_js_1.types.SendMessageRecordVideoAction();
|
|
1615
1603
|
break;
|
|
1616
|
-
case "
|
|
1604
|
+
case "recordVoice":
|
|
1617
1605
|
action = new _2_tl_js_1.types.SendMessageRecordAudioAction();
|
|
1618
1606
|
break;
|
|
1619
|
-
case "
|
|
1607
|
+
case "uploadAudio":
|
|
1620
1608
|
action = new _2_tl_js_1.types.SendMessageUploadAudioAction({ progress: 0 });
|
|
1621
1609
|
break;
|
|
1622
|
-
case "
|
|
1610
|
+
case "uploadDocument":
|
|
1623
1611
|
action = new _2_tl_js_1.types.SendMessageUploadDocumentAction({ progress: 0 });
|
|
1624
1612
|
break;
|
|
1625
|
-
case "
|
|
1613
|
+
case "chooseSticker":
|
|
1626
1614
|
action = new _2_tl_js_1.types.SendMessageChooseStickerAction();
|
|
1627
1615
|
break;
|
|
1628
|
-
case "
|
|
1616
|
+
case "findLocation":
|
|
1629
1617
|
action = new _2_tl_js_1.types.SendMessageGeoLocationAction();
|
|
1630
1618
|
break;
|
|
1631
|
-
case "
|
|
1619
|
+
case "recordVideoNote":
|
|
1632
1620
|
action = new _2_tl_js_1.types.SendMessageRecordRoundAction();
|
|
1633
1621
|
break;
|
|
1634
|
-
case "
|
|
1622
|
+
case "uploadVideoNote":
|
|
1635
1623
|
action = new _2_tl_js_1.types.SendMessageUploadRoundAction({ progress: 0 });
|
|
1636
1624
|
break;
|
|
1625
|
+
default:
|
|
1626
|
+
throw new Error("Invalid chat action: " + action_);
|
|
1637
1627
|
}
|
|
1638
1628
|
await this.invoke(new _2_tl_js_1.functions.MessagesSetTyping({ peer: await this.getInputPeer(chatId), action, topMsgId: messageThreadId }));
|
|
1639
1629
|
}
|
|
1630
|
+
async setMyCommands(commands, params) {
|
|
1631
|
+
await this.invoke(new _2_tl_js_1.functions.BotsSetBotCommands({
|
|
1632
|
+
commands: commands.map((v) => new _2_tl_js_1.types.BotCommand(v)),
|
|
1633
|
+
langCode: params?.languageCode ?? "",
|
|
1634
|
+
scope: await (0, _3_types_js_1.botCommandScopeToTlObject)(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)), // TODO: use params.scope
|
|
1635
|
+
}));
|
|
1636
|
+
}
|
|
1637
|
+
async getMyCommands(params) {
|
|
1638
|
+
const commands_ = await this.invoke(new _2_tl_js_1.functions.BotsGetBotCommands({
|
|
1639
|
+
langCode: params?.languageCode ?? "",
|
|
1640
|
+
scope: await (0, _3_types_js_1.botCommandScopeToTlObject)(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)), // TODO: use params.scope
|
|
1641
|
+
}));
|
|
1642
|
+
return commands_.map((v) => ({ command: v.command, description: v.description }));
|
|
1643
|
+
}
|
|
1644
|
+
async answerInlineQuery(id, results, params) {
|
|
1645
|
+
await this.invoke(new _2_tl_js_1.functions.MessagesSetInlineBotResults({
|
|
1646
|
+
queryId: BigInt(id),
|
|
1647
|
+
results: await Promise.all(results.map((v) => (0, _3_types_js_1.inlineQueryResultToTlObject)(v, this.parseText.bind(this), this.usernameResolver.bind(this)))),
|
|
1648
|
+
cacheTime: params?.cacheTime ?? 300,
|
|
1649
|
+
private: params?.isPersonal ? true : undefined,
|
|
1650
|
+
switchWebview: params?.button && params.button.webApp ? new _2_tl_js_1.types.InlineBotWebView({ text: params.button.text, url: params.button.webApp.url }) : undefined,
|
|
1651
|
+
switchPm: params?.button && params.button.startParameter ? new _2_tl_js_1.types.InlineBotSwitchPM({ text: params.button.text, startParam: params.button.startParameter }) : undefined,
|
|
1652
|
+
gallery: params?.isGallery ? true : undefined,
|
|
1653
|
+
nextOffset: params?.nextOffset,
|
|
1654
|
+
}));
|
|
1655
|
+
}
|
|
1640
1656
|
use(handler) {
|
|
1641
1657
|
const handle = this.handle;
|
|
1642
1658
|
this.handle = async (upd, next) => {
|
|
@@ -1660,7 +1676,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1660
1676
|
});
|
|
1661
1677
|
}
|
|
1662
1678
|
filter(predicate, handler) {
|
|
1663
|
-
this.branch(predicate, handler,
|
|
1679
|
+
this.branch(predicate, handler, _3_types_js_2.skip);
|
|
1664
1680
|
}
|
|
1665
1681
|
on(filter, handler) {
|
|
1666
1682
|
const type = typeof filter === "string" ? filter : filter[0];
|
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.ConnectionWebSocket = void 0;
|
|
27
27
|
const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
28
28
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
29
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
29
30
|
const _0_connection_js_1 = require("./0_connection.js");
|
|
30
31
|
const d = (0, _0_deps_js_1.debug)("ConnectionWebSocket");
|
|
31
32
|
class ConnectionWebSocket extends _0_connection_js_1.ConnectionUnframed {
|
|
@@ -101,7 +102,7 @@ class ConnectionWebSocket extends _0_connection_js_1.ConnectionUnframed {
|
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
103
104
|
const release = await mutex.acquire();
|
|
104
|
-
const data = new Uint8Array(await new Blob([e.data].map((v) => v instanceof Blob
|
|
105
|
+
const data = new Uint8Array(await new Blob([e.data].map((v) => v instanceof Blob || v instanceof Uint8Array ? v : v instanceof ArrayBuffer ? v : (0, _1_utilities_js_1.UNREACHABLE)())).arrayBuffer());
|
|
105
106
|
for (const byte of data) {
|
|
106
107
|
this.buffer.push(byte);
|
|
107
108
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertGreater = void 0;
|
|
4
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
const _format_js_1 = require("./_format.js");
|
|
6
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
+
/**
|
|
8
|
+
* Make an assertion that `actual` is greater than `expected`.
|
|
9
|
+
* If not then throw.
|
|
10
|
+
*/
|
|
11
|
+
function assertGreater(actual, expected, msg) {
|
|
12
|
+
if (actual > expected)
|
|
13
|
+
return;
|
|
14
|
+
const actualString = (0, _format_js_1.format)(actual);
|
|
15
|
+
const expectedString = (0, _format_js_1.format)(expected);
|
|
16
|
+
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} > ${expectedString}`);
|
|
17
|
+
}
|
|
18
|
+
exports.assertGreater = assertGreater;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertGreaterOrEqual = void 0;
|
|
4
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
const _format_js_1 = require("./_format.js");
|
|
6
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
+
/**
|
|
8
|
+
* Make an assertion that `actual` is greater than or equal to `expected`.
|
|
9
|
+
* If not then throw.
|
|
10
|
+
*/
|
|
11
|
+
function assertGreaterOrEqual(actual, expected, msg) {
|
|
12
|
+
if (actual >= expected)
|
|
13
|
+
return;
|
|
14
|
+
const actualString = (0, _format_js_1.format)(actual);
|
|
15
|
+
const expectedString = (0, _format_js_1.format)(expected);
|
|
16
|
+
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} >= ${expectedString}`);
|
|
17
|
+
}
|
|
18
|
+
exports.assertGreaterOrEqual = assertGreaterOrEqual;
|
|
@@ -25,11 +25,11 @@ function assertInstanceOf(actual, expectedType, msg = "") {
|
|
|
25
25
|
else {
|
|
26
26
|
actualTypeStr = typeof actual;
|
|
27
27
|
}
|
|
28
|
-
if (expectedTypeStr
|
|
28
|
+
if (expectedTypeStr === actualTypeStr) {
|
|
29
29
|
msg =
|
|
30
30
|
`Expected object to be an instance of "${expectedTypeStr}"${msgSuffix}`;
|
|
31
31
|
}
|
|
32
|
-
else if (actualTypeStr
|
|
32
|
+
else if (actualTypeStr === "function") {
|
|
33
33
|
msg =
|
|
34
34
|
`Expected object to be an instance of "${expectedTypeStr}" but was not an instanced object${msgSuffix}`;
|
|
35
35
|
}
|
|
@@ -23,7 +23,10 @@ ErrorClass, msgIncludes, msg) {
|
|
|
23
23
|
}
|
|
24
24
|
if (msgIncludes && (!(error instanceof Error) ||
|
|
25
25
|
!(0, colors_js_1.stripColor)(error.message).includes((0, colors_js_1.stripColor)(msgIncludes)))) {
|
|
26
|
-
msg = `Expected error message to include
|
|
26
|
+
msg = `Expected error message to include ${JSON.stringify(msgIncludes)}, but got ${error instanceof Error
|
|
27
|
+
? JSON.stringify(error.message)
|
|
28
|
+
: '"[not an Error]"' // TODO(kt3k): show more useful information
|
|
29
|
+
}${msgSuffix}`;
|
|
27
30
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
28
31
|
}
|
|
29
32
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertLess = void 0;
|
|
4
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
const _format_js_1 = require("./_format.js");
|
|
6
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
+
/**
|
|
8
|
+
* Make an assertion that `actual` is less than `expected`.
|
|
9
|
+
* If not then throw.
|
|
10
|
+
*/
|
|
11
|
+
function assertLess(actual, expected, msg) {
|
|
12
|
+
if (actual < expected)
|
|
13
|
+
return;
|
|
14
|
+
const actualString = (0, _format_js_1.format)(actual);
|
|
15
|
+
const expectedString = (0, _format_js_1.format)(expected);
|
|
16
|
+
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} < ${expectedString}`);
|
|
17
|
+
}
|
|
18
|
+
exports.assertLess = assertLess;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertLessOrEqual = void 0;
|
|
4
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
const _format_js_1 = require("./_format.js");
|
|
6
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
+
/**
|
|
8
|
+
* Make an assertion that `actual` is less than or equal to `expected`.
|
|
9
|
+
* If not then throw.
|
|
10
|
+
*/
|
|
11
|
+
function assertLessOrEqual(actual, expected, msg) {
|
|
12
|
+
if (actual <= expected)
|
|
13
|
+
return;
|
|
14
|
+
const actualString = (0, _format_js_1.format)(actual);
|
|
15
|
+
const expectedString = (0, _format_js_1.format)(expected);
|
|
16
|
+
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
|
|
17
|
+
}
|
|
18
|
+
exports.assertLessOrEqual = assertLessOrEqual;
|
|
@@ -12,8 +12,12 @@ export * from "./assert_array_includes.js";
|
|
|
12
12
|
export * from "./assert_equals.js";
|
|
13
13
|
export * from "./assert_exists.js";
|
|
14
14
|
export * from "./assert_false.js";
|
|
15
|
+
export * from "./assert_greater_or_equal.js";
|
|
16
|
+
export * from "./assert_greater.js";
|
|
15
17
|
export * from "./assert_instance_of.js";
|
|
16
18
|
export * from "./assert_is_error.js";
|
|
19
|
+
export * from "./assert_less_or_equal.js";
|
|
20
|
+
export * from "./assert_less.js";
|
|
17
21
|
export * from "./assert_match.js";
|
|
18
22
|
export * from "./assert_not_equals.js";
|
|
19
23
|
export * from "./assert_not_instance_of.js";
|
|
@@ -29,8 +29,12 @@ __exportStar(require("./assert_array_includes.js"), exports);
|
|
|
29
29
|
__exportStar(require("./assert_equals.js"), exports);
|
|
30
30
|
__exportStar(require("./assert_exists.js"), exports);
|
|
31
31
|
__exportStar(require("./assert_false.js"), exports);
|
|
32
|
+
__exportStar(require("./assert_greater_or_equal.js"), exports);
|
|
33
|
+
__exportStar(require("./assert_greater.js"), exports);
|
|
32
34
|
__exportStar(require("./assert_instance_of.js"), exports);
|
|
33
35
|
__exportStar(require("./assert_is_error.js"), exports);
|
|
36
|
+
__exportStar(require("./assert_less_or_equal.js"), exports);
|
|
37
|
+
__exportStar(require("./assert_less.js"), exports);
|
|
34
38
|
__exportStar(require("./assert_match.js"), exports);
|
|
35
39
|
__exportStar(require("./assert_not_equals.js"), exports);
|
|
36
40
|
__exportStar(require("./assert_not_instance_of.js"), exports);
|
package/{esm/deps/deno.land/std@0.200.0 → script/deps/deno.land/std@0.201.0}/fmt/colors.d.ts
RENAMED
|
@@ -262,9 +262,16 @@ export declare function rgb24(str: string, color: number | Rgb): string;
|
|
|
262
262
|
* @param color code
|
|
263
263
|
*/
|
|
264
264
|
export declare function bgRgb24(str: string, color: number | Rgb): string;
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated (will be removed in 1.0.0) Use `stripAnsiCode` instead.
|
|
267
|
+
*
|
|
268
|
+
* Remove ANSI escape codes from the string.
|
|
269
|
+
* @param string to remove ANSI escape codes from
|
|
270
|
+
*/
|
|
271
|
+
export declare const stripColor: typeof stripAnsiCode;
|
|
265
272
|
/**
|
|
266
273
|
* Remove ANSI escape codes from the string.
|
|
267
274
|
* @param string to remove ANSI escape codes from
|
|
268
275
|
*/
|
|
269
|
-
export declare function
|
|
276
|
+
export declare function stripAnsiCode(string: string): string;
|
|
270
277
|
export {};
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.stripColor = exports.bgRgb24 = exports.rgb24 = exports.bgRgb8 = exports.rgb8 = exports.bgBrightWhite = exports.bgBrightCyan = exports.bgBrightMagenta = exports.bgBrightBlue = exports.bgBrightYellow = exports.bgBrightGreen = exports.bgBrightRed = exports.bgBrightBlack = exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.bgYellow = exports.bgGreen = exports.bgRed = exports.bgBlack = exports.brightWhite = exports.brightCyan = exports.brightMagenta = exports.brightBlue = exports.brightYellow = exports.brightGreen = exports.brightRed = exports.brightBlack = exports.gray = exports.white = exports.cyan = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = exports.black = exports.strikethrough = exports.hidden = exports.inverse = exports.underline = exports.italic = exports.dim = exports.bold = exports.reset = exports.getColorEnabled = exports.setColorEnabled = void 0;
|
|
30
|
+
exports.stripAnsiCode = exports.stripColor = exports.bgRgb24 = exports.rgb24 = exports.bgRgb8 = exports.rgb8 = exports.bgBrightWhite = exports.bgBrightCyan = exports.bgBrightMagenta = exports.bgBrightBlue = exports.bgBrightYellow = exports.bgBrightGreen = exports.bgBrightRed = exports.bgBrightBlack = exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.bgYellow = exports.bgGreen = exports.bgRed = exports.bgBlack = exports.brightWhite = exports.brightCyan = exports.brightMagenta = exports.brightBlue = exports.brightYellow = exports.brightGreen = exports.brightRed = exports.brightBlack = exports.gray = exports.white = exports.cyan = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = exports.black = exports.strikethrough = exports.hidden = exports.inverse = exports.underline = exports.italic = exports.dim = exports.bold = exports.reset = exports.getColorEnabled = exports.setColorEnabled = void 0;
|
|
31
31
|
/**
|
|
32
32
|
* String formatters and utilities for dealing with ANSI color codes.
|
|
33
33
|
*
|
|
@@ -538,11 +538,18 @@ const ANSI_PATTERN = new RegExp([
|
|
|
538
538
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
539
539
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))",
|
|
540
540
|
].join("|"), "g");
|
|
541
|
+
/**
|
|
542
|
+
* @deprecated (will be removed in 1.0.0) Use `stripAnsiCode` instead.
|
|
543
|
+
*
|
|
544
|
+
* Remove ANSI escape codes from the string.
|
|
545
|
+
* @param string to remove ANSI escape codes from
|
|
546
|
+
*/
|
|
547
|
+
exports.stripColor = stripAnsiCode;
|
|
541
548
|
/**
|
|
542
549
|
* Remove ANSI escape codes from the string.
|
|
543
550
|
* @param string to remove ANSI escape codes from
|
|
544
551
|
*/
|
|
545
|
-
function
|
|
552
|
+
function stripAnsiCode(string) {
|
|
546
553
|
return string.replace(ANSI_PATTERN, "");
|
|
547
554
|
}
|
|
548
|
-
exports.
|
|
555
|
+
exports.stripAnsiCode = stripAnsiCode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLRawReader } from "./0_tl_raw_reader.js";
|
|
2
2
|
import { TLObject } from "./1_tl_object.js";
|
|
3
|
-
export type ReadObject = TLObject | Array<ReadObject | TLObject>;
|
|
3
|
+
export type ReadObject = boolean | TLObject | Array<ReadObject | TLObject>;
|
|
4
4
|
export declare class TLReader extends TLRawReader {
|
|
5
5
|
readObject(id?: number): ReadObject;
|
|
6
6
|
}
|
package/script/tl/3_tl_reader.js
CHANGED
|
@@ -18,6 +18,12 @@ class TLReader extends _0_tl_raw_reader_js_1.TLRawReader {
|
|
|
18
18
|
}
|
|
19
19
|
return items;
|
|
20
20
|
}
|
|
21
|
+
else if (id == 0x997275b5) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
else if (id == 0xbc799737) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
21
27
|
const constructor = _2_types_js_1.map.get(id);
|
|
22
28
|
if (constructor) {
|
|
23
29
|
return (0, _3_deserialize_js_1.deserialize)(this, constructor[_1_tl_object_js_1.paramDesc], constructor);
|
package/script/tl/4_tl_writer.js
CHANGED
|
@@ -13,6 +13,14 @@ class TLWriter extends _0_tl_raw_writer_js_1.TLRawWriter {
|
|
|
13
13
|
this.writeObject(item);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
else if (typeof object === "boolean") {
|
|
17
|
+
if (object) {
|
|
18
|
+
this.writeInt32(0x997275b5, false);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.writeInt32(0xbc799737, false);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
16
24
|
else {
|
|
17
25
|
this.write(object[_1_tl_object_js_1.serialize]());
|
|
18
26
|
}
|
package/script/tl/6_message.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ChatAction = "
|
|
1
|
+
export type ChatAction = "type" | "uploadPhoto" | "recordVideo" | "uploadVideo" | "recordVoice" | "uploadAudio" | "uploadDocument" | "chooseSticker" | "findLocation" | "recordVideoNote" | "uploadVideoNote";
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constructChatPhoto = void 0;
|
|
4
4
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
-
const
|
|
5
|
+
const _0__file_id_js_1 = require("./0__file_id.js");
|
|
6
6
|
function constructChatPhoto(photo, chatId, chatAccessHash) {
|
|
7
|
-
const smallFileId = new
|
|
7
|
+
const smallFileId = new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.ChatPhoto, photo.dcId, {
|
|
8
8
|
mediaId: photo.photoId,
|
|
9
|
-
thumbnailSource:
|
|
9
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.ChatPhotoSmall,
|
|
10
10
|
chatId,
|
|
11
11
|
chatAccessHash,
|
|
12
12
|
accessHash: 0n,
|
|
13
13
|
volumeId: 0n,
|
|
14
14
|
localId: 0,
|
|
15
15
|
}).encode();
|
|
16
|
-
const smallFileUniqueId = new
|
|
17
|
-
const bigFileId = new
|
|
16
|
+
const smallFileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
|
|
17
|
+
const bigFileId = new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.ChatPhoto, photo.dcId, {
|
|
18
18
|
mediaId: photo.photoId,
|
|
19
|
-
thumbnailSource:
|
|
19
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.ChatPhotoBig,
|
|
20
20
|
chatId,
|
|
21
21
|
chatAccessHash,
|
|
22
22
|
accessHash: 0n,
|
|
23
23
|
volumeId: 0n,
|
|
24
24
|
localId: 0,
|
|
25
25
|
}).encode();
|
|
26
|
-
const bigFileUniqueId = new
|
|
26
|
+
const bigFileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
|
|
27
27
|
if (photo instanceof _2_tl_js_1.types.ChatPhoto) {
|
|
28
28
|
return {
|
|
29
29
|
smallFileId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
export type MessageEntityType = "mention" | "hashtag" | "
|
|
2
|
+
export type MessageEntityType = "mention" | "hashtag" | "botCommand" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "textLink" | "textMention" | "cashtag" | "phoneNumber" | "underline" | "strikethrough" | "blockquote" | "bankCard" | "spoiler" | "customEmoji";
|
|
3
3
|
export declare namespace MessageEntity {
|
|
4
4
|
interface Base {
|
|
5
5
|
type: MessageEntityType;
|
|
@@ -15,7 +15,7 @@ export declare namespace MessageEntity {
|
|
|
15
15
|
type: "hashtag";
|
|
16
16
|
}
|
|
17
17
|
interface BotCommand extends Base {
|
|
18
|
-
type: "
|
|
18
|
+
type: "botCommand";
|
|
19
19
|
}
|
|
20
20
|
interface URL extends Base {
|
|
21
21
|
type: "url";
|
|
@@ -38,20 +38,20 @@ export declare namespace MessageEntity {
|
|
|
38
38
|
type: "code";
|
|
39
39
|
}
|
|
40
40
|
interface TextLink extends Base {
|
|
41
|
-
type: "
|
|
42
|
-
/** For "
|
|
41
|
+
type: "textLink";
|
|
42
|
+
/** For "textLink" only, URL that will be opened after user taps on the text */
|
|
43
43
|
url: string;
|
|
44
44
|
}
|
|
45
45
|
interface TextMention extends Base {
|
|
46
|
-
type: "
|
|
47
|
-
/** For "
|
|
46
|
+
type: "textMention";
|
|
47
|
+
/** For "textMention" only, the ID of the mentioned user */
|
|
48
48
|
userId: number;
|
|
49
49
|
}
|
|
50
50
|
interface Cashtag extends Base {
|
|
51
51
|
type: "cashtag";
|
|
52
52
|
}
|
|
53
53
|
interface PhoneNumber extends Base {
|
|
54
|
-
type: "
|
|
54
|
+
type: "phoneNumber";
|
|
55
55
|
}
|
|
56
56
|
interface Underline extends Base {
|
|
57
57
|
type: "underline";
|
|
@@ -63,14 +63,14 @@ export declare namespace MessageEntity {
|
|
|
63
63
|
type: "blockquote";
|
|
64
64
|
}
|
|
65
65
|
interface BankCard extends Base {
|
|
66
|
-
type: "
|
|
66
|
+
type: "bankCard";
|
|
67
67
|
}
|
|
68
68
|
interface Spoiler extends Base {
|
|
69
69
|
type: "spoiler";
|
|
70
70
|
}
|
|
71
71
|
interface CustomEmoji extends Base {
|
|
72
|
-
type: "
|
|
73
|
-
/** For "
|
|
72
|
+
type: "customEmoji";
|
|
73
|
+
/** For "customEmoji" only, unique identifier of the custom emoji */
|
|
74
74
|
customEmojiId: string;
|
|
75
75
|
}
|
|
76
76
|
}
|