@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
|
@@ -10,7 +10,7 @@ function constructMessageEntity(obj) {
|
|
|
10
10
|
return { type: "hashtag", offset: obj.offset, length: obj.length };
|
|
11
11
|
}
|
|
12
12
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityBotCommand) {
|
|
13
|
-
return { type: "
|
|
13
|
+
return { type: "botCommand", offset: obj.offset ?? 0, length: obj.length };
|
|
14
14
|
}
|
|
15
15
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityURL) {
|
|
16
16
|
return { type: "url", offset: obj.offset, length: obj.length };
|
|
@@ -31,16 +31,16 @@ function constructMessageEntity(obj) {
|
|
|
31
31
|
return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language };
|
|
32
32
|
}
|
|
33
33
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityTextURL) {
|
|
34
|
-
return { type: "
|
|
34
|
+
return { type: "textLink", offset: obj.offset, length: obj.length, url: obj.url };
|
|
35
35
|
}
|
|
36
36
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityMentionName) {
|
|
37
|
-
return { type: "
|
|
37
|
+
return { type: "textMention", offset: obj.offset, length: obj.length, userId: Number(obj.userId) };
|
|
38
38
|
}
|
|
39
39
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityCashtag) {
|
|
40
40
|
return { type: "cashtag", offset: obj.offset, length: obj.length };
|
|
41
41
|
}
|
|
42
42
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityPhone) {
|
|
43
|
-
return { type: "
|
|
43
|
+
return { type: "phoneNumber", offset: obj.offset, length: obj.length };
|
|
44
44
|
}
|
|
45
45
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityUnderline) {
|
|
46
46
|
return { type: "underline", offset: obj.offset, length: obj.length };
|
|
@@ -52,13 +52,13 @@ function constructMessageEntity(obj) {
|
|
|
52
52
|
return { type: "blockquote", offset: obj.offset, length: obj.length };
|
|
53
53
|
}
|
|
54
54
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityBankCard) {
|
|
55
|
-
return { type: "
|
|
55
|
+
return { type: "bankCard", offset: obj.offset, length: obj.length };
|
|
56
56
|
}
|
|
57
57
|
else if (obj instanceof _2_tl_js_1.types.MessageEntitySpoiler) {
|
|
58
58
|
return { type: "spoiler", offset: obj.offset, length: obj.length };
|
|
59
59
|
}
|
|
60
60
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityCustomEmoji) {
|
|
61
|
-
return { type: "
|
|
61
|
+
return { type: "customEmoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
64
|
return null;
|
|
@@ -72,7 +72,7 @@ function messageEntityToTlObject(entity) {
|
|
|
72
72
|
return new _2_tl_js_1.types.MessageEntityMention({ offset, length });
|
|
73
73
|
case "hashtag":
|
|
74
74
|
return new _2_tl_js_1.types.MessageEntityHashtag({ offset, length });
|
|
75
|
-
case "
|
|
75
|
+
case "botCommand":
|
|
76
76
|
return new _2_tl_js_1.types.MessageEntityBotCommand({ offset, length });
|
|
77
77
|
case "url":
|
|
78
78
|
return new _2_tl_js_1.types.MessageEntityURL({ offset, length });
|
|
@@ -86,13 +86,13 @@ function messageEntityToTlObject(entity) {
|
|
|
86
86
|
return new _2_tl_js_1.types.MessageEntityCode({ offset, length });
|
|
87
87
|
case "pre":
|
|
88
88
|
return new _2_tl_js_1.types.MessageEntityPre({ offset, length, language: entity.language });
|
|
89
|
-
case "
|
|
89
|
+
case "textLink":
|
|
90
90
|
return new _2_tl_js_1.types.MessageEntityTextURL({ offset, length, url: entity.url });
|
|
91
|
-
case "
|
|
91
|
+
case "textMention":
|
|
92
92
|
return new _2_tl_js_1.types.MessageEntityMentionName({ offset, length, userId: BigInt(entity.userId) });
|
|
93
93
|
case "cashtag":
|
|
94
94
|
return new _2_tl_js_1.types.MessageEntityCashtag({ offset, length });
|
|
95
|
-
case "
|
|
95
|
+
case "phoneNumber":
|
|
96
96
|
return new _2_tl_js_1.types.MessageEntityPhone({ offset, length });
|
|
97
97
|
case "underline":
|
|
98
98
|
return new _2_tl_js_1.types.MessageEntityUnderline({ offset, length });
|
|
@@ -100,11 +100,11 @@ function messageEntityToTlObject(entity) {
|
|
|
100
100
|
return new _2_tl_js_1.types.MessageEntityStrike({ offset, length });
|
|
101
101
|
case "blockquote":
|
|
102
102
|
return new _2_tl_js_1.types.MessageEntityBlockquote({ offset, length });
|
|
103
|
-
case "
|
|
103
|
+
case "bankCard":
|
|
104
104
|
return new _2_tl_js_1.types.MessageEntityBankCard({ offset, length });
|
|
105
105
|
case "spoiler":
|
|
106
106
|
return new _2_tl_js_1.types.MessageEntitySpoiler({ offset, length });
|
|
107
|
-
case "
|
|
107
|
+
case "customEmoji":
|
|
108
108
|
return new _2_tl_js_1.types.MessageEntityCustomEmoji({ offset, length, documentId: BigInt(entity.customEmojiId) });
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ParseMode = "HTML" | null;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constructThumbnail = 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 constructThumbnail(size, file) {
|
|
7
|
-
const fileType = file instanceof _2_tl_js_1.types.Photo ?
|
|
8
|
-
const fileId = new
|
|
7
|
+
const fileType = file instanceof _2_tl_js_1.types.Photo ? _0__file_id_js_1.FileType.Photo : _0__file_id_js_1.FileType.Document;
|
|
8
|
+
const fileId = new _0__file_id_js_1.FileID(null, null, fileType, file.dcId, {
|
|
9
9
|
mediaId: file.id,
|
|
10
10
|
accessHash: file.accessHash,
|
|
11
11
|
fileReference: file.fileReference,
|
|
12
12
|
thumbnailFileType: fileType,
|
|
13
|
-
thumbnailSource:
|
|
13
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
|
|
14
14
|
thumbnailSize: size.type,
|
|
15
15
|
volumeId: 0n,
|
|
16
16
|
localId: 0,
|
|
17
17
|
}).encode();
|
|
18
|
-
const fileUniqueId = new
|
|
18
|
+
const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: file.id }).encode();
|
|
19
19
|
return {
|
|
20
20
|
fileId,
|
|
21
21
|
fileUniqueId,
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { MaybePromise } from "../1_utilities.js";
|
|
2
2
|
import { types } from "../2_tl.js";
|
|
3
|
+
import { ChatID } from "./0_chat_id.js";
|
|
3
4
|
export interface EntityGetter {
|
|
4
5
|
(peer: types.PeerUser): MaybePromise<types.User | null>;
|
|
5
6
|
(peer: types.PeerChat): MaybePromise<types.Chat | null>;
|
|
6
7
|
(peer: types.PeerChannel): MaybePromise<types.Channel | null>;
|
|
7
8
|
}
|
|
9
|
+
export interface InputPeerGetter {
|
|
10
|
+
(id: ChatID): Promise<types.InputPeerUser | types.InputPeerChannel | types.InputPeerChat>;
|
|
11
|
+
}
|
|
12
|
+
export interface UsernameResolver {
|
|
13
|
+
(username: string): MaybePromise<types.InputUser>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ChatID } from "./0_chat_id.js";
|
|
2
|
+
import { types } from "../2_tl.js";
|
|
3
|
+
import { InputPeerGetter } from "./1__getters.js";
|
|
4
|
+
export declare namespace BotCommandScope {
|
|
5
|
+
interface Default {
|
|
6
|
+
type: "default";
|
|
7
|
+
}
|
|
8
|
+
interface AllPrivateChats {
|
|
9
|
+
type: "allPrivateChats";
|
|
10
|
+
}
|
|
11
|
+
interface AllGroupChats {
|
|
12
|
+
type: "allGroupChats";
|
|
13
|
+
}
|
|
14
|
+
interface AllChatAdministrators {
|
|
15
|
+
type: "allChatAdministrators";
|
|
16
|
+
}
|
|
17
|
+
interface Chat {
|
|
18
|
+
type: "chat";
|
|
19
|
+
chatId: ChatID;
|
|
20
|
+
}
|
|
21
|
+
interface ChatAdministrators {
|
|
22
|
+
type: "chatAdministrators";
|
|
23
|
+
chatId: ChatID;
|
|
24
|
+
}
|
|
25
|
+
interface ChatMember {
|
|
26
|
+
type: "chatMember";
|
|
27
|
+
chatId: ChatID;
|
|
28
|
+
userId: number;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export type BotCommandScope = BotCommandScope.Default | BotCommandScope.AllPrivateChats | BotCommandScope.AllGroupChats | BotCommandScope.AllChatAdministrators | BotCommandScope.Chat | BotCommandScope.ChatAdministrators | BotCommandScope.ChatMember;
|
|
32
|
+
export declare function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise<types.BotCommandScopeDefault | types.BotCommandScopeUsers | types.BotCommandScopeChats | types.BotCommandScopeChatAdmins | types.BotCommandScopePeer | types.BotCommandScopePeerAdmins | types.BotCommandScopePeerUser>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.botCommandScopeToTlObject = void 0;
|
|
4
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
6
|
+
async function botCommandScopeToTlObject(scope, getInputPeer) {
|
|
7
|
+
switch (scope.type) {
|
|
8
|
+
case "default":
|
|
9
|
+
return new _2_tl_js_1.types.BotCommandScopeDefault();
|
|
10
|
+
case "allPrivateChats":
|
|
11
|
+
return new _2_tl_js_1.types.BotCommandScopeUsers();
|
|
12
|
+
case "allGroupChats":
|
|
13
|
+
return new _2_tl_js_1.types.BotCommandScopeChats();
|
|
14
|
+
case "allChatAdministrators":
|
|
15
|
+
return new _2_tl_js_1.types.BotCommandScopeChatAdmins();
|
|
16
|
+
case "chat":
|
|
17
|
+
return new _2_tl_js_1.types.BotCommandScopePeer({ peer: await getInputPeer(scope.chatId) });
|
|
18
|
+
case "chatAdministrators":
|
|
19
|
+
return new _2_tl_js_1.types.BotCommandScopePeerAdmins({ peer: await getInputPeer(scope.chatId) });
|
|
20
|
+
case "chatMember": {
|
|
21
|
+
const user = await getInputPeer(scope.userId);
|
|
22
|
+
if (!(user instanceof _2_tl_js_1.types.InputPeerUser)) {
|
|
23
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
24
|
+
}
|
|
25
|
+
return new _2_tl_js_1.types.BotCommandScopePeerUser({ peer: await getInputPeer(scope.chatId), userId: new _2_tl_js_1.types.InputUser({ userId: user.userId, accessHash: user.accessHash }) });
|
|
26
|
+
}
|
|
27
|
+
default:
|
|
28
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.botCommandScopeToTlObject = botCommandScopeToTlObject;
|
package/script/types/1_chat.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { Color } from "./0_color.js";
|
|
3
3
|
import { ChatPhoto } from "./0_chat_photo.js";
|
|
4
|
-
export
|
|
5
|
-
Private = "private",
|
|
6
|
-
Group = "group",
|
|
7
|
-
Supergroup = "supergroup",
|
|
8
|
-
Channel = "channel"
|
|
9
|
-
}
|
|
4
|
+
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
10
5
|
export declare namespace Chat {
|
|
11
6
|
interface Base {
|
|
12
7
|
/** Type of chat, can be either "private", "group", "supergroup" or "channel" */
|
|
@@ -18,7 +13,7 @@ export declare namespace Chat {
|
|
|
18
13
|
photo?: ChatPhoto;
|
|
19
14
|
}
|
|
20
15
|
interface Private extends Base {
|
|
21
|
-
type:
|
|
16
|
+
type: "private";
|
|
22
17
|
/** True, if this user is a bot */
|
|
23
18
|
isBot?: boolean;
|
|
24
19
|
/** First name of the other party in a private chat */
|
|
@@ -45,7 +40,7 @@ export declare namespace Chat {
|
|
|
45
40
|
restrictionReason?: types.RestrictionReason[];
|
|
46
41
|
}
|
|
47
42
|
interface Group extends Base {
|
|
48
|
-
type:
|
|
43
|
+
type: "group";
|
|
49
44
|
/** Title, for supergroups, channels and group chats */
|
|
50
45
|
title: string;
|
|
51
46
|
/** Chat photo. */
|
|
@@ -74,7 +69,7 @@ export declare namespace Chat {
|
|
|
74
69
|
restrictionReason?: types.RestrictionReason[];
|
|
75
70
|
}
|
|
76
71
|
interface Channel extends ChannelBase {
|
|
77
|
-
type:
|
|
72
|
+
type: "channel";
|
|
78
73
|
/** Title, for supergroups, channels and group chats */
|
|
79
74
|
title: string;
|
|
80
75
|
/** Username, for private chats, supergroups and channels if available */
|
|
@@ -83,7 +78,7 @@ export declare namespace Chat {
|
|
|
83
78
|
also?: string[];
|
|
84
79
|
}
|
|
85
80
|
interface Supergroup extends ChannelBase {
|
|
86
|
-
type:
|
|
81
|
+
type: "supergroup";
|
|
87
82
|
/** True, if the supergroup chat is a forum (has [topics](https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups) enabled) */
|
|
88
83
|
isForum: boolean;
|
|
89
84
|
}
|
package/script/types/1_chat.js
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.constructChat =
|
|
3
|
+
exports.constructChat = void 0;
|
|
4
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
6
|
const _4_constants_js_1 = require("../4_constants.js");
|
|
7
7
|
const _0_color_js_1 = require("./0_color.js");
|
|
8
8
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
9
|
-
var ChatType;
|
|
10
|
-
(function (ChatType) {
|
|
11
|
-
ChatType["Private"] = "private";
|
|
12
|
-
ChatType["Group"] = "group";
|
|
13
|
-
ChatType["Supergroup"] = "supergroup";
|
|
14
|
-
ChatType["Channel"] = "channel";
|
|
15
|
-
})(ChatType = exports.ChatType || (exports.ChatType = {}));
|
|
16
9
|
function constructChat(chat) {
|
|
17
10
|
if (chat instanceof _2_tl_js_1.types.User) {
|
|
18
11
|
const id = Number(chat.id);
|
|
19
12
|
const chat_ = {
|
|
20
|
-
type:
|
|
13
|
+
type: "private",
|
|
21
14
|
isBot: chat.bot || false,
|
|
22
15
|
id,
|
|
23
16
|
color: (0, _0_color_js_1.getColor)(id),
|
|
@@ -40,7 +33,7 @@ function constructChat(chat) {
|
|
|
40
33
|
else if (chat instanceof _2_tl_js_1.types.Chat) {
|
|
41
34
|
const id = Number(-chat.id);
|
|
42
35
|
const chat_ = {
|
|
43
|
-
type:
|
|
36
|
+
type: "group",
|
|
44
37
|
id,
|
|
45
38
|
color: (0, _0_color_js_1.getColor)(id),
|
|
46
39
|
title: chat.title,
|
|
@@ -59,7 +52,7 @@ function constructChat(chat) {
|
|
|
59
52
|
chat_ = {
|
|
60
53
|
id,
|
|
61
54
|
color: (0, _0_color_js_1.getColor)(id),
|
|
62
|
-
type:
|
|
55
|
+
type: "supergroup",
|
|
63
56
|
title,
|
|
64
57
|
isScam,
|
|
65
58
|
isFake,
|
|
@@ -73,7 +66,7 @@ function constructChat(chat) {
|
|
|
73
66
|
chat_ = {
|
|
74
67
|
id,
|
|
75
68
|
color: (0, _0_color_js_1.getColor)(id),
|
|
76
|
-
type:
|
|
69
|
+
type: "channel",
|
|
77
70
|
title,
|
|
78
71
|
isScam,
|
|
79
72
|
isFake,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LabeledPrice } from "../tl/2_types.js";
|
|
2
|
+
export interface InputInvoiceMessageContent {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
payload: string;
|
|
6
|
+
providerToken: string;
|
|
7
|
+
currency: string;
|
|
8
|
+
prices: LabeledPrice[];
|
|
9
|
+
maxTipAmount?: number;
|
|
10
|
+
suggestedTipAmounts?: number[];
|
|
11
|
+
providerData?: string;
|
|
12
|
+
photoUrl?: string;
|
|
13
|
+
photoSize?: number;
|
|
14
|
+
photoWidth?: number;
|
|
15
|
+
photoHeight?: number;
|
|
16
|
+
needName?: boolean;
|
|
17
|
+
needPhoneNumber?: boolean;
|
|
18
|
+
needEmail?: boolean;
|
|
19
|
+
needShippingAAddress?: boolean;
|
|
20
|
+
sendPhoneNumberToPorvider?: boolean;
|
|
21
|
+
sendEmailToProvider?: boolean;
|
|
22
|
+
isFlexible?: boolean;
|
|
23
|
+
}
|
package/script/types/1_photo.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constructPhoto = 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
|
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
7
7
|
function constructPhoto(photo) {
|
|
8
8
|
const sizes = photo.sizes
|
|
@@ -18,14 +18,14 @@ function constructPhoto(photo) {
|
|
|
18
18
|
.sort((a, b) => a.size - b.size);
|
|
19
19
|
const largest = sizes.slice(-1)[0];
|
|
20
20
|
const { dcId, id: mediaId, accessHash, fileReference } = photo;
|
|
21
|
-
const fileUniqueId = new
|
|
21
|
+
const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.id }).encode();
|
|
22
22
|
return {
|
|
23
|
-
fileId: new
|
|
23
|
+
fileId: new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Photo, dcId, {
|
|
24
24
|
mediaId,
|
|
25
25
|
accessHash,
|
|
26
26
|
fileReference,
|
|
27
|
-
thumbnailSource:
|
|
28
|
-
thumbnailFileType:
|
|
27
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
|
|
28
|
+
thumbnailFileType: _0__file_id_js_1.FileType.Photo,
|
|
29
29
|
thumbnailSize: largest.type,
|
|
30
30
|
volumeId: 0n,
|
|
31
31
|
localId: 0,
|
|
@@ -8,8 +8,8 @@ export interface Sticker {
|
|
|
8
8
|
fileId: string;
|
|
9
9
|
/** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
|
|
10
10
|
fileUniqueId: string;
|
|
11
|
-
/** Type of the sticker, currently one of "regular", "mask", "
|
|
12
|
-
type: "regular" | "mask" | "
|
|
11
|
+
/** Type of the sticker, currently one of "regular", "mask", "customEmoji". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. */
|
|
12
|
+
type: "regular" | "mask" | "customEmoji";
|
|
13
13
|
/** Sticker width */
|
|
14
14
|
width: number;
|
|
15
15
|
/** Sticker height */
|
|
@@ -12,7 +12,7 @@ async function constructSticker(document, fileId, fileUniqueId, getStickerSetNam
|
|
|
12
12
|
return {
|
|
13
13
|
fileId,
|
|
14
14
|
fileUniqueId,
|
|
15
|
-
// TODO:
|
|
15
|
+
// TODO: custom emoji type?
|
|
16
16
|
type: stickerAttribute.mask ? "mask" : "regular",
|
|
17
17
|
width: imageSizeAttribute ? imageSizeAttribute.w : videoAttribute ? videoAttribute.w : 512,
|
|
18
18
|
height: imageSizeAttribute ? imageSizeAttribute.h : videoAttribute ? videoAttribute.h : 512,
|
package/script/types/2_game.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.constructGame = void 0;
|
|
4
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
|
-
const
|
|
6
|
+
const _0__file_id_js_1 = require("./0__file_id.js");
|
|
7
7
|
const _1_animation_js_1 = require("./1_animation.js");
|
|
8
8
|
const _1_photo_js_1 = require("./1_photo.js");
|
|
9
9
|
function constructGame(media_) {
|
|
@@ -14,11 +14,11 @@ function constructGame(media_) {
|
|
|
14
14
|
description: media_.game.description,
|
|
15
15
|
photo: (0, _1_photo_js_1.constructPhoto)(game_.photo[_2_tl_js_1.as](_2_tl_js_1.types.Photo)),
|
|
16
16
|
animation: document_
|
|
17
|
-
? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new
|
|
17
|
+
? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Animation, document_.dcId, {
|
|
18
18
|
mediaId: document_.id,
|
|
19
19
|
accessHash: document_.accessHash,
|
|
20
20
|
fileReference: document_.fileReference,
|
|
21
|
-
}).encode(), new
|
|
21
|
+
}).encode(), new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: document_.id }).encode())
|
|
22
22
|
: undefined,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MaybePromise } from "../1_utilities.js";
|
|
2
1
|
import { types } from "../2_tl.js";
|
|
3
2
|
import { WebAppInfo } from "./0_web_app_info.js";
|
|
4
3
|
import { LoginUrl } from "./0_login_url.js";
|
|
4
|
+
import { UsernameResolver } from "./1__getters.js";
|
|
5
5
|
export declare namespace InlineKeyboardButton {
|
|
6
6
|
interface Base {
|
|
7
7
|
/** Label text on the button */
|
|
@@ -42,4 +42,4 @@ export declare namespace InlineKeyboardButton {
|
|
|
42
42
|
/** This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields. */
|
|
43
43
|
export type InlineKeyboardButton = InlineKeyboardButton.URL | InlineKeyboardButton.Callback | InlineKeyboardButton.WebApp | InlineKeyboardButton.Login | InlineKeyboardButton.SwitchInline | InlineKeyboardButton.SwitchInlineCurrent | InlineKeyboardButton.Game | InlineKeyboardButton.Pay;
|
|
44
44
|
export declare function constructInlineKeyboardButton(button_: types.TypeKeyboardButton): InlineKeyboardButton;
|
|
45
|
-
export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver:
|
|
45
|
+
export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise<types.KeyboardButtonURL | types.KeyboardButtonCallback | types.KeyboardButtonSwitchInline | types.KeyboardButtonBuy | types.InputKeyboardButtonURLAuth | types.KeyboardButtonWebView>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
import { EntityGetter } from "./!0_misc.js";
|
|
3
2
|
import { Location } from "./0_location.js";
|
|
3
|
+
import { EntityGetter } from "./1__getters.js";
|
|
4
4
|
import { User } from "./1_user.js";
|
|
5
5
|
export interface InlineQuery {
|
|
6
6
|
/** Unique identifier for this query */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InputContactMessageContent } from "./0_input_contact_message_content.js";
|
|
2
|
+
import { InputLocationMessageContent } from "./0_input_location_message_content.js";
|
|
3
|
+
import { InputVenuMessageContent } from "./0_input_venue_message_content.js";
|
|
4
|
+
import { InputInvoiceMessageContent } from "./1_input_invoice_message_content.js";
|
|
5
|
+
import { InputTextMessageContent } from "./1_input_text_message_content.js";
|
|
6
|
+
export type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenuMessageContent | InputContactMessageContent | InputInvoiceMessageContent;
|
package/{esm/types/2_inline_keyboard_markup.d.ts → script/types/3_inline_keyboard_markup.d.ts}
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UsernameResolver } from "./1__getters.js";
|
|
3
|
+
import { InlineKeyboardButton } from "./2_inline_keyboard_button.js";
|
|
3
4
|
/** This object represents an inline keyboard that appears right next to the message it belongs to. */
|
|
4
5
|
export interface InlineKeyboardMarkup {
|
|
5
6
|
/** Array of button rows, each represented by an Array of InlineKeyboardButton objects */
|
|
6
7
|
inlineKeyboard: InlineKeyboardButton[][];
|
|
7
8
|
}
|
|
8
9
|
export declare function constructInlineKeyboardMarkup(keyboard_: types.ReplyInlineMarkup): InlineKeyboardMarkup;
|
|
9
|
-
export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver:
|
|
10
|
+
export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver: UsernameResolver): Promise<types.ReplyInlineMarkup>;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.inlineKeyboardMarkupToTlObject = exports.constructInlineKeyboardMarkup = void 0;
|
|
4
4
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
-
const
|
|
5
|
+
const _2_inline_keyboard_button_js_1 = require("./2_inline_keyboard_button.js");
|
|
6
6
|
function constructInlineKeyboardMarkup(keyboard_) {
|
|
7
7
|
const rows = new Array();
|
|
8
8
|
for (const row_ of keyboard_.rows) {
|
|
9
9
|
const row = new Array();
|
|
10
10
|
for (const button_ of row_.buttons) {
|
|
11
|
-
row.push((0,
|
|
11
|
+
row.push((0, _2_inline_keyboard_button_js_1.constructInlineKeyboardButton)(button_));
|
|
12
12
|
}
|
|
13
13
|
rows.push(row);
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@ async function inlineKeyboardMarkupToTlObject(keyboard, usernameResolver) {
|
|
|
20
20
|
for (const row of keyboard.inlineKeyboard) {
|
|
21
21
|
const row_ = new Array();
|
|
22
22
|
for (const button of row) {
|
|
23
|
-
row_.push(await (0,
|
|
23
|
+
row_.push(await (0, _2_inline_keyboard_button_js_1.inlineKeyboardButtonToTlObject)(button, usernameResolver));
|
|
24
24
|
}
|
|
25
25
|
rows_.push(new _2_tl_js_1.types.KeyboardButtonRow({ buttons: row_ }));
|
|
26
26
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MaybePromise } from "../1_utilities.js";
|
|
2
2
|
import { types } from "../2_tl.js";
|
|
3
|
-
import { EntityGetter } from "./!0_misc.js";
|
|
4
3
|
import { ForceReply } from "./0_force_reply.js";
|
|
5
4
|
import { MessageEntity } from "./0_message_entity.js";
|
|
6
5
|
import { Audio } from "./0_audio.js";
|
|
@@ -10,6 +9,7 @@ import { Venue } from "./0_venue.js";
|
|
|
10
9
|
import { Location } from "./0_location.js";
|
|
11
10
|
import { Dice } from "./0_dice.js";
|
|
12
11
|
import { ReplyKeyboardRemove } from "./0_reply_keyboard_remove.js";
|
|
12
|
+
import { EntityGetter } from "./1__getters.js";
|
|
13
13
|
import { Chat } from "./1_chat.js";
|
|
14
14
|
import { Photo } from "./1_photo.js";
|
|
15
15
|
import { Document } from "./1_document.js";
|
|
@@ -19,7 +19,7 @@ import { Animation } from "./1_animation.js";
|
|
|
19
19
|
import { User } from "./1_user.js";
|
|
20
20
|
import { Poll } from "./1_poll.js";
|
|
21
21
|
import { Sticker, StickerSetNameGetter } from "./1_sticker.js";
|
|
22
|
-
import { InlineKeyboardMarkup } from "./
|
|
22
|
+
import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
|
|
23
23
|
import { ReplyKeyboardMarkup } from "./2_reply_keyboard_markup.js";
|
|
24
24
|
import { Game } from "./2_game.js";
|
|
25
25
|
/** This object represents a message. */
|
|
@@ -5,7 +5,7 @@ const _0_deps_js_1 = require("../0_deps.js");
|
|
|
5
5
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
6
6
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
7
7
|
const _4_constants_js_1 = require("../4_constants.js");
|
|
8
|
-
const
|
|
8
|
+
const _0__file_id_js_1 = require("./0__file_id.js");
|
|
9
9
|
const _0_force_reply_js_1 = require("./0_force_reply.js");
|
|
10
10
|
const _0_message_entity_js_1 = require("./0_message_entity.js");
|
|
11
11
|
const _0_audio_js_1 = require("./0_audio.js");
|
|
@@ -24,7 +24,7 @@ const _1_animation_js_1 = require("./1_animation.js");
|
|
|
24
24
|
const _1_user_js_1 = require("./1_user.js");
|
|
25
25
|
const _1_poll_js_1 = require("./1_poll.js");
|
|
26
26
|
const _1_sticker_js_1 = require("./1_sticker.js");
|
|
27
|
-
const
|
|
27
|
+
const _3_inline_keyboard_markup_js_1 = require("./3_inline_keyboard_markup.js");
|
|
28
28
|
const _2_reply_keyboard_markup_js_1 = require("./2_reply_keyboard_markup.js");
|
|
29
29
|
const _2_game_js_1 = require("./2_game.js");
|
|
30
30
|
const d = (0, _0_deps_js_1.debug)("types/Message");
|
|
@@ -120,10 +120,10 @@ async function constructServiceMessage(message_, chat, getEntity, getMessage) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
else if (message_.action instanceof _2_tl_js_1.types.MessageActionChannelCreate) {
|
|
123
|
-
if (message.chat.type ==
|
|
123
|
+
if (message.chat.type == "channel") {
|
|
124
124
|
message.channelCreated = true;
|
|
125
125
|
}
|
|
126
|
-
else if (message.chat.type ==
|
|
126
|
+
else if (message.chat.type == "supergroup") {
|
|
127
127
|
message.supergroupCreated = true;
|
|
128
128
|
}
|
|
129
129
|
else {
|
|
@@ -264,7 +264,7 @@ async function constructMessage(message_, getEntity, getMessage, getStickerSetNa
|
|
|
264
264
|
message.replyMarkup = (0, _2_reply_keyboard_markup_js_1.constructReplyKeyboardMarkup)(message_.replyMarkup);
|
|
265
265
|
}
|
|
266
266
|
else if (message_.replyMarkup instanceof _2_tl_js_1.types.ReplyInlineMarkup) {
|
|
267
|
-
message.replyMarkup = (0,
|
|
267
|
+
message.replyMarkup = (0, _3_inline_keyboard_markup_js_1.constructInlineKeyboardMarkup)(message_.replyMarkup);
|
|
268
268
|
}
|
|
269
269
|
else if (message_.replyMarkup instanceof _2_tl_js_1.types.ReplyKeyboardHide) {
|
|
270
270
|
message.replyMarkup = (0, _0_reply_keyboard_remove_js_1.constructReplyKeyboardRemove)(message_.replyMarkup);
|
|
@@ -334,41 +334,41 @@ async function constructMessage(message_, getEntity, getMessage, getStickerSetNa
|
|
|
334
334
|
else if (message_.media instanceof _2_tl_js_1.types.MessageMediaDocument) {
|
|
335
335
|
const { document } = message_.media;
|
|
336
336
|
if (document instanceof _2_tl_js_1.types.Document) {
|
|
337
|
-
const getFileId = (type) => new
|
|
337
|
+
const getFileId = (type) => new _0__file_id_js_1.FileID(null, null, type, document.dcId, {
|
|
338
338
|
mediaId: document.id,
|
|
339
339
|
accessHash: document.accessHash,
|
|
340
340
|
fileReference: document.fileReference,
|
|
341
341
|
}).encode();
|
|
342
|
-
const fileUniqueId = new
|
|
342
|
+
const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: document.id }).encode();
|
|
343
343
|
const animated = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeAnimated);
|
|
344
344
|
const audio = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeAudio);
|
|
345
345
|
const fileName = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename);
|
|
346
346
|
const sticker = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeSticker);
|
|
347
347
|
const video = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo);
|
|
348
348
|
if (animated) {
|
|
349
|
-
message.animation = (0, _1_animation_js_1.constructAnimation)(document, video, fileName, getFileId(
|
|
349
|
+
message.animation = (0, _1_animation_js_1.constructAnimation)(document, video, fileName, getFileId(_0__file_id_js_1.FileType.Animation), fileUniqueId);
|
|
350
350
|
}
|
|
351
351
|
else if (video) {
|
|
352
352
|
if (video.roundMessage) {
|
|
353
|
-
message.videoNote = (0, _1_video_note_js_1.constructVideoNote)(document, video, getFileId(
|
|
353
|
+
message.videoNote = (0, _1_video_note_js_1.constructVideoNote)(document, video, getFileId(_0__file_id_js_1.FileType.VideoNote), fileUniqueId);
|
|
354
354
|
}
|
|
355
355
|
else {
|
|
356
|
-
message.video = (0, _1_video_js_1.constructVideo)(document, video, fileName?.fileName, getFileId(
|
|
356
|
+
message.video = (0, _1_video_js_1.constructVideo)(document, video, fileName?.fileName, getFileId(_0__file_id_js_1.FileType.Video), fileUniqueId);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
else if (audio) {
|
|
360
360
|
if (audio.voice) {
|
|
361
|
-
message.voice = (0, _0_voice_js_1.constructVoice)(document, audio, getFileId(
|
|
361
|
+
message.voice = (0, _0_voice_js_1.constructVoice)(document, audio, getFileId(_0__file_id_js_1.FileType.Voice), fileUniqueId);
|
|
362
362
|
}
|
|
363
363
|
else {
|
|
364
|
-
message.audio = (0, _0_audio_js_1.constructAudio)(document, audio, getFileId(
|
|
364
|
+
message.audio = (0, _0_audio_js_1.constructAudio)(document, audio, getFileId(_0__file_id_js_1.FileType.Audio), fileUniqueId);
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
else if (sticker) {
|
|
368
|
-
message.sticker = await (0, _1_sticker_js_1.constructSticker)(document, getFileId(
|
|
368
|
+
message.sticker = await (0, _1_sticker_js_1.constructSticker)(document, getFileId(_0__file_id_js_1.FileType.Sticker), fileUniqueId, getStickerSetName);
|
|
369
369
|
}
|
|
370
370
|
else if (fileName) {
|
|
371
|
-
message.document = (0, _1_document_js_1.constructDocument)(document, fileName, getFileId(
|
|
371
|
+
message.document = (0, _1_document_js_1.constructDocument)(document, fileName, getFileId(_0__file_id_js_1.FileType.Document), fileUniqueId);
|
|
372
372
|
}
|
|
373
373
|
else {
|
|
374
374
|
(0, _1_utilities_js_1.UNREACHABLE)();
|