@mtkruto/node 0.0.983 → 0.0.985
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/client/0_html.js +9 -10
- package/esm/client/3_client.d.ts +30 -1
- package/esm/client/3_client.js +89 -28
- package/esm/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/{script/deps/deno.land/std@0.198.0 → esm/deps/deno.land/std@0.200.0}/assert/assert_equals.d.ts +5 -1
- package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_equals.js +7 -4
- package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.js +1 -1
- package/esm/deps.d.ts +4 -4
- package/esm/deps.js +4 -4
- package/esm/transport/2_transport_provider.d.ts +0 -4
- package/esm/transport/2_transport_provider.js +0 -35
- package/esm/types/0_message_entity.d.ts +26 -45
- package/esm/types/0_message_entity.js +38 -60
- package/esm/types/1_photo.js +1 -0
- package/package.json +1 -1
- package/script/client/0_html.js +9 -10
- package/script/client/3_client.d.ts +30 -1
- package/script/client/3_client.js +89 -28
- package/script/constants.d.ts +1 -1
- package/script/constants.js +1 -1
- package/{esm/deps/deno.land/std@0.198.0 → script/deps/deno.land/std@0.200.0}/assert/assert_equals.d.ts +5 -1
- package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_equals.js +10 -7
- package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.js +4 -4
- package/script/deps.d.ts +4 -4
- package/script/deps.js +4 -4
- package/script/transport/2_transport_provider.d.ts +0 -4
- package/script/transport/2_transport_provider.js +1 -37
- package/script/types/0_message_entity.d.ts +26 -45
- package/script/types/0_message_entity.js +39 -61
- package/script/types/1_photo.js +1 -0
- package/esm/connection/1_connection_http.d.ts +0 -16
- package/esm/connection/1_connection_http.js +0 -91
- package/esm/transport/1_transport_piped.d.ts +0 -10
- package/esm/transport/1_transport_piped.js +0 -23
- package/script/connection/1_connection_http.d.ts +0 -16
- package/script/connection/1_connection_http.js +0 -95
- package/script/transport/1_transport_piped.d.ts +0 -10
- package/script/transport/1_transport_piped.js +0 -27
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0/_util/diff.d.ts → std@0.200.0/assert/_diff.d.ts} +0 -0
- /package/esm/deps/deno.land/{std@0.198.0/_util/diff.js → std@0.200.0/assert/_diff.js} +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0/_util/diff.d.ts → std@0.200.0/assert/_diff.d.ts} +0 -0
- /package/script/deps/deno.land/{std@0.198.0/_util/diff.js → std@0.200.0/assert/_diff.js} +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.js +0 -0
|
@@ -1,83 +1,61 @@
|
|
|
1
1
|
import * as types from "../tl/2_types.js";
|
|
2
|
-
export var MessageEntityType;
|
|
3
|
-
(function (MessageEntityType) {
|
|
4
|
-
MessageEntityType["Mention"] = "mention";
|
|
5
|
-
MessageEntityType["Hashtag"] = "hashtag";
|
|
6
|
-
MessageEntityType["BotCommand"] = "bot_command";
|
|
7
|
-
MessageEntityType["URL"] = "url";
|
|
8
|
-
MessageEntityType["Email"] = "email";
|
|
9
|
-
MessageEntityType["Bold"] = "bold";
|
|
10
|
-
MessageEntityType["Italic"] = "italic";
|
|
11
|
-
MessageEntityType["Code"] = "code";
|
|
12
|
-
MessageEntityType["Pre"] = "pre";
|
|
13
|
-
MessageEntityType["TextURL"] = "text_url";
|
|
14
|
-
MessageEntityType["MentionName"] = "mention_name";
|
|
15
|
-
MessageEntityType["Cashtag"] = "cashtag";
|
|
16
|
-
MessageEntityType["Phone"] = "phone";
|
|
17
|
-
MessageEntityType["Underline"] = "underline";
|
|
18
|
-
MessageEntityType["Strike"] = "strike";
|
|
19
|
-
MessageEntityType["Blockquote"] = "blockquote";
|
|
20
|
-
MessageEntityType["BankCard"] = "bank_card";
|
|
21
|
-
MessageEntityType["Spoiler"] = "spoiler";
|
|
22
|
-
MessageEntityType["CustomEmoji"] = "custom_emoji";
|
|
23
|
-
})(MessageEntityType || (MessageEntityType = {}));
|
|
24
2
|
export function constructMessageEntity(obj) {
|
|
25
3
|
if (obj instanceof types.MessageEntityMention) {
|
|
26
|
-
return { type:
|
|
4
|
+
return { type: "mention", offset: obj.offset, length: obj.length };
|
|
27
5
|
}
|
|
28
6
|
else if (obj instanceof types.MessageEntityHashtag) {
|
|
29
|
-
return { type:
|
|
7
|
+
return { type: "hashtag", offset: obj.offset, length: obj.length };
|
|
30
8
|
}
|
|
31
9
|
else if (obj instanceof types.MessageEntityBotCommand) {
|
|
32
|
-
return { type:
|
|
10
|
+
return { type: "bot_command", offset: obj.offset ?? 0, length: obj.length };
|
|
33
11
|
}
|
|
34
12
|
else if (obj instanceof types.MessageEntityURL) {
|
|
35
|
-
return { type:
|
|
13
|
+
return { type: "url", offset: obj.offset, length: obj.length };
|
|
36
14
|
}
|
|
37
15
|
else if (obj instanceof types.MessageEntityEmail) {
|
|
38
|
-
return { type:
|
|
16
|
+
return { type: "email", offset: obj.offset, length: obj.length };
|
|
39
17
|
}
|
|
40
18
|
else if (obj instanceof types.MessageEntityBold) {
|
|
41
|
-
return { type:
|
|
19
|
+
return { type: "bold", offset: obj.offset, length: obj.length };
|
|
42
20
|
}
|
|
43
21
|
else if (obj instanceof types.MessageEntityItalic) {
|
|
44
|
-
return { type:
|
|
22
|
+
return { type: "italic", offset: obj.offset, length: obj.length };
|
|
45
23
|
}
|
|
46
24
|
else if (obj instanceof types.MessageEntityCode) {
|
|
47
|
-
return { type:
|
|
25
|
+
return { type: "code", offset: obj.offset, length: obj.length };
|
|
48
26
|
}
|
|
49
27
|
else if (obj instanceof types.MessageEntityPre) {
|
|
50
|
-
return { type:
|
|
28
|
+
return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language };
|
|
51
29
|
}
|
|
52
30
|
else if (obj instanceof types.MessageEntityTextURL) {
|
|
53
|
-
return { type:
|
|
31
|
+
return { type: "text_link", offset: obj.offset, length: obj.length, url: obj.url };
|
|
54
32
|
}
|
|
55
33
|
else if (obj instanceof types.MessageEntityMentionName) {
|
|
56
|
-
return { type:
|
|
34
|
+
return { type: "text_mention", offset: obj.offset, length: obj.length, userId: Number(obj.userId) };
|
|
57
35
|
}
|
|
58
36
|
else if (obj instanceof types.MessageEntityCashtag) {
|
|
59
|
-
return { type:
|
|
37
|
+
return { type: "cashtag", offset: obj.offset, length: obj.length };
|
|
60
38
|
}
|
|
61
39
|
else if (obj instanceof types.MessageEntityPhone) {
|
|
62
|
-
return { type:
|
|
40
|
+
return { type: "phone_number", offset: obj.offset, length: obj.length };
|
|
63
41
|
}
|
|
64
42
|
else if (obj instanceof types.MessageEntityUnderline) {
|
|
65
|
-
return { type:
|
|
43
|
+
return { type: "underline", offset: obj.offset, length: obj.length };
|
|
66
44
|
}
|
|
67
45
|
else if (obj instanceof types.MessageEntityStrike) {
|
|
68
|
-
return { type:
|
|
46
|
+
return { type: "strikethrough", offset: obj.offset, length: obj.length };
|
|
69
47
|
}
|
|
70
48
|
else if (obj instanceof types.MessageEntityBlockquote) {
|
|
71
|
-
return { type:
|
|
49
|
+
return { type: "blockquote", offset: obj.offset, length: obj.length };
|
|
72
50
|
}
|
|
73
51
|
else if (obj instanceof types.MessageEntityBankCard) {
|
|
74
|
-
return { type:
|
|
52
|
+
return { type: "bank_card", offset: obj.offset, length: obj.length };
|
|
75
53
|
}
|
|
76
54
|
else if (obj instanceof types.MessageEntitySpoiler) {
|
|
77
|
-
return { type:
|
|
55
|
+
return { type: "spoiler", offset: obj.offset, length: obj.length };
|
|
78
56
|
}
|
|
79
57
|
else if (obj instanceof types.MessageEntityCustomEmoji) {
|
|
80
|
-
return { type:
|
|
58
|
+
return { type: "custom_emoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
|
|
81
59
|
}
|
|
82
60
|
else {
|
|
83
61
|
return null;
|
|
@@ -86,43 +64,43 @@ export function constructMessageEntity(obj) {
|
|
|
86
64
|
export function messageEntityToTlObject(entity) {
|
|
87
65
|
const { offset, length } = entity;
|
|
88
66
|
switch (entity.type) {
|
|
89
|
-
case
|
|
67
|
+
case "mention":
|
|
90
68
|
return new types.MessageEntityMention({ offset, length });
|
|
91
|
-
case
|
|
69
|
+
case "hashtag":
|
|
92
70
|
return new types.MessageEntityHashtag({ offset, length });
|
|
93
|
-
case
|
|
71
|
+
case "bot_command":
|
|
94
72
|
return new types.MessageEntityBotCommand({ offset, length });
|
|
95
|
-
case
|
|
73
|
+
case "url":
|
|
96
74
|
return new types.MessageEntityURL({ offset, length });
|
|
97
|
-
case
|
|
75
|
+
case "email":
|
|
98
76
|
return new types.MessageEntityEmail({ offset, length });
|
|
99
|
-
case
|
|
77
|
+
case "bold":
|
|
100
78
|
return new types.MessageEntityBold({ offset, length });
|
|
101
|
-
case
|
|
79
|
+
case "italic":
|
|
102
80
|
return new types.MessageEntityItalic({ offset, length });
|
|
103
|
-
case
|
|
81
|
+
case "code":
|
|
104
82
|
return new types.MessageEntityCode({ offset, length });
|
|
105
|
-
case
|
|
83
|
+
case "pre":
|
|
106
84
|
return new types.MessageEntityPre({ offset, length, language: entity.language });
|
|
107
|
-
case
|
|
85
|
+
case "text_link":
|
|
108
86
|
return new types.MessageEntityTextURL({ offset, length, url: entity.url });
|
|
109
|
-
case
|
|
87
|
+
case "text_mention":
|
|
110
88
|
return new types.MessageEntityMentionName({ offset, length, userId: BigInt(entity.userId) });
|
|
111
|
-
case
|
|
89
|
+
case "cashtag":
|
|
112
90
|
return new types.MessageEntityCashtag({ offset, length });
|
|
113
|
-
case
|
|
91
|
+
case "phone_number":
|
|
114
92
|
return new types.MessageEntityPhone({ offset, length });
|
|
115
|
-
case
|
|
93
|
+
case "underline":
|
|
116
94
|
return new types.MessageEntityUnderline({ offset, length });
|
|
117
|
-
case
|
|
95
|
+
case "strikethrough":
|
|
118
96
|
return new types.MessageEntityStrike({ offset, length });
|
|
119
|
-
case
|
|
97
|
+
case "blockquote":
|
|
120
98
|
return new types.MessageEntityBlockquote({ offset, length });
|
|
121
|
-
case
|
|
99
|
+
case "bank_card":
|
|
122
100
|
return new types.MessageEntityBankCard({ offset, length });
|
|
123
|
-
case
|
|
101
|
+
case "spoiler":
|
|
124
102
|
return new types.MessageEntitySpoiler({ offset, length });
|
|
125
|
-
case
|
|
103
|
+
case "custom_emoji":
|
|
126
104
|
return new types.MessageEntityCustomEmoji({ offset, length, documentId: BigInt(entity.customEmojiId) });
|
|
127
105
|
}
|
|
128
106
|
}
|
package/esm/types/1_photo.js
CHANGED
package/package.json
CHANGED
package/script/client/0_html.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseHtml = void 0;
|
|
4
4
|
const deps_js_1 = require("../deps.js");
|
|
5
|
-
const _0_message_entity_js_1 = require("../types/0_message_entity.js");
|
|
6
5
|
function parseHtml(html) {
|
|
7
6
|
let text = "";
|
|
8
7
|
const entities = new Array();
|
|
@@ -12,18 +11,18 @@ function parseHtml(html) {
|
|
|
12
11
|
switch (name) {
|
|
13
12
|
case "b":
|
|
14
13
|
case "strong":
|
|
15
|
-
queue.push({ type:
|
|
14
|
+
queue.push({ type: "bold", offset: text.length, length: 0 });
|
|
16
15
|
break;
|
|
17
16
|
case "em":
|
|
18
17
|
case "i":
|
|
19
|
-
queue.push({ type:
|
|
18
|
+
queue.push({ type: "italic", offset: text.length, length: 0 });
|
|
20
19
|
break;
|
|
21
20
|
case "code":
|
|
22
|
-
queue.push({ type:
|
|
21
|
+
queue.push({ type: "code", offset: text.length, length: 0 });
|
|
23
22
|
break;
|
|
24
23
|
case "pre": {
|
|
25
24
|
const language = attribs.language ?? "";
|
|
26
|
-
queue.push({ type:
|
|
25
|
+
queue.push({ type: "pre", offset: text.length, length: 0, language });
|
|
27
26
|
break;
|
|
28
27
|
}
|
|
29
28
|
case "a": {
|
|
@@ -31,16 +30,16 @@ function parseHtml(html) {
|
|
|
31
30
|
if (!url) {
|
|
32
31
|
throw new Error("Missing attribute href");
|
|
33
32
|
}
|
|
34
|
-
queue.push({ type:
|
|
33
|
+
queue.push({ type: "text_link", offset: text.length, length: 0, url });
|
|
35
34
|
break;
|
|
36
35
|
}
|
|
37
36
|
case "ins":
|
|
38
37
|
case "u":
|
|
39
|
-
queue.push({ type:
|
|
38
|
+
queue.push({ type: "underline", offset: text.length, length: 0 });
|
|
40
39
|
break;
|
|
41
40
|
case "del":
|
|
42
41
|
case "strike":
|
|
43
|
-
queue.push({ type:
|
|
42
|
+
queue.push({ type: "strikethrough", offset: text.length, length: 0 });
|
|
44
43
|
break;
|
|
45
44
|
case "span":
|
|
46
45
|
if (attribs.class != "tg-spoiler") {
|
|
@@ -48,13 +47,13 @@ function parseHtml(html) {
|
|
|
48
47
|
}
|
|
49
48
|
// falls through
|
|
50
49
|
case "tg-spoiler":
|
|
51
|
-
queue.push({ type:
|
|
50
|
+
queue.push({ type: "spoiler", offset: text.length, length: 0 });
|
|
52
51
|
break;
|
|
53
52
|
case "tg-emoji":
|
|
54
53
|
if (!attribs["emoji-id"]) {
|
|
55
54
|
throw new Error("Missing attribute emoji-id");
|
|
56
55
|
}
|
|
57
|
-
queue.push({ type:
|
|
56
|
+
queue.push({ type: "spoiler", offset: text.length, length: 0 });
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
ontext(data) {
|
|
@@ -110,6 +110,24 @@ export interface SendMessagesParams {
|
|
|
110
110
|
*/
|
|
111
111
|
replyMarkup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
112
112
|
}
|
|
113
|
+
export interface EditMessageParams {
|
|
114
|
+
/**
|
|
115
|
+
* The parse mode to use. If not provided, the default parse mode will be used.
|
|
116
|
+
*/
|
|
117
|
+
parseMode?: ParseMode;
|
|
118
|
+
/**
|
|
119
|
+
* The message's entities.
|
|
120
|
+
*/
|
|
121
|
+
entities?: MessageEntity[];
|
|
122
|
+
/**
|
|
123
|
+
* Whether to disable web page previews in the message that is to be edited.
|
|
124
|
+
*/
|
|
125
|
+
disableWebPagePreview?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* The reply markup of the message.
|
|
128
|
+
*/
|
|
129
|
+
replyMarkup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
130
|
+
}
|
|
113
131
|
export interface ForwardMessagesParams {
|
|
114
132
|
messageThreadId?: number;
|
|
115
133
|
/**
|
|
@@ -179,6 +197,9 @@ export declare class Client extends ClientAbstract {
|
|
|
179
197
|
connect(): Promise<void>;
|
|
180
198
|
private fetchState;
|
|
181
199
|
[handleMigrationError](err: types.RPCError): Promise<void>;
|
|
200
|
+
private connectionInited;
|
|
201
|
+
disconnect(): Promise<void>;
|
|
202
|
+
private initConnection;
|
|
182
203
|
/**
|
|
183
204
|
* Calls [initConnection](1) and authorizes the client with one of the following:
|
|
184
205
|
*
|
|
@@ -229,7 +250,7 @@ export declare class Client extends ClientAbstract {
|
|
|
229
250
|
private updateGapRecoveryMutex;
|
|
230
251
|
private recoverUpdateGap;
|
|
231
252
|
private recoverChannelUpdateGap;
|
|
232
|
-
getInputPeer(id:
|
|
253
|
+
getInputPeer(id: ChatID): Promise<types.InputPeerChat | types.InputPeerUser | types.InputPeerChannel>;
|
|
233
254
|
[getEntity](peer: types.PeerUser): Promise<types.User | null>;
|
|
234
255
|
[getEntity](peer: types.PeerChat): Promise<types.Chat | null>;
|
|
235
256
|
[getEntity](peer: types.PeerChannel): Promise<types.Channel | null>;
|
|
@@ -242,6 +263,14 @@ export declare class Client extends ClientAbstract {
|
|
|
242
263
|
* @param text The message's text.
|
|
243
264
|
*/
|
|
244
265
|
sendMessage(chatId: ChatID, text: string, params?: SendMessagesParams): Promise<Message>;
|
|
266
|
+
/**
|
|
267
|
+
* Edit a message's text.
|
|
268
|
+
*
|
|
269
|
+
* @param chatId The chat where the message is.
|
|
270
|
+
* @param messageId The ID of the message.
|
|
271
|
+
* @param text The new text of the message.
|
|
272
|
+
*/
|
|
273
|
+
editMessageText(chatId: ChatID, messageId: number, text: string, params?: EditMessageParams): Promise<void>;
|
|
245
274
|
/**
|
|
246
275
|
* Retrieve multiple messages.
|
|
247
276
|
*
|
|
@@ -198,6 +198,12 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
198
198
|
writable: true,
|
|
199
199
|
value: false
|
|
200
200
|
});
|
|
201
|
+
Object.defineProperty(this, "connectionInited", {
|
|
202
|
+
enumerable: true,
|
|
203
|
+
configurable: true,
|
|
204
|
+
writable: true,
|
|
205
|
+
value: false
|
|
206
|
+
});
|
|
201
207
|
Object.defineProperty(this, "autoStarted", {
|
|
202
208
|
enumerable: true,
|
|
203
209
|
configurable: true,
|
|
@@ -319,6 +325,29 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
319
325
|
(0, _0_control_js_1.UNREACHABLE)();
|
|
320
326
|
}
|
|
321
327
|
}
|
|
328
|
+
disconnect() {
|
|
329
|
+
this.connectionInited = false;
|
|
330
|
+
return super.disconnect();
|
|
331
|
+
}
|
|
332
|
+
async initConnection() {
|
|
333
|
+
if (!this.connectionInited) {
|
|
334
|
+
await this.invoke(new functions.InitConnection({
|
|
335
|
+
apiId: this.apiId,
|
|
336
|
+
appVersion: this.appVersion,
|
|
337
|
+
deviceModel: this.deviceModel,
|
|
338
|
+
langCode: this.langCode,
|
|
339
|
+
langPack: this.langPack,
|
|
340
|
+
query: new functions.InvokeWithLayer({
|
|
341
|
+
layer: constants_js_1.LAYER,
|
|
342
|
+
query: new functions.HelpGetConfig(),
|
|
343
|
+
}),
|
|
344
|
+
systemLangCode: this.systemLangCode,
|
|
345
|
+
systemVersion: this.systemVersion,
|
|
346
|
+
}));
|
|
347
|
+
this.connectionInited = true;
|
|
348
|
+
d("connection inited");
|
|
349
|
+
}
|
|
350
|
+
}
|
|
322
351
|
/**
|
|
323
352
|
* Calls [initConnection](1) and authorizes the client with one of the following:
|
|
324
353
|
*
|
|
@@ -353,23 +382,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
353
382
|
}
|
|
354
383
|
}
|
|
355
384
|
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof types.AuthExportedAuthorization ? "exported authorization" : "AuthorizeUserParams");
|
|
356
|
-
|
|
357
|
-
await this.invoke(new functions.InitConnection({
|
|
358
|
-
apiId: this.apiId,
|
|
359
|
-
appVersion: this.appVersion,
|
|
360
|
-
deviceModel: this.deviceModel,
|
|
361
|
-
langCode: this.langCode,
|
|
362
|
-
langPack: this.langPack,
|
|
363
|
-
query: new functions.InvokeWithLayer({
|
|
364
|
-
layer: constants_js_1.LAYER,
|
|
365
|
-
query: new functions.HelpGetConfig(),
|
|
366
|
-
}),
|
|
367
|
-
systemLangCode: this.systemLangCode,
|
|
368
|
-
systemVersion: this.systemVersion,
|
|
369
|
-
}));
|
|
370
|
-
d("connection inited");
|
|
371
|
-
};
|
|
372
|
-
await initConnection();
|
|
385
|
+
await this.initConnection();
|
|
373
386
|
try {
|
|
374
387
|
await this.fetchState("authorize");
|
|
375
388
|
d("already authorized");
|
|
@@ -392,7 +405,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
392
405
|
const match = err.errorMessage.match(/MIGRATE_(\d)$/);
|
|
393
406
|
if (match) {
|
|
394
407
|
await this[exports.handleMigrationError](err);
|
|
395
|
-
await initConnection();
|
|
408
|
+
await this.initConnection();
|
|
396
409
|
continue;
|
|
397
410
|
}
|
|
398
411
|
else {
|
|
@@ -432,7 +445,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
432
445
|
const match = err.errorMessage.match(/MIGRATE_(\d)$/);
|
|
433
446
|
if (match) {
|
|
434
447
|
await this[exports.handleMigrationError](err);
|
|
435
|
-
await initConnection();
|
|
448
|
+
await this.initConnection();
|
|
436
449
|
sentCode = await sendCode();
|
|
437
450
|
}
|
|
438
451
|
else {
|
|
@@ -511,6 +524,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
511
524
|
*/
|
|
512
525
|
async start(params) {
|
|
513
526
|
await this.connect();
|
|
527
|
+
await this.initConnection();
|
|
514
528
|
try {
|
|
515
529
|
await this.fetchState("authorize");
|
|
516
530
|
d("already authorized");
|
|
@@ -592,16 +606,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
592
606
|
this.promises.delete(message.body.msgId);
|
|
593
607
|
}
|
|
594
608
|
}
|
|
595
|
-
else if (message.body instanceof types.
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
609
|
+
else if (message.body instanceof types.BadServerSalt) {
|
|
610
|
+
d("server salt reassigned");
|
|
611
|
+
this.state.salt = message.body.newServerSalt;
|
|
612
|
+
const promise = this.promises.get(message.body.badMsgId);
|
|
613
|
+
if (promise) {
|
|
614
|
+
promise.resolve(message.body);
|
|
615
|
+
this.promises.delete(message.body.badMsgId);
|
|
599
616
|
}
|
|
600
|
-
// const promise = this.promises.get(message.body.badMsgId);
|
|
601
|
-
// if (promise) {
|
|
602
|
-
// promise.resolve(message.body);
|
|
603
|
-
// this.promises.delete(message.body.badMsgId);
|
|
604
|
-
// }
|
|
605
617
|
}
|
|
606
618
|
this.toAcknowledge.add(message.id);
|
|
607
619
|
}
|
|
@@ -1238,6 +1250,55 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1238
1250
|
}));
|
|
1239
1251
|
return await this.updatesToMessages(chatId, result).then((v) => v[0]);
|
|
1240
1252
|
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Edit a message's text.
|
|
1255
|
+
*
|
|
1256
|
+
* @param chatId The chat where the message is.
|
|
1257
|
+
* @param messageId The ID of the message.
|
|
1258
|
+
* @param text The new text of the message.
|
|
1259
|
+
*/
|
|
1260
|
+
async editMessageText(chatId, messageId, text, params) {
|
|
1261
|
+
const entities_ = params?.entities ?? [];
|
|
1262
|
+
const parseMode = params?.parseMode ?? this.parseMode;
|
|
1263
|
+
switch (parseMode) {
|
|
1264
|
+
case ParseMode.None:
|
|
1265
|
+
break;
|
|
1266
|
+
case ParseMode.HTML: {
|
|
1267
|
+
const [newText, entitiesToPush] = (0, _0_html_js_1.parseHtml)(text);
|
|
1268
|
+
text = newText;
|
|
1269
|
+
for (const entity of entitiesToPush) {
|
|
1270
|
+
entities_.push(entity);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
let replyMarkup = undefined;
|
|
1275
|
+
if (params?.replyMarkup) {
|
|
1276
|
+
if ("inlineKeyboard" in params.replyMarkup) {
|
|
1277
|
+
replyMarkup = await (0, _2_inline_keyboard_markup_js_1.inlineKeyboardMarkupToTlObject)(params.replyMarkup, async (v) => {
|
|
1278
|
+
const inputPeer = await this.getInputPeer(v).then((v) => v[_1_tl_object_js_1.as](types.InputPeerUser));
|
|
1279
|
+
return new types.InputUser({ userId: inputPeer.userId, accessHash: inputPeer.accessHash });
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
else if ("keyboard" in params.replyMarkup) {
|
|
1283
|
+
replyMarkup = (0, _2_reply_keyboard_markup_js_1.replyKeyboardMarkupToTlObject)(params.replyMarkup);
|
|
1284
|
+
}
|
|
1285
|
+
else if ("removeKeyboard" in params.replyMarkup) {
|
|
1286
|
+
replyMarkup = (0, _0_reply_keyboard_remove_js_1.replyKeyboardRemoveToTlObject)(params.replyMarkup);
|
|
1287
|
+
}
|
|
1288
|
+
else if ("forceReply" in params.replyMarkup) {
|
|
1289
|
+
replyMarkup = (0, _0_force_reply_js_1.forceReplyToTlObject)(params.replyMarkup);
|
|
1290
|
+
}
|
|
1291
|
+
else {
|
|
1292
|
+
throw new Error("The replyMarkup parameter has an unexpected type");
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
const id = messageId;
|
|
1296
|
+
const peer = await this.getInputPeer(chatId);
|
|
1297
|
+
const entities = entities_?.length > 0 ? entities_.map((v) => (0, _0_message_entity_js_1.messageEntityToTlObject)(v)) : undefined;
|
|
1298
|
+
const message = text;
|
|
1299
|
+
const noWebpage = params?.disableWebPagePreview ? true : undefined;
|
|
1300
|
+
await this.invoke(new functions.MessagesEditMessage({ id, peer, entities, message, noWebpage, replyMarkup }));
|
|
1301
|
+
}
|
|
1241
1302
|
/**
|
|
1242
1303
|
* Retrieve multiple messages.
|
|
1243
1304
|
*
|
package/script/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.985";
|
|
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/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.985";
|
|
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];
|
|
@@ -13,5 +13,9 @@
|
|
|
13
13
|
* assertEquals({ hello: "world" }, { hello: "world" });
|
|
14
14
|
* });
|
|
15
15
|
* ```
|
|
16
|
+
*
|
|
17
|
+
* Note: formatter option is experimental and may be removed in the future.
|
|
16
18
|
*/
|
|
17
|
-
export declare function assertEquals<T>(actual: T, expected: T, msg?: string
|
|
19
|
+
export declare function assertEquals<T>(actual: T, expected: T, msg?: string, options?: {
|
|
20
|
+
formatter?: (value: unknown) => string;
|
|
21
|
+
}): void;
|
|
@@ -6,7 +6,7 @@ const equal_js_1 = require("./equal.js");
|
|
|
6
6
|
const _format_js_1 = require("./_format.js");
|
|
7
7
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
8
|
const colors_js_1 = require("../fmt/colors.js");
|
|
9
|
-
const
|
|
9
|
+
const _diff_js_1 = require("./_diff.js");
|
|
10
10
|
const _constants_js_1 = require("./_constants.js");
|
|
11
11
|
/**
|
|
12
12
|
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
@@ -23,22 +23,25 @@ const _constants_js_1 = require("./_constants.js");
|
|
|
23
23
|
* assertEquals({ hello: "world" }, { hello: "world" });
|
|
24
24
|
* });
|
|
25
25
|
* ```
|
|
26
|
+
*
|
|
27
|
+
* Note: formatter option is experimental and may be removed in the future.
|
|
26
28
|
*/
|
|
27
|
-
function assertEquals(actual, expected, msg) {
|
|
29
|
+
function assertEquals(actual, expected, msg, options = {}) {
|
|
28
30
|
if ((0, equal_js_1.equal)(actual, expected)) {
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
33
|
+
const { formatter = _format_js_1.format } = options;
|
|
31
34
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
32
35
|
let message = `Values are not equal${msgSuffix}`;
|
|
33
|
-
const actualString = (
|
|
34
|
-
const expectedString = (
|
|
36
|
+
const actualString = formatter(actual);
|
|
37
|
+
const expectedString = formatter(expected);
|
|
35
38
|
try {
|
|
36
39
|
const stringDiff = (typeof actual === "string") &&
|
|
37
40
|
(typeof expected === "string");
|
|
38
41
|
const diffResult = stringDiff
|
|
39
|
-
? (0,
|
|
40
|
-
: (0,
|
|
41
|
-
const diffMsg = (0,
|
|
42
|
+
? (0, _diff_js_1.diffstr)(actual, expected)
|
|
43
|
+
: (0, _diff_js_1.diff)(actualString.split("\n"), expectedString.split("\n"));
|
|
44
|
+
const diffMsg = (0, _diff_js_1.buildMessage)(diffResult, { stringDiff }).join("\n");
|
|
42
45
|
message = `${message}\n${diffMsg}`;
|
|
43
46
|
}
|
|
44
47
|
catch {
|
|
@@ -4,7 +4,7 @@ exports.assertStrictEquals = void 0;
|
|
|
4
4
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
const _format_js_1 = require("./_format.js");
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
const
|
|
7
|
+
const _diff_js_1 = require("./_diff.js");
|
|
8
8
|
const _constants_js_1 = require("./_constants.js");
|
|
9
9
|
const colors_js_1 = require("../fmt/colors.js");
|
|
10
10
|
/**
|
|
@@ -50,9 +50,9 @@ function assertStrictEquals(actual, expected, msg) {
|
|
|
50
50
|
const stringDiff = (typeof actual === "string") &&
|
|
51
51
|
(typeof expected === "string");
|
|
52
52
|
const diffResult = stringDiff
|
|
53
|
-
? (0,
|
|
54
|
-
: (0,
|
|
55
|
-
const diffMsg = (0,
|
|
53
|
+
? (0, _diff_js_1.diffstr)(actual, expected)
|
|
54
|
+
: (0, _diff_js_1.diff)(actualString.split("\n"), expectedString.split("\n"));
|
|
55
|
+
const diffMsg = (0, _diff_js_1.buildMessage)(diffResult, { stringDiff }).join("\n");
|
|
56
56
|
message = `Values are not strictly equal${msgSuffix}\n${diffMsg}`;
|
|
57
57
|
}
|
|
58
58
|
catch {
|
package/script/deps.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.200.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
|
-
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/
|
|
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
|
-
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/
|
|
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.200.0/encoding/base64.js";
|
package/script/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.200.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; } });
|
|
@@ -23,16 +23,16 @@ Object.defineProperty(exports, "factorize", { enumerable: true, get: function ()
|
|
|
23
23
|
Object.defineProperty(exports, "ige256Decrypt", { enumerable: true, get: function () { return mod_js_1.ige256Decrypt; } });
|
|
24
24
|
Object.defineProperty(exports, "ige256Encrypt", { enumerable: true, get: function () { return mod_js_1.ige256Encrypt; } });
|
|
25
25
|
Object.defineProperty(exports, "initTgCrypto", { enumerable: true, get: function () { return mod_js_1.init; } });
|
|
26
|
-
var gzip_js_1 = require("./deps/raw.githubusercontent.com/MTKruto/compress/
|
|
26
|
+
var gzip_js_1 = require("./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js");
|
|
27
27
|
Object.defineProperty(exports, "gunzip", { enumerable: true, get: function () { return gzip_js_1.gunzip; } });
|
|
28
28
|
Object.defineProperty(exports, "gzip", { enumerable: true, get: function () { return gzip_js_1.gzip; } });
|
|
29
29
|
var async_mutex_1 = require("async-mutex");
|
|
30
30
|
Object.defineProperty(exports, "Mutex", { enumerable: true, get: function () { return async_mutex_1.Mutex; } });
|
|
31
31
|
var mod_js_2 = require("./deps/deno.land/x/html_parser@v0.1.3/src/mod.js");
|
|
32
32
|
Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return mod_js_2.Parser; } });
|
|
33
|
-
const mod_js_3 = require("./deps/raw.githubusercontent.com/MTKruto/debug/
|
|
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)(`mtkruto/${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.200.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; } });
|
|
@@ -20,7 +20,3 @@ export type TransportProviderCreator<E = Record<never, never>> = (params: Transp
|
|
|
20
20
|
export declare const webSocketTransportProvider: TransportProviderCreator<{
|
|
21
21
|
wss?: boolean;
|
|
22
22
|
}>;
|
|
23
|
-
export declare const httpTransportProvider: TransportProviderCreator<{
|
|
24
|
-
secure?: boolean;
|
|
25
|
-
v6?: boolean;
|
|
26
|
-
}>;
|