@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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
|
+
import { FileID } from "./0__file_id.js";
|
|
3
|
+
import { UNREACHABLE } from "../1_utilities.js";
|
|
4
|
+
import { replyMarkupToTlObject } from "./4_reply_markup.js";
|
|
5
|
+
// deno-lint-ignore no-explicit-any
|
|
6
|
+
export async function inlineQueryResultToTlObject(result_, parseText, usernameResolver) {
|
|
7
|
+
let document = null;
|
|
8
|
+
let thumb = null;
|
|
9
|
+
let fileId_ = null;
|
|
10
|
+
switch (result_.type) {
|
|
11
|
+
case "audio":
|
|
12
|
+
if ("audioUrl" in result_) {
|
|
13
|
+
document = new types.InputWebDocument({
|
|
14
|
+
url: result_.audioUrl,
|
|
15
|
+
size: 0,
|
|
16
|
+
mimeType: "audio/mpeg",
|
|
17
|
+
attributes: [
|
|
18
|
+
new types.DocumentAttributeAudio({
|
|
19
|
+
duration: result_.audioDuration ?? 0,
|
|
20
|
+
title: result_.title,
|
|
21
|
+
performer: result_.performer,
|
|
22
|
+
}),
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
fileId_ = result_.audioFileId;
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
case "video":
|
|
31
|
+
if ("videoUrl" in result_) {
|
|
32
|
+
document = new types.InputWebDocument({
|
|
33
|
+
url: result_.videoUrl,
|
|
34
|
+
size: 0,
|
|
35
|
+
mimeType: result_.mimeType ?? "video/mp4",
|
|
36
|
+
attributes: [
|
|
37
|
+
new types.DocumentAttributeVideo({
|
|
38
|
+
duration: result_.videoDuration ?? 0,
|
|
39
|
+
h: result_.videoHeight ?? 0,
|
|
40
|
+
w: result_.videoWidth ?? 0,
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
fileId_ = result_.videoFileId;
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
case "document":
|
|
50
|
+
if ("documentUrl" in result_) {
|
|
51
|
+
document = new types.InputWebDocument({
|
|
52
|
+
url: result_.documentUrl,
|
|
53
|
+
mimeType: "application/octet-stream",
|
|
54
|
+
attributes: [],
|
|
55
|
+
size: 0,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
fileId_ = result_.documentFileId;
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
case "gif":
|
|
63
|
+
if ("gifUrl" in result_) {
|
|
64
|
+
document = new types.InputWebDocument({
|
|
65
|
+
url: result_.gifUrl,
|
|
66
|
+
size: 0,
|
|
67
|
+
mimeType: "image/gif",
|
|
68
|
+
attributes: [
|
|
69
|
+
new types.DocumentAttributeVideo({
|
|
70
|
+
duration: result_.gifDuration ?? 0,
|
|
71
|
+
h: result_.gifHeight ?? 0,
|
|
72
|
+
w: result_.gifWidth ?? 0,
|
|
73
|
+
}),
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
fileId_ = result_.gifFileId;
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case "mpeg4_gif":
|
|
82
|
+
if ("mpeg4Url" in result_) {
|
|
83
|
+
document = new types.InputWebDocument({
|
|
84
|
+
url: result_.mpeg4Url,
|
|
85
|
+
size: 0,
|
|
86
|
+
mimeType: "video/mp4",
|
|
87
|
+
attributes: [
|
|
88
|
+
new types.DocumentAttributeVideo({
|
|
89
|
+
nosound: true,
|
|
90
|
+
duration: result_.mpeg4Duration ?? 0,
|
|
91
|
+
w: result_.mpeg4Width ?? 0,
|
|
92
|
+
h: result_.mpeg4Height ?? 0,
|
|
93
|
+
supportsStreaming: true,
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
fileId_ = result_.mpeg4FileId;
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
case "photo":
|
|
103
|
+
if ("photoUrl" in result_) {
|
|
104
|
+
document = new types.InputWebDocument({
|
|
105
|
+
url: result_.photoUrl,
|
|
106
|
+
size: 0,
|
|
107
|
+
mimeType: "image/jpeg",
|
|
108
|
+
attributes: [new types.DocumentAttributeImageSize({ w: result_.photoWidth ?? 0, h: result_.photoHeight ?? 0 })],
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
fileId_ = result_.photoFileId;
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
case "sticker":
|
|
116
|
+
fileId_ = result_.stickerFileId;
|
|
117
|
+
break;
|
|
118
|
+
case "voice":
|
|
119
|
+
if ("voiceUrl" in result_) {
|
|
120
|
+
document = new types.InputWebDocument({
|
|
121
|
+
url: result_.voiceUrl,
|
|
122
|
+
size: 0,
|
|
123
|
+
mimeType: "audio/mpeg",
|
|
124
|
+
attributes: [
|
|
125
|
+
new types.DocumentAttributeAudio({
|
|
126
|
+
duration: result_.voiceDuration ?? 0,
|
|
127
|
+
voice: true,
|
|
128
|
+
}),
|
|
129
|
+
],
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
fileId_ = result_.voiceFileId;
|
|
134
|
+
}
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
const replyMarkup = "replyMarkup" in result_ && result_.replyMarkup ? await replyMarkupToTlObject(result_.replyMarkup, usernameResolver) : undefined;
|
|
138
|
+
if ("thumbnailUrl" in result_ && result_.thumbnailUrl) {
|
|
139
|
+
thumb = new types.InputWebDocument({
|
|
140
|
+
url: result_.thumbnailUrl,
|
|
141
|
+
size: 0,
|
|
142
|
+
mimeType: "image/jpeg",
|
|
143
|
+
attributes: [],
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
else if (result_.type == "photo") {
|
|
147
|
+
thumb = document;
|
|
148
|
+
}
|
|
149
|
+
let ret = ["", []];
|
|
150
|
+
if ("caption" in result_ && result_.caption) {
|
|
151
|
+
ret = parseText(result_.caption, { parseMode: result_.parseMode, entities: result_.captionEntities });
|
|
152
|
+
}
|
|
153
|
+
const { type, id } = result_;
|
|
154
|
+
const [message, entities] = ret;
|
|
155
|
+
const sendMessage = new types.InputBotInlineMessageMediaAuto({
|
|
156
|
+
message,
|
|
157
|
+
entities,
|
|
158
|
+
replyMarkup,
|
|
159
|
+
});
|
|
160
|
+
const title = "title" in result_ ? result_.title : undefined;
|
|
161
|
+
if (document != null) {
|
|
162
|
+
return new types.InputBotInlineResult({
|
|
163
|
+
id,
|
|
164
|
+
type,
|
|
165
|
+
title,
|
|
166
|
+
thumb: thumb == null ? undefined : thumb,
|
|
167
|
+
content: document,
|
|
168
|
+
sendMessage: new types.InputBotInlineMessageMediaAuto({
|
|
169
|
+
message,
|
|
170
|
+
entities,
|
|
171
|
+
replyMarkup,
|
|
172
|
+
}),
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
else if (fileId_ != null) {
|
|
176
|
+
const fileId = FileID.decode(fileId_);
|
|
177
|
+
return new types.InputBotInlineResultDocument({
|
|
178
|
+
id,
|
|
179
|
+
type,
|
|
180
|
+
title,
|
|
181
|
+
document: new types.InputDocument({
|
|
182
|
+
id: fileId.params.mediaId,
|
|
183
|
+
accessHash: fileId.params.accessHash,
|
|
184
|
+
fileReference: fileId.params.fileReference,
|
|
185
|
+
}),
|
|
186
|
+
sendMessage,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
else if (result_.type == "location") {
|
|
190
|
+
return new types.InputBotInlineResult({
|
|
191
|
+
id,
|
|
192
|
+
type,
|
|
193
|
+
title,
|
|
194
|
+
sendMessage: new types.InputBotInlineMessageMediaGeo({
|
|
195
|
+
geoPoint: new types.InputGeoPoint({
|
|
196
|
+
lat: result_.latitude,
|
|
197
|
+
long: result_.longitude,
|
|
198
|
+
accuracyRadius: result_.horizontalAccuracy,
|
|
199
|
+
}),
|
|
200
|
+
heading: result_.heading,
|
|
201
|
+
period: result_.livePeriod,
|
|
202
|
+
proximityNotificationRadius: result_.proximityAlertRadius,
|
|
203
|
+
replyMarkup,
|
|
204
|
+
}),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
else if (result_.type == "game") {
|
|
208
|
+
return new types.InputBotInlineResult({
|
|
209
|
+
id,
|
|
210
|
+
type,
|
|
211
|
+
title,
|
|
212
|
+
sendMessage: new types.InputBotInlineMessageGame({
|
|
213
|
+
replyMarkup,
|
|
214
|
+
}),
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
else if (result_.type == "article") {
|
|
218
|
+
if (!("messageText" in result_.inputMessageContent)) {
|
|
219
|
+
UNREACHABLE();
|
|
220
|
+
}
|
|
221
|
+
const [message, entities] = parseText(result_.inputMessageContent.messageText, { entities: result_.inputMessageContent.entities, parseMode: result_.inputMessageContent.parseMode });
|
|
222
|
+
return new types.InputBotInlineResult({
|
|
223
|
+
id,
|
|
224
|
+
type,
|
|
225
|
+
title,
|
|
226
|
+
sendMessage: new types.InputBotInlineMessageText({
|
|
227
|
+
message,
|
|
228
|
+
entities,
|
|
229
|
+
noWebpage: result_.inputMessageContent.disableWebPagePreview ? true : undefined,
|
|
230
|
+
replyMarkup,
|
|
231
|
+
}),
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
else if (result_.type == "venue") {
|
|
235
|
+
if (!result_.fourSquareId || !result_.foursquareType) {
|
|
236
|
+
UNREACHABLE();
|
|
237
|
+
}
|
|
238
|
+
return new types.InputBotInlineResult({
|
|
239
|
+
id,
|
|
240
|
+
type,
|
|
241
|
+
title,
|
|
242
|
+
sendMessage: new types.InputBotInlineMessageMediaVenue({
|
|
243
|
+
geoPoint: new types.InputGeoPoint({ long: result_.longitude, lat: result_.latitude }),
|
|
244
|
+
address: result_.address,
|
|
245
|
+
provider: "foursquare",
|
|
246
|
+
title: result_.title,
|
|
247
|
+
venueId: result_.fourSquareId,
|
|
248
|
+
venueType: result_.foursquareType,
|
|
249
|
+
replyMarkup,
|
|
250
|
+
}),
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
UNREACHABLE();
|
|
255
|
+
}
|
|
256
|
+
}
|
package/package.json
CHANGED
package/script/0_deps.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.201.0/assert/mod.js";
|
|
2
2
|
export { ctr256Decrypt, ctr256Encrypt, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.1.3/mod.js";
|
|
3
3
|
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
|
|
4
4
|
export { Mutex, type MutexInterface } from "async-mutex";
|
|
5
5
|
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
|
|
6
6
|
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
|
|
7
7
|
export declare const debug: typeof debug_;
|
|
8
|
-
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.
|
|
8
|
+
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.201.0/encoding/base64.js";
|
package/script/0_deps.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.base64Encode = exports.base64Decode = exports.debug = exports.Parser = exports.Mutex = exports.gzip = exports.gunzip = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.factorize = exports.ctr256Encrypt = exports.ctr256Decrypt = void 0;
|
|
18
|
-
__exportStar(require("./deps/deno.land/std@0.
|
|
18
|
+
__exportStar(require("./deps/deno.land/std@0.201.0/assert/mod.js"), exports);
|
|
19
19
|
var mod_js_1 = require("./deps/deno.land/x/tgcrypto@0.1.3/mod.js");
|
|
20
20
|
Object.defineProperty(exports, "ctr256Decrypt", { enumerable: true, get: function () { return mod_js_1.ctr256Decrypt; } });
|
|
21
21
|
Object.defineProperty(exports, "ctr256Encrypt", { enumerable: true, get: function () { return mod_js_1.ctr256Encrypt; } });
|
|
@@ -33,6 +33,6 @@ Object.defineProperty(exports, "Parser", { enumerable: true, get: function () {
|
|
|
33
33
|
const mod_js_3 = require("./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js");
|
|
34
34
|
const debug = (v) => (0, mod_js_3.debug)(v);
|
|
35
35
|
exports.debug = debug;
|
|
36
|
-
var base64_js_1 = require("./deps/deno.land/std@0.
|
|
36
|
+
var base64_js_1 = require("./deps/deno.land/std@0.201.0/encoding/base64.js");
|
|
37
37
|
Object.defineProperty(exports, "base64Decode", { enumerable: true, get: function () { return base64_js_1.decode; } });
|
|
38
38
|
Object.defineProperty(exports, "base64Encode", { enumerable: true, get: function () { return base64_js_1.encode; } });
|
package/script/3_types.d.ts
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
export * from "./types/!0_file_id.js";
|
|
2
1
|
export * from "./types/0_audio.js";
|
|
2
|
+
export * from "./types/0_bot_command.js";
|
|
3
3
|
export * from "./types/0_chat_action.js";
|
|
4
4
|
export * from "./types/0_chat_administrator_rights.js";
|
|
5
|
+
export * from "./types/0_chat_id.js";
|
|
5
6
|
export * from "./types/0_chat_photo.js";
|
|
7
|
+
export * from "./types/0_color.js";
|
|
6
8
|
export * from "./types/0_contact.js";
|
|
7
9
|
export * from "./types/0_dice.js";
|
|
10
|
+
export * from "./types/0__file_id.js";
|
|
8
11
|
export * from "./types/0_force_reply.js";
|
|
12
|
+
export * from "./types/0_input_contact_message_content.js";
|
|
13
|
+
export * from "./types/0_input_location_message_content.js";
|
|
14
|
+
export * from "./types/0_input_venue_message_content.js";
|
|
9
15
|
export * from "./types/0_keyboard_button_poll_type.js";
|
|
16
|
+
export * from "./types/0_labeled_price.js";
|
|
10
17
|
export * from "./types/0_location.js";
|
|
11
18
|
export * from "./types/0_login_url.js";
|
|
12
19
|
export * from "./types/0_mask_position.js";
|
|
13
20
|
export * from "./types/0_message_entity.js";
|
|
21
|
+
export * from "./types/0_parse_mode.js";
|
|
14
22
|
export * from "./types/0_poll_option.js";
|
|
15
23
|
export * from "./types/0_reply_keyboard_remove.js";
|
|
16
24
|
export * from "./types/0_thumbnail.js";
|
|
@@ -18,9 +26,13 @@ export * from "./types/0_venue.js";
|
|
|
18
26
|
export * from "./types/0_voice.js";
|
|
19
27
|
export * from "./types/0_web_app_info.js";
|
|
20
28
|
export * from "./types/1_animation.js";
|
|
29
|
+
export * from "./types/1_bot_command_scope.js";
|
|
21
30
|
export * from "./types/1_chat.js";
|
|
22
31
|
export * from "./types/1_document.js";
|
|
23
|
-
export * from "./types/
|
|
32
|
+
export * from "./types/1__getters.js";
|
|
33
|
+
export * from "./types/1_inline_query_result_button.js";
|
|
34
|
+
export * from "./types/1_input_invoice_message_content.js";
|
|
35
|
+
export * from "./types/1_input_text_message_content.js";
|
|
24
36
|
export * from "./types/1_keyboard_button.js";
|
|
25
37
|
export * from "./types/1_photo.js";
|
|
26
38
|
export * from "./types/1_poll.js";
|
|
@@ -29,8 +41,32 @@ export * from "./types/1_user.js";
|
|
|
29
41
|
export * from "./types/1_video_note.js";
|
|
30
42
|
export * from "./types/1_video.js";
|
|
31
43
|
export * from "./types/2_game.js";
|
|
32
|
-
export * from "./types/
|
|
44
|
+
export * from "./types/2_inline_keyboard_button.js";
|
|
33
45
|
export * from "./types/2_inline_query.js";
|
|
46
|
+
export * from "./types/2_input_message_content.js";
|
|
34
47
|
export * from "./types/2_reply_keyboard_markup.js";
|
|
48
|
+
export * from "./types/3_inline_keyboard_markup.js";
|
|
35
49
|
export * from "./types/3_message.js";
|
|
36
50
|
export * from "./types/4_callback_query.js";
|
|
51
|
+
export * from "./types/4_inline_query_result_article.js";
|
|
52
|
+
export * from "./types/4_inline_query_result_audio.js";
|
|
53
|
+
export * from "./types/4_inline_query_result_cached_audio.js";
|
|
54
|
+
export * from "./types/4_inline_query_result_cached_document.js";
|
|
55
|
+
export * from "./types/4_inline_query_result_cached_gif.js";
|
|
56
|
+
export * from "./types/4_inline_query_result_cached_mpeg4_gif.js";
|
|
57
|
+
export * from "./types/4_inline_query_result_cached_photo.js";
|
|
58
|
+
export * from "./types/4_inline_query_result_cached_sticker.js";
|
|
59
|
+
export * from "./types/4_inline_query_result_cached_video.js";
|
|
60
|
+
export * from "./types/4_inline_query_result_cached_voice.js";
|
|
61
|
+
export * from "./types/4_inline_query_result_contact.js";
|
|
62
|
+
export * from "./types/4_inline_query_result_document.js";
|
|
63
|
+
export * from "./types/4_inline_query_result_game.js";
|
|
64
|
+
export * from "./types/4_inline_query_result_gif.js";
|
|
65
|
+
export * from "./types/4_inline_query_result_location.js";
|
|
66
|
+
export * from "./types/4_inline_query_result_mpeg4_gif.js";
|
|
67
|
+
export * from "./types/4_inline_query_result_photo.js";
|
|
68
|
+
export * from "./types/4_inline_query_result_venue.js";
|
|
69
|
+
export * from "./types/4_inline_query_result_video.js";
|
|
70
|
+
export * from "./types/4_inline_query_result_voice.js";
|
|
71
|
+
export * from "./types/4_reply_markup.js";
|
|
72
|
+
export * from "./types/5_inline_query_result.js";
|
package/script/3_types.js
CHANGED
|
@@ -14,19 +14,27 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types/!0_file_id.js"), exports);
|
|
18
17
|
__exportStar(require("./types/0_audio.js"), exports);
|
|
18
|
+
__exportStar(require("./types/0_bot_command.js"), exports);
|
|
19
19
|
__exportStar(require("./types/0_chat_action.js"), exports);
|
|
20
20
|
__exportStar(require("./types/0_chat_administrator_rights.js"), exports);
|
|
21
|
+
__exportStar(require("./types/0_chat_id.js"), exports);
|
|
21
22
|
__exportStar(require("./types/0_chat_photo.js"), exports);
|
|
23
|
+
__exportStar(require("./types/0_color.js"), exports);
|
|
22
24
|
__exportStar(require("./types/0_contact.js"), exports);
|
|
23
25
|
__exportStar(require("./types/0_dice.js"), exports);
|
|
26
|
+
__exportStar(require("./types/0__file_id.js"), exports);
|
|
24
27
|
__exportStar(require("./types/0_force_reply.js"), exports);
|
|
28
|
+
__exportStar(require("./types/0_input_contact_message_content.js"), exports);
|
|
29
|
+
__exportStar(require("./types/0_input_location_message_content.js"), exports);
|
|
30
|
+
__exportStar(require("./types/0_input_venue_message_content.js"), exports);
|
|
25
31
|
__exportStar(require("./types/0_keyboard_button_poll_type.js"), exports);
|
|
32
|
+
__exportStar(require("./types/0_labeled_price.js"), exports);
|
|
26
33
|
__exportStar(require("./types/0_location.js"), exports);
|
|
27
34
|
__exportStar(require("./types/0_login_url.js"), exports);
|
|
28
35
|
__exportStar(require("./types/0_mask_position.js"), exports);
|
|
29
36
|
__exportStar(require("./types/0_message_entity.js"), exports);
|
|
37
|
+
__exportStar(require("./types/0_parse_mode.js"), exports);
|
|
30
38
|
__exportStar(require("./types/0_poll_option.js"), exports);
|
|
31
39
|
__exportStar(require("./types/0_reply_keyboard_remove.js"), exports);
|
|
32
40
|
__exportStar(require("./types/0_thumbnail.js"), exports);
|
|
@@ -34,9 +42,13 @@ __exportStar(require("./types/0_venue.js"), exports);
|
|
|
34
42
|
__exportStar(require("./types/0_voice.js"), exports);
|
|
35
43
|
__exportStar(require("./types/0_web_app_info.js"), exports);
|
|
36
44
|
__exportStar(require("./types/1_animation.js"), exports);
|
|
45
|
+
__exportStar(require("./types/1_bot_command_scope.js"), exports);
|
|
37
46
|
__exportStar(require("./types/1_chat.js"), exports);
|
|
38
47
|
__exportStar(require("./types/1_document.js"), exports);
|
|
39
|
-
__exportStar(require("./types/
|
|
48
|
+
__exportStar(require("./types/1__getters.js"), exports);
|
|
49
|
+
__exportStar(require("./types/1_inline_query_result_button.js"), exports);
|
|
50
|
+
__exportStar(require("./types/1_input_invoice_message_content.js"), exports);
|
|
51
|
+
__exportStar(require("./types/1_input_text_message_content.js"), exports);
|
|
40
52
|
__exportStar(require("./types/1_keyboard_button.js"), exports);
|
|
41
53
|
__exportStar(require("./types/1_photo.js"), exports);
|
|
42
54
|
__exportStar(require("./types/1_poll.js"), exports);
|
|
@@ -45,8 +57,32 @@ __exportStar(require("./types/1_user.js"), exports);
|
|
|
45
57
|
__exportStar(require("./types/1_video_note.js"), exports);
|
|
46
58
|
__exportStar(require("./types/1_video.js"), exports);
|
|
47
59
|
__exportStar(require("./types/2_game.js"), exports);
|
|
48
|
-
__exportStar(require("./types/
|
|
60
|
+
__exportStar(require("./types/2_inline_keyboard_button.js"), exports);
|
|
49
61
|
__exportStar(require("./types/2_inline_query.js"), exports);
|
|
62
|
+
__exportStar(require("./types/2_input_message_content.js"), exports);
|
|
50
63
|
__exportStar(require("./types/2_reply_keyboard_markup.js"), exports);
|
|
64
|
+
__exportStar(require("./types/3_inline_keyboard_markup.js"), exports);
|
|
51
65
|
__exportStar(require("./types/3_message.js"), exports);
|
|
52
66
|
__exportStar(require("./types/4_callback_query.js"), exports);
|
|
67
|
+
__exportStar(require("./types/4_inline_query_result_article.js"), exports);
|
|
68
|
+
__exportStar(require("./types/4_inline_query_result_audio.js"), exports);
|
|
69
|
+
__exportStar(require("./types/4_inline_query_result_cached_audio.js"), exports);
|
|
70
|
+
__exportStar(require("./types/4_inline_query_result_cached_document.js"), exports);
|
|
71
|
+
__exportStar(require("./types/4_inline_query_result_cached_gif.js"), exports);
|
|
72
|
+
__exportStar(require("./types/4_inline_query_result_cached_mpeg4_gif.js"), exports);
|
|
73
|
+
__exportStar(require("./types/4_inline_query_result_cached_photo.js"), exports);
|
|
74
|
+
__exportStar(require("./types/4_inline_query_result_cached_sticker.js"), exports);
|
|
75
|
+
__exportStar(require("./types/4_inline_query_result_cached_video.js"), exports);
|
|
76
|
+
__exportStar(require("./types/4_inline_query_result_cached_voice.js"), exports);
|
|
77
|
+
__exportStar(require("./types/4_inline_query_result_contact.js"), exports);
|
|
78
|
+
__exportStar(require("./types/4_inline_query_result_document.js"), exports);
|
|
79
|
+
__exportStar(require("./types/4_inline_query_result_game.js"), exports);
|
|
80
|
+
__exportStar(require("./types/4_inline_query_result_gif.js"), exports);
|
|
81
|
+
__exportStar(require("./types/4_inline_query_result_location.js"), exports);
|
|
82
|
+
__exportStar(require("./types/4_inline_query_result_mpeg4_gif.js"), exports);
|
|
83
|
+
__exportStar(require("./types/4_inline_query_result_photo.js"), exports);
|
|
84
|
+
__exportStar(require("./types/4_inline_query_result_venue.js"), exports);
|
|
85
|
+
__exportStar(require("./types/4_inline_query_result_video.js"), exports);
|
|
86
|
+
__exportStar(require("./types/4_inline_query_result_voice.js"), exports);
|
|
87
|
+
__exportStar(require("./types/4_reply_markup.js"), exports);
|
|
88
|
+
__exportStar(require("./types/5_inline_query_result.js"), exports);
|
package/script/4_constants.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
|
|
|
5
5
|
export declare const VECTOR_CONSTRUCTOR = 481674261;
|
|
6
6
|
export declare const INITIAL_DC: DC;
|
|
7
7
|
export declare const LAYER = 161;
|
|
8
|
-
export declare const APP_VERSION = "MTKruto 0.0.
|
|
8
|
+
export declare const APP_VERSION = "MTKruto 0.0.999";
|
|
9
9
|
export declare const DEVICE_MODEL: string;
|
|
10
10
|
export declare const LANG_CODE: string;
|
|
11
11
|
export declare const LANG_PACK = "";
|
package/script/4_constants.js
CHANGED
|
@@ -80,7 +80,7 @@ exports.PUBLIC_KEYS = Object.freeze([
|
|
|
80
80
|
exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
81
81
|
exports.INITIAL_DC = "2-test";
|
|
82
82
|
exports.LAYER = 161;
|
|
83
|
-
exports.APP_VERSION = "MTKruto 0.0.
|
|
83
|
+
exports.APP_VERSION = "MTKruto 0.0.999";
|
|
84
84
|
// @ts-ignore: lib
|
|
85
85
|
exports.DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
86
86
|
exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/script/client/0_html.js
CHANGED
|
@@ -30,7 +30,7 @@ function parseHtml(html) {
|
|
|
30
30
|
if (!url) {
|
|
31
31
|
throw new Error("Missing attribute href");
|
|
32
32
|
}
|
|
33
|
-
queue.push({ type: "
|
|
33
|
+
queue.push({ type: "textLink", offset: text.length, length: 0, url });
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
36
36
|
case "ins":
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaybePromise } from "../1_utilities.js";
|
|
2
|
-
import { CallbackQuery, ForceReply, InlineKeyboardMarkup, InlineQuery, Message, MessageEntity, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "../3_types.js";
|
|
2
|
+
import { CallbackQuery, ChatID, ForceReply, InlineKeyboardMarkup, InlineQuery, Message, MessageEntity, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "../3_types.js";
|
|
3
3
|
import { With } from "./0_utilities.js";
|
|
4
4
|
import { ClientPlainParams } from "./2_client_plain.js";
|
|
5
|
-
export type ParseMode = "
|
|
5
|
+
export type ParseMode = "HTML" | null;
|
|
6
6
|
export interface ClientParams extends ClientPlainParams {
|
|
7
7
|
/**
|
|
8
8
|
* A parse mode to use when the `parseMode` parameter is not specified when sending or editing messages. Defauls to `ParseMode.None`.
|
|
@@ -52,10 +52,6 @@ export interface AuthorizeUserParams<S = string> {
|
|
|
52
52
|
code: S | (() => MaybePromise<S>);
|
|
53
53
|
password: S | ((hint: string | null) => MaybePromise<S>);
|
|
54
54
|
}
|
|
55
|
-
/**
|
|
56
|
-
* A chat identifier as provided by MTKruto or a string starting with a @ that is followed by a username.
|
|
57
|
-
*/
|
|
58
|
-
export type ChatID = number | string;
|
|
59
55
|
export interface SendMessagesParams {
|
|
60
56
|
/**
|
|
61
57
|
* The parse mode to use. If not provided, the default parse mode will be used.
|
|
@@ -217,3 +213,4 @@ export interface Handler<U extends Partial<Update> = Partial<Update>> {
|
|
|
217
213
|
export type FilterUpdate<U extends Update, T extends keyof U, F extends keyof NonNullable<U[T]>> = With<U, T> & Pick<{
|
|
218
214
|
[P in T]-?: With<NonNullable<U[T]>, F>;
|
|
219
215
|
}, T>;
|
|
216
|
+
export declare const skip: Handler;
|
package/script/client/3_types.js
CHANGED
|
@@ -2,10 +2,10 @@ import { MaybePromise } from "../1_utilities.js";
|
|
|
2
2
|
import { functions, ReadObject, types } from "../2_tl.js";
|
|
3
3
|
import { Storage } from "../3_storage.js";
|
|
4
4
|
import { DC } from "../3_transport.js";
|
|
5
|
-
import { ChatAction, Message } from "../3_types.js";
|
|
5
|
+
import { BotCommand, BotCommandScope, ChatAction, ChatID, InlineQueryResult, InlineQueryResultButton, Message } from "../3_types.js";
|
|
6
6
|
import { With } from "./0_utilities.js";
|
|
7
7
|
import { ClientAbstract } from "./1_client_abstract.js";
|
|
8
|
-
import { AnswerCallbackQueryParams, AuthorizeUserParams,
|
|
8
|
+
import { AnswerCallbackQueryParams, AuthorizeUserParams, ClientParams, EditMessageParams, FilterableUpdates, FilterUpdate, ForwardMessagesParams, Handler, ParseMode, SendMessagesParams, SendPollParams, Update } from "./3_types.js";
|
|
9
9
|
export declare const getEntity: unique symbol;
|
|
10
10
|
export declare const getStickerSetName: unique symbol;
|
|
11
11
|
export declare const handleMigrationError: unique symbol;
|
|
@@ -36,7 +36,6 @@ export declare class Client extends ClientAbstract {
|
|
|
36
36
|
* @param storage The storage provider to use. Defaults to memory storage.
|
|
37
37
|
* @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
|
|
38
38
|
* @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
|
|
39
|
-
* @param params Other parameters.
|
|
40
39
|
*/
|
|
41
40
|
constructor(storage?: Storage, apiId?: number | null, apiHash?: string | null, params?: ClientParams);
|
|
42
41
|
private propagateConnectionState;
|
|
@@ -193,6 +192,7 @@ export declare class Client extends ClientAbstract {
|
|
|
193
192
|
* @param id ID of the callback query to answer.
|
|
194
193
|
*/
|
|
195
194
|
answerCallbackQuery(id: string, params?: AnswerCallbackQueryParams): Promise<void>;
|
|
195
|
+
private usernameResolver;
|
|
196
196
|
private constructReplyMarkup;
|
|
197
197
|
private static assertMsgHas;
|
|
198
198
|
/**
|
|
@@ -211,10 +211,25 @@ export declare class Client extends ClientAbstract {
|
|
|
211
211
|
* @param messageThreadId The thread to send the chat action to.
|
|
212
212
|
*/
|
|
213
213
|
sendChatAction(chatId: ChatID, action_: ChatAction, messageThreadId?: number): Promise<void>;
|
|
214
|
+
setMyCommands(commands: BotCommand[], params?: {
|
|
215
|
+
languageCode?: string;
|
|
216
|
+
scope?: BotCommandScope;
|
|
217
|
+
}): Promise<void>;
|
|
218
|
+
getMyCommands(params?: {
|
|
219
|
+
languageCode?: string;
|
|
220
|
+
scope?: BotCommandScope;
|
|
221
|
+
}): Promise<BotCommand[]>;
|
|
222
|
+
answerInlineQuery(id: string, results: InlineQueryResult[], params?: {
|
|
223
|
+
cacheTime?: number;
|
|
224
|
+
isPersonal?: boolean;
|
|
225
|
+
nextOffset?: string;
|
|
226
|
+
isGallery?: boolean;
|
|
227
|
+
button: InlineQueryResultButton;
|
|
228
|
+
}): Promise<void>;
|
|
214
229
|
private handle;
|
|
215
230
|
use(handler: Handler): void;
|
|
216
231
|
branch(predicate: (upd: Update) => MaybePromise<boolean>, trueHandler: Handler, falseHandler: Handler): void;
|
|
217
|
-
filter<D extends Update>(predicate: (
|
|
218
|
-
filter(predicate: (
|
|
232
|
+
filter<D extends Update>(predicate: (update: Update) => update is D, handler: Handler<D>): void;
|
|
233
|
+
filter(predicate: (update: Update) => MaybePromise<boolean>, handler: Handler): void;
|
|
219
234
|
on<T extends keyof Update, F extends keyof NonNullable<Update[T]>>(filter: T extends FilterableUpdates ? T | [T, F, ...F[]] : T, handler: Handler<FilterUpdate<Update, T, F>>): void;
|
|
220
235
|
}
|