@mtkruto/node 0.1.112 → 0.1.114
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 +3 -2
- package/esm/0_deps.js +3 -2
- package/esm/1_utilities.d.ts +1 -0
- package/esm/1_utilities.js +1 -0
- package/esm/3_types.d.ts +0 -1
- package/esm/3_types.js +0 -1
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/5_client.d.ts +2 -1
- package/esm/5_client.js +2 -1
- package/esm/client/0_utilities.d.ts +6 -0
- package/esm/client/0_utilities.js +53 -0
- package/esm/client/3_types.d.ts +76 -8
- package/esm/client/3_types.js +1 -1
- package/esm/client/4_composer.d.ts +22 -0
- package/esm/client/4_composer.js +81 -0
- package/esm/client/{4_client.d.ts → 5_client.d.ts} +87 -12
- package/esm/client/{4_client.js → 5_client.js} +367 -107
- package/esm/client/6_composer.d.ts +4 -0
- package/esm/client/6_composer.js +3 -0
- package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.d.ts +2 -2
- package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.js +2 -2
- package/{script/deps/deno.land/std@0.204.0 → esm/deps/deno.land/std@0.207.0}/fmt/colors.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/fmt/colors.js +1 -1
- package/esm/deps/deno.land/std@0.207.0/path/_common/assert_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/assert_path.js +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/basename.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/basename.js +40 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/common.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/common.js +23 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/constants.d.ts +39 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/constants.js +46 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/dirname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/dirname.js +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/format.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/format.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/from_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/from_file_url.js +9 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.d.ts +27 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.js +235 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize.js +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize_string.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize_string.js +77 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/relative.js +9 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/to_file_url.js +15 -0
- package/esm/deps/deno.land/std@0.207.0/path/_interface.d.ts +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/_interface.js +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_os.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_os.js +18 -0
- package/esm/deps/deno.land/std@0.207.0/path/basename.d.ts +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/basename.js +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/common.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/dirname.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/extname.js +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/format.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/from_file_url.d.ts +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/from_file_url.js +24 -0
- package/esm/deps/deno.land/std@0.207.0/path/glob_to_regexp.d.ts +61 -0
- package/esm/deps/deno.land/std@0.207.0/path/glob_to_regexp.js +65 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_absolute.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_glob.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_glob.js +28 -0
- package/esm/deps/deno.land/std@0.207.0/path/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/join.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/join_globs.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/mod.d.ts +28 -0
- package/esm/deps/deno.land/std@0.207.0/path/mod.js +63 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize.js +14 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize_glob.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/parse.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/_util.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/_util.js +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/basename.d.ts +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/basename.js +18 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/common.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/dirname.js +36 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/extname.js +59 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/format.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/from_file_url.d.ts +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/from_file_url.js +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_absolute.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/mod.d.ts +40 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/mod.js +44 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize.js +25 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/parse.js +98 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/relative.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/relative.js +94 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/resolve.js +48 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/separator.js +4 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_file_url.d.ts +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_file_url.js +22 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.js +10 -0
- package/esm/deps/deno.land/std@0.207.0/path/relative.d.ts +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/relative.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/resolve.js +14 -0
- package/esm/deps/deno.land/std@0.207.0/path/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/separator.js +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_file_url.d.ts +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_file_url.js +24 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_namespaced_path.js +14 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/_util.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/_util.js +15 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/basename.d.ts +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/basename.js +30 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/common.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/dirname.js +98 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/extname.js +68 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/format.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/from_file_url.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/from_file_url.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_absolute.js +27 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join.js +72 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/mod.d.ts +40 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/mod.js +44 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize.js +130 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/parse.js +159 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/relative.d.ts +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/relative.js +121 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/resolve.js +143 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/separator.js +4 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_file_url.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_file_url.js +31 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.js +38 -0
- package/esm/mod.d.ts +1 -1
- package/esm/mod.js +1 -1
- package/esm/tl/0_tl_raw_reader.d.ts +1 -0
- package/esm/tl/0_tl_raw_reader.js +3 -0
- package/esm/tl/3_deserialize.js +7 -2
- package/esm/types/1_chat.d.ts +2 -3
- package/esm/types/1_chat.js +4 -5
- package/esm/types/1_user.d.ts +2 -3
- package/esm/types/1_user.js +2 -3
- package/esm/types/5_inline_query_result.js +7 -0
- package/esm/utilities/0_color.d.ts +3 -0
- package/esm/utilities/0_color.js +55 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +3 -2
- package/script/0_deps.js +18 -5
- package/script/1_utilities.d.ts +1 -0
- package/script/1_utilities.js +1 -0
- package/script/3_types.d.ts +0 -1
- package/script/3_types.js +0 -1
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/5_client.d.ts +2 -1
- package/script/5_client.js +2 -1
- package/script/client/0_utilities.d.ts +6 -0
- package/script/client/0_utilities.js +79 -1
- package/script/client/3_types.d.ts +76 -8
- package/script/client/3_types.js +0 -3
- package/script/client/4_composer.d.ts +22 -0
- package/script/client/4_composer.js +88 -0
- package/script/client/{4_client.d.ts → 5_client.d.ts} +87 -12
- package/script/client/{4_client.js → 5_client.js} +369 -108
- package/script/client/6_composer.d.ts +4 -0
- package/script/client/6_composer.js +7 -0
- package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.d.ts +2 -2
- package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.js +2 -2
- package/{esm/deps/deno.land/std@0.204.0 → script/deps/deno.land/std@0.207.0}/fmt/colors.d.ts +1 -1
- package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/fmt/colors.js +1 -1
- package/script/deps/deno.land/std@0.207.0/path/_common/assert_path.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/assert_path.js +11 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/basename.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/basename.js +46 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/common.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/common.js +27 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/constants.d.ts +39 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/constants.js +49 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/dirname.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/dirname.js +12 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/format.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/format.js +24 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/from_file_url.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/from_file_url.js +13 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.d.ts +27 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.js +239 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize.js +12 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize_string.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize_string.js +81 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/relative.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/relative.js +13 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/to_file_url.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/to_file_url.js +19 -0
- package/script/deps/deno.land/std@0.207.0/path/_interface.d.ts +26 -0
- package/script/deps/deno.land/std@0.207.0/path/_interface.js +4 -0
- package/script/deps/deno.land/std@0.207.0/path/_os.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/_os.js +44 -0
- package/script/deps/deno.land/std@0.207.0/path/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.207.0/path/basename.js +21 -0
- package/script/deps/deno.land/std@0.207.0/path/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/common.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/dirname.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/extname.js +17 -0
- package/script/deps/deno.land/std@0.207.0/path/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/format.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/from_file_url.d.ts +17 -0
- package/script/deps/deno.land/std@0.207.0/path/from_file_url.js +28 -0
- package/script/deps/deno.land/std@0.207.0/path/glob_to_regexp.d.ts +61 -0
- package/script/deps/deno.land/std@0.207.0/path/glob_to_regexp.js +69 -0
- package/script/deps/deno.land/std@0.207.0/path/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/is_absolute.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/is_glob.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/is_glob.js +32 -0
- package/script/deps/deno.land/std@0.207.0/path/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/join.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/join_globs.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/mod.d.ts +28 -0
- package/script/deps/deno.land/std@0.207.0/path/mod.js +92 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize.js +18 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize_glob.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/parse.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/_util.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/_util.js +12 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/basename.js +22 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/common.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/dirname.js +40 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/extname.js +63 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/format.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/from_file_url.d.ts +11 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/from_file_url.js +21 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_absolute.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/mod.d.ts +40 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/mod.js +61 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize.js +29 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/parse.js +102 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/relative.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/relative.js +98 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/resolve.js +75 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/separator.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_file_url.d.ts +11 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_file_url.js +26 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.js +14 -0
- package/script/deps/deno.land/std@0.207.0/path/relative.d.ts +12 -0
- package/script/deps/deno.land/std@0.207.0/path/relative.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/resolve.js +18 -0
- package/script/deps/deno.land/std@0.207.0/path/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/separator.js +8 -0
- package/script/deps/deno.land/std@0.207.0/path/to_file_url.d.ts +17 -0
- package/script/deps/deno.land/std@0.207.0/path/to_file_url.js +28 -0
- package/script/deps/deno.land/std@0.207.0/path/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/to_namespaced_path.js +18 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/_util.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/_util.js +21 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/basename.js +34 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/common.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/dirname.js +102 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/extname.js +72 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/format.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/from_file_url.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/from_file_url.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_absolute.js +31 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join.js +76 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/mod.d.ts +40 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/mod.js +61 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize.js +134 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/parse.js +163 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/relative.d.ts +12 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/relative.js +125 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/resolve.js +170 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/separator.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_file_url.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_file_url.js +35 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.js +42 -0
- package/script/mod.d.ts +1 -1
- package/script/mod.js +3 -1
- package/script/tl/0_tl_raw_reader.d.ts +1 -0
- package/script/tl/0_tl_raw_reader.js +3 -0
- package/script/tl/3_deserialize.js +7 -2
- package/script/types/1_chat.d.ts +2 -3
- package/script/types/1_chat.js +4 -5
- package/script/types/1_user.d.ts +2 -3
- package/script/types/1_user.js +1 -2
- package/script/types/5_inline_query_result.js +7 -0
- package/script/utilities/0_color.d.ts +3 -0
- package/script/utilities/0_color.js +60 -0
- package/esm/types/0_color.d.ts +0 -3
- package/esm/types/0_color.js +0 -36
- package/script/types/0_color.d.ts +0 -3
- package/script/types/0_color.js +0 -41
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.js +0 -0
package/esm/types/1_chat.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { cleanObject, UNREACHABLE } from "../1_utilities.js";
|
|
1
|
+
import { cleanObject, getColorFromPeerId, UNREACHABLE } from "../1_utilities.js";
|
|
2
2
|
import { types } from "../2_tl.js";
|
|
3
3
|
import { ZERO_CHANNEL_ID } from "../4_constants.js";
|
|
4
4
|
import { constructChatPhoto } from "./0_chat_photo.js";
|
|
5
|
-
import { getColorFromColorId, getColorFromPeerId } from "./0_color.js";
|
|
6
5
|
import { constructRestrictionReason } from "./0_restriction_reason.js";
|
|
7
6
|
export function constructChat(chat) {
|
|
8
7
|
if (chat instanceof types.User) {
|
|
@@ -11,7 +10,7 @@ export function constructChat(chat) {
|
|
|
11
10
|
type: "private",
|
|
12
11
|
isBot: chat.bot || false,
|
|
13
12
|
id,
|
|
14
|
-
color: chat.color !== undefined ?
|
|
13
|
+
color: chat.color !== undefined ? chat.color : getColorFromPeerId(id),
|
|
15
14
|
firstName: chat.firstName || "",
|
|
16
15
|
lastName: chat.lastName,
|
|
17
16
|
isScam: chat.scam || false,
|
|
@@ -49,7 +48,7 @@ export function constructChat(chat) {
|
|
|
49
48
|
if (chat.megagroup) {
|
|
50
49
|
chat_ = {
|
|
51
50
|
id,
|
|
52
|
-
color: chat.color !== undefined ?
|
|
51
|
+
color: chat.color !== undefined ? chat.color : getColorFromPeerId(id),
|
|
53
52
|
type: "supergroup",
|
|
54
53
|
title,
|
|
55
54
|
isScam,
|
|
@@ -63,7 +62,7 @@ export function constructChat(chat) {
|
|
|
63
62
|
const id = ZERO_CHANNEL_ID + -Number(chat.id);
|
|
64
63
|
chat_ = {
|
|
65
64
|
id,
|
|
66
|
-
color: chat.color !== undefined ?
|
|
65
|
+
color: chat.color !== undefined ? chat.color : getColorFromPeerId(id),
|
|
67
66
|
type: "channel",
|
|
68
67
|
title,
|
|
69
68
|
isScam,
|
package/esm/types/1_user.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { ChatPhoto } from "./0_chat_photo.js";
|
|
3
|
-
import { Color } from "./0_color.js";
|
|
4
3
|
/** This object represents a Telegram user or bot. */
|
|
5
4
|
export interface User {
|
|
6
5
|
/** Unique identifier for this user or bot */
|
|
7
6
|
id: number;
|
|
8
|
-
/**
|
|
9
|
-
color:
|
|
7
|
+
/** Identifier of color that can be displayed instead of the user's photo. */
|
|
8
|
+
color: number;
|
|
10
9
|
/** True, if this user is a bot */
|
|
11
10
|
isBot: boolean;
|
|
12
11
|
/** User's or bot's first name */
|
package/esm/types/1_user.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { cleanObject } from "../1_utilities.js";
|
|
1
|
+
import { cleanObject, getColorFromPeerId } from "../1_utilities.js";
|
|
2
2
|
import { types } from "../2_tl.js";
|
|
3
3
|
import { constructChatPhoto } from "./0_chat_photo.js";
|
|
4
|
-
import { getColorFromColorId, getColorFromPeerId } from "./0_color.js";
|
|
5
4
|
export function constructUser(user_) {
|
|
6
5
|
const id = Number(user_.id);
|
|
7
6
|
const user = {
|
|
8
7
|
id,
|
|
9
|
-
color: user_.color !== undefined ?
|
|
8
|
+
color: user_.color !== undefined ? user_.color : getColorFromPeerId(id),
|
|
10
9
|
isBot: user_.bot || false,
|
|
11
10
|
firstName: user_.firstName || "",
|
|
12
11
|
lastName: user_.lastName,
|
|
@@ -158,11 +158,13 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
158
158
|
replyMarkup,
|
|
159
159
|
});
|
|
160
160
|
const title = "title" in result_ ? result_.title : undefined;
|
|
161
|
+
const description = "description" in result_ ? result_.description : undefined;
|
|
161
162
|
if (document != null) {
|
|
162
163
|
return new types.InputBotInlineResult({
|
|
163
164
|
id,
|
|
164
165
|
type,
|
|
165
166
|
title,
|
|
167
|
+
description,
|
|
166
168
|
thumb: thumb == null ? undefined : thumb,
|
|
167
169
|
content: document,
|
|
168
170
|
sendMessage: new types.InputBotInlineMessageMediaAuto({
|
|
@@ -178,6 +180,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
178
180
|
id,
|
|
179
181
|
type,
|
|
180
182
|
title,
|
|
183
|
+
description,
|
|
181
184
|
document: new types.InputDocument({
|
|
182
185
|
id: fileId.params.mediaId,
|
|
183
186
|
accessHash: fileId.params.accessHash,
|
|
@@ -191,6 +194,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
191
194
|
id,
|
|
192
195
|
type,
|
|
193
196
|
title,
|
|
197
|
+
description,
|
|
194
198
|
sendMessage: new types.InputBotInlineMessageMediaGeo({
|
|
195
199
|
geoPoint: new types.InputGeoPoint({
|
|
196
200
|
lat: result_.latitude,
|
|
@@ -209,6 +213,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
209
213
|
id,
|
|
210
214
|
type,
|
|
211
215
|
title,
|
|
216
|
+
description,
|
|
212
217
|
sendMessage: new types.InputBotInlineMessageGame({
|
|
213
218
|
replyMarkup,
|
|
214
219
|
}),
|
|
@@ -223,6 +228,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
223
228
|
id,
|
|
224
229
|
type,
|
|
225
230
|
title,
|
|
231
|
+
description,
|
|
226
232
|
sendMessage: new types.InputBotInlineMessageText({
|
|
227
233
|
message,
|
|
228
234
|
entities,
|
|
@@ -239,6 +245,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
239
245
|
id,
|
|
240
246
|
type,
|
|
241
247
|
title,
|
|
248
|
+
description,
|
|
242
249
|
sendMessage: new types.InputBotInlineMessageMediaVenue({
|
|
243
250
|
geoPoint: new types.InputGeoPoint({ long: result_.longitude, lat: result_.latitude }),
|
|
244
251
|
address: result_.address,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type ColorName = "red" | "orange" | "violet" | "green" | "cyan" | "blue" | "pink" | "combination 1" | "combination 2" | "combination 3" | "combination 4" | "combination 5" | "combination 6" | "combination 7" | "combination 8" | "combination 9" | "combination 10" | "combination 11" | "combination 12" | "combination 13" | "combination 14";
|
|
2
|
+
export declare function getColorFromPeerId(id: number): number;
|
|
3
|
+
export declare function getColorName(id: number): ColorName;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export function getColorFromPeerId(id) {
|
|
2
|
+
id = Number(String(id).replaceAll("-100", "-"));
|
|
3
|
+
if (id < 0) {
|
|
4
|
+
id = -id;
|
|
5
|
+
}
|
|
6
|
+
return Math.floor(id % 7);
|
|
7
|
+
}
|
|
8
|
+
export function getColorName(id) {
|
|
9
|
+
switch (id) {
|
|
10
|
+
case 0:
|
|
11
|
+
return "red";
|
|
12
|
+
case 1:
|
|
13
|
+
return "orange";
|
|
14
|
+
case 2:
|
|
15
|
+
return "violet";
|
|
16
|
+
case 3:
|
|
17
|
+
return "green";
|
|
18
|
+
case 4:
|
|
19
|
+
return "cyan";
|
|
20
|
+
case 5:
|
|
21
|
+
return "blue";
|
|
22
|
+
case 6:
|
|
23
|
+
return "pink";
|
|
24
|
+
case 7:
|
|
25
|
+
return "combination 1";
|
|
26
|
+
case 8:
|
|
27
|
+
return "combination 2";
|
|
28
|
+
case 9:
|
|
29
|
+
return "combination 3";
|
|
30
|
+
case 10:
|
|
31
|
+
return "combination 4";
|
|
32
|
+
case 11:
|
|
33
|
+
return "combination 5";
|
|
34
|
+
case 12:
|
|
35
|
+
return "combination 6";
|
|
36
|
+
case 13:
|
|
37
|
+
return "combination 7";
|
|
38
|
+
case 14:
|
|
39
|
+
return "combination 8";
|
|
40
|
+
case 15:
|
|
41
|
+
return "combination 9";
|
|
42
|
+
case 16:
|
|
43
|
+
return "combination 10";
|
|
44
|
+
case 17:
|
|
45
|
+
return "combination 11";
|
|
46
|
+
case 18:
|
|
47
|
+
return "combination 12";
|
|
48
|
+
case 19:
|
|
49
|
+
return "combination 13";
|
|
50
|
+
case 20:
|
|
51
|
+
return "combination 14";
|
|
52
|
+
default:
|
|
53
|
+
return "blue";
|
|
54
|
+
}
|
|
55
|
+
}
|
package/package.json
CHANGED
package/script/0_deps.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.207.0/assert/mod.js";
|
|
2
|
+
export * as path from "./deps/deno.land/std@0.207.0/path/mod.js";
|
|
3
|
+
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.207.0/encoding/base64.js";
|
|
2
4
|
export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
|
|
3
5
|
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
|
|
4
6
|
export { Mutex, type MutexInterface } from "async-mutex";
|
|
5
7
|
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
|
|
6
8
|
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
|
|
7
9
|
export declare const debug: typeof debug_;
|
|
8
|
-
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.204.0/encoding/base64.js";
|
package/script/0_deps.js
CHANGED
|
@@ -10,12 +10,28 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
13
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
20
|
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
__exportStar(require("./deps/deno.land/std@0.
|
|
29
|
+
exports.debug = exports.Parser = exports.Mutex = exports.gzip = exports.gunzip = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.factorize = exports.ctr256 = exports.encodeBase64 = exports.decodeBase64 = exports.path = void 0;
|
|
30
|
+
__exportStar(require("./deps/deno.land/std@0.207.0/assert/mod.js"), exports);
|
|
31
|
+
exports.path = __importStar(require("./deps/deno.land/std@0.207.0/path/mod.js"));
|
|
32
|
+
var base64_js_1 = require("./deps/deno.land/std@0.207.0/encoding/base64.js");
|
|
33
|
+
Object.defineProperty(exports, "decodeBase64", { enumerable: true, get: function () { return base64_js_1.decodeBase64; } });
|
|
34
|
+
Object.defineProperty(exports, "encodeBase64", { enumerable: true, get: function () { return base64_js_1.encodeBase64; } });
|
|
19
35
|
var mod_js_1 = require("./deps/deno.land/x/tgcrypto@0.3.3/mod.js");
|
|
20
36
|
Object.defineProperty(exports, "ctr256", { enumerable: true, get: function () { return mod_js_1.ctr256; } });
|
|
21
37
|
Object.defineProperty(exports, "factorize", { enumerable: true, get: function () { return mod_js_1.factorize; } });
|
|
@@ -32,6 +48,3 @@ Object.defineProperty(exports, "Parser", { enumerable: true, get: function () {
|
|
|
32
48
|
const mod_js_3 = require("./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js");
|
|
33
49
|
const debug = (v) => (0, mod_js_3.debug)(v);
|
|
34
50
|
exports.debug = debug;
|
|
35
|
-
var base64_js_1 = require("./deps/deno.land/std@0.204.0/encoding/base64.js");
|
|
36
|
-
Object.defineProperty(exports, "decodeBase64", { enumerable: true, get: function () { return base64_js_1.decodeBase64; } });
|
|
37
|
-
Object.defineProperty(exports, "encodeBase64", { enumerable: true, get: function () { return base64_js_1.encodeBase64; } });
|
package/script/1_utilities.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./utilities/0_base64.js";
|
|
2
2
|
export * from "./utilities/0_bigint.js";
|
|
3
3
|
export * from "./utilities/0_buffer.js";
|
|
4
|
+
export * from "./utilities/0_color.js";
|
|
4
5
|
export * from "./utilities/0_control.js";
|
|
5
6
|
export * from "./utilities/0_crypto.js";
|
|
6
7
|
export * from "./utilities/0_hash.js";
|
package/script/1_utilities.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./utilities/0_base64.js"), exports);
|
|
18
18
|
__exportStar(require("./utilities/0_bigint.js"), exports);
|
|
19
19
|
__exportStar(require("./utilities/0_buffer.js"), exports);
|
|
20
|
+
__exportStar(require("./utilities/0_color.js"), exports);
|
|
20
21
|
__exportStar(require("./utilities/0_control.js"), exports);
|
|
21
22
|
__exportStar(require("./utilities/0_crypto.js"), exports);
|
|
22
23
|
__exportStar(require("./utilities/0_hash.js"), exports);
|
package/script/3_types.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from "./types/0_chat_action.js";
|
|
|
4
4
|
export * from "./types/0_chat_administrator_rights.js";
|
|
5
5
|
export * from "./types/0_chat_id.js";
|
|
6
6
|
export * from "./types/0_chat_photo.js";
|
|
7
|
-
export * from "./types/0_color.js";
|
|
8
7
|
export * from "./types/0_contact.js";
|
|
9
8
|
export * from "./types/0_dice.js";
|
|
10
9
|
export * from "./types/0__file_id.js";
|
package/script/3_types.js
CHANGED
|
@@ -20,7 +20,6 @@ __exportStar(require("./types/0_chat_action.js"), exports);
|
|
|
20
20
|
__exportStar(require("./types/0_chat_administrator_rights.js"), exports);
|
|
21
21
|
__exportStar(require("./types/0_chat_id.js"), exports);
|
|
22
22
|
__exportStar(require("./types/0_chat_photo.js"), exports);
|
|
23
|
-
__exportStar(require("./types/0_color.js"), exports);
|
|
24
23
|
__exportStar(require("./types/0_contact.js"), exports);
|
|
25
24
|
__exportStar(require("./types/0_dice.js"), exports);
|
|
26
25
|
__exportStar(require("./types/0__file_id.js"), exports);
|
package/script/4_constants.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
|
|
|
5
5
|
export declare const VECTOR_CONSTRUCTOR = 481674261;
|
|
6
6
|
export declare const INITIAL_DC: DC;
|
|
7
7
|
export declare const LAYER = 166;
|
|
8
|
-
export declare const APP_VERSION = "MTKruto 0.1.
|
|
8
|
+
export declare const APP_VERSION = "MTKruto 0.1.114";
|
|
9
9
|
export declare const DEVICE_MODEL: string;
|
|
10
10
|
export declare const LANG_CODE: string;
|
|
11
11
|
export declare const LANG_PACK = "";
|
package/script/4_constants.js
CHANGED
|
@@ -80,7 +80,7 @@ exports.PUBLIC_KEYS = Object.freeze([
|
|
|
80
80
|
exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
81
81
|
exports.INITIAL_DC = "2";
|
|
82
82
|
exports.LAYER = 166;
|
|
83
|
-
exports.APP_VERSION = "MTKruto 0.1.
|
|
83
|
+
exports.APP_VERSION = "MTKruto 0.1.114";
|
|
84
84
|
// @ts-ignore: lib
|
|
85
85
|
exports.DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
86
86
|
exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/script/5_client.d.ts
CHANGED
package/script/5_client.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./client/2_client_plain.js"), exports);
|
|
18
18
|
__exportStar(require("./client/3_types.js"), exports);
|
|
19
|
-
__exportStar(require("./client/
|
|
19
|
+
__exportStar(require("./client/5_client.js"), exports);
|
|
20
|
+
__exportStar(require("./client/6_composer.js"), exports);
|
|
@@ -3,3 +3,9 @@ export declare const resolve: () => Promise<void>;
|
|
|
3
3
|
export type With<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
4
4
|
export declare function isPtsUpdate(v: types.TypeUpdate | types.TypeUpdates): v is types.UpdateShortMessage | types.UpdateShortChatMessage | types.UpdateShortSentMessage | types.UpdateNewMessage | types.UpdateDeleteMessages | types.UpdateReadHistoryInbox | types.UpdateReadHistoryOutbox | types.UpdatePinnedChannelMessages | types.UpdatePinnedMessages | types.UpdateFolderPeers | types.UpdateChannelWebPage | types.UpdateEditMessage | types.UpdateReadMessagesContents | types.UpdateWebPage;
|
|
5
5
|
export declare function isChannelPtsUpdate(v: types.TypeUpdate | types.TypeUpdates): v is types.UpdateNewChannelMessage | types.UpdateEditChannelMessage | types.UpdateDeleteChannelMessages;
|
|
6
|
+
/**
|
|
7
|
+
* Source to a file. Can be a file ID, file path, URL, or `Uint8Array`.
|
|
8
|
+
*/
|
|
9
|
+
export type FileSource = string | URL | Uint8Array;
|
|
10
|
+
export declare function getFileContents(source: FileSource, fileName?: string): Promise<readonly [Uint8Array, string]>;
|
|
11
|
+
export declare function isHttpUrl(string: string): boolean;
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isChannelPtsUpdate = exports.isPtsUpdate = exports.resolve = void 0;
|
|
26
|
+
exports.isHttpUrl = exports.getFileContents = exports.isChannelPtsUpdate = exports.isPtsUpdate = exports.resolve = void 0;
|
|
27
|
+
const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
28
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
29
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
4
30
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
31
|
const resolve = () => Promise.resolve();
|
|
6
32
|
exports.resolve = resolve;
|
|
@@ -27,3 +53,55 @@ function isChannelPtsUpdate(v) {
|
|
|
27
53
|
v instanceof _2_tl_js_1.types.UpdateDeleteChannelMessages;
|
|
28
54
|
}
|
|
29
55
|
exports.isChannelPtsUpdate = isChannelPtsUpdate;
|
|
56
|
+
async function getFileContents(source, fileName = "") {
|
|
57
|
+
fileName = fileName.trim() || "file";
|
|
58
|
+
let contents;
|
|
59
|
+
if (source instanceof Uint8Array) {
|
|
60
|
+
contents = source;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
let url;
|
|
64
|
+
try {
|
|
65
|
+
url = new URL(source).toString();
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
if (typeof source === "string") {
|
|
69
|
+
let path_;
|
|
70
|
+
if (_0_deps_js_1.path.isAbsolute(source)) {
|
|
71
|
+
path_ = source;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// @ts-ignore: lib
|
|
75
|
+
path_ = _0_deps_js_1.path.join(dntShim.Deno.cwd(), source);
|
|
76
|
+
}
|
|
77
|
+
url = _0_deps_js_1.path.toFileUrl(path_).toString();
|
|
78
|
+
fileName = _0_deps_js_1.path.basename(path_);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const res = await fetch(url);
|
|
85
|
+
if (fileName == "file") {
|
|
86
|
+
const contentType = res.headers.get("content-type");
|
|
87
|
+
if (contentType?.includes("image/png")) {
|
|
88
|
+
fileName += ".png";
|
|
89
|
+
}
|
|
90
|
+
else if (contentType?.includes("image/jpeg")) {
|
|
91
|
+
fileName += ".jpg";
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
contents = await res.arrayBuffer().then((v) => new Uint8Array(v));
|
|
95
|
+
}
|
|
96
|
+
return [contents, fileName];
|
|
97
|
+
}
|
|
98
|
+
exports.getFileContents = getFileContents;
|
|
99
|
+
function isHttpUrl(string) {
|
|
100
|
+
try {
|
|
101
|
+
return new URL(string).protocol.startsWith("http");
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.isHttpUrl = isHttpUrl;
|
|
@@ -37,7 +37,10 @@ export interface ClientParams extends ClientPlainParams {
|
|
|
37
37
|
* Whether to automatically call `start` with no parameters in the first `invoke` call. Defaults to `true`.
|
|
38
38
|
*/
|
|
39
39
|
autoStart?: boolean;
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Whether to use default handlers. Defaults to `true`.
|
|
42
|
+
*/
|
|
43
|
+
defaultHandlers?: boolean;
|
|
41
44
|
}
|
|
42
45
|
export interface AnswerCallbackQueryParams {
|
|
43
46
|
/** A text to be shown to the user. */
|
|
@@ -54,7 +57,7 @@ export interface AuthorizeUserParams<S = string> {
|
|
|
54
57
|
code: S | (() => MaybePromise<S>);
|
|
55
58
|
password: S | ((hint: string | null) => MaybePromise<S>);
|
|
56
59
|
}
|
|
57
|
-
export interface
|
|
60
|
+
export interface SendMessageParams {
|
|
58
61
|
/**
|
|
59
62
|
* The parse mode to use. If not provided, the default parse mode will be used.
|
|
60
63
|
*/
|
|
@@ -223,10 +226,68 @@ export interface SetMyCommandsParams {
|
|
|
223
226
|
scope?: BotCommandScope;
|
|
224
227
|
}
|
|
225
228
|
export type GetMyCommandsParams = SetMyCommandsParams;
|
|
229
|
+
export interface DeleteMessagesParams {
|
|
230
|
+
/** Whether to delete the messages only for this side. */
|
|
231
|
+
onlyForMe?: boolean;
|
|
232
|
+
}
|
|
233
|
+
export interface DeleteMessageParams {
|
|
234
|
+
/** Whether to delete the message only for this side. */
|
|
235
|
+
onlyForMe?: boolean;
|
|
236
|
+
}
|
|
237
|
+
export interface SendPhotoParams {
|
|
238
|
+
/** The file name to assign. */
|
|
239
|
+
fileName?: string;
|
|
240
|
+
/** Size of each upload chunk in bytes. */
|
|
241
|
+
chunkSize?: number;
|
|
242
|
+
/** Upload abort signal. */
|
|
243
|
+
signal?: AbortSignal | null;
|
|
244
|
+
/** The caption of the photo. */
|
|
245
|
+
caption?: string;
|
|
246
|
+
/**
|
|
247
|
+
* The caption's entities.
|
|
248
|
+
*/
|
|
249
|
+
captionEntities?: MessageEntity[];
|
|
250
|
+
/**
|
|
251
|
+
* The parse mode to use for the caption. If not provided, the default parse mode will be used.
|
|
252
|
+
*/
|
|
253
|
+
parseMode?: ParseMode;
|
|
254
|
+
/**
|
|
255
|
+
* Whether to mark the photo as a spoiler.
|
|
256
|
+
*/
|
|
257
|
+
hasSpoiler?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Whether to send the message in a silent way without making a sound on the recipients' clients.
|
|
260
|
+
*/
|
|
261
|
+
disableNotification?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* Whether to protect the contents of the message from copying and forwarding.
|
|
264
|
+
*/
|
|
265
|
+
protectContent?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* The identifier of a message to reply to.
|
|
268
|
+
*/
|
|
269
|
+
replyToMessageId?: number;
|
|
270
|
+
/**
|
|
271
|
+
* The identifier of a thread to send the message to.
|
|
272
|
+
*/
|
|
273
|
+
messageThreadId?: number;
|
|
274
|
+
/**
|
|
275
|
+
* The identifier of the chat to send the message on behalf of. User-only.
|
|
276
|
+
*/
|
|
277
|
+
sendAs?: ChatID;
|
|
278
|
+
/**
|
|
279
|
+
* The reply markup of the message. Bot-only.
|
|
280
|
+
*/
|
|
281
|
+
replyMarkup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
282
|
+
}
|
|
226
283
|
export type ConnectionState = "notConnected" | "updating" | "ready";
|
|
227
284
|
export type AuthorizationState = {
|
|
228
285
|
authorized: boolean;
|
|
229
286
|
};
|
|
287
|
+
export interface ReplyParams {
|
|
288
|
+
/** Whether to quote the message that is to be replied. Enabled by default for non-private chats. */
|
|
289
|
+
quote?: boolean;
|
|
290
|
+
}
|
|
230
291
|
export type FilterableUpdates = "message" | "editedMessage" | "callbackQuery";
|
|
231
292
|
export interface Update {
|
|
232
293
|
message?: Message;
|
|
@@ -237,11 +298,18 @@ export interface Update {
|
|
|
237
298
|
callbackQuery?: CallbackQuery;
|
|
238
299
|
inlineQuery?: InlineQuery;
|
|
239
300
|
}
|
|
240
|
-
export type NextFn = () => Promise<
|
|
241
|
-
export interface Handler<
|
|
242
|
-
(
|
|
301
|
+
export type NextFn<T = void> = () => Promise<T>;
|
|
302
|
+
export interface Handler<C> {
|
|
303
|
+
(ctx: C, next: NextFn): MaybePromise<void>;
|
|
304
|
+
}
|
|
305
|
+
export interface InvokeErrorHandler<C> {
|
|
306
|
+
(ctx: {
|
|
307
|
+
client: C;
|
|
308
|
+
error: unknown;
|
|
309
|
+
function: types.Type | functions.Function<unknown>;
|
|
310
|
+
n: number;
|
|
311
|
+
}, next: NextFn<boolean>): MaybePromise<boolean>;
|
|
243
312
|
}
|
|
244
|
-
export type FilterUpdate<U extends Update, T extends keyof U, F extends keyof NonNullable<U[T]
|
|
245
|
-
[P in T]-?: With<NonNullable<U[T]>, F>;
|
|
313
|
+
export type FilterUpdate<U extends Update, T extends keyof U, F extends (keyof NonNullable<U[T]>) | null> = With<U, T> & Pick<{
|
|
314
|
+
[P in T]-?: F extends keyof NonNullable<U[T]> ? With<NonNullable<U[T]>, F> : NonNullable<U[T]>;
|
|
246
315
|
}, T>;
|
|
247
|
-
export declare const skip: Handler;
|
package/script/client/3_types.js
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FilterableUpdates, FilterUpdate, Update } from "./3_types.js";
|
|
2
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
3
|
+
export type NextFunction = () => Promise<void>;
|
|
4
|
+
export type MiddlewareFn<C extends Update = Update> = (ctx: C, next: NextFunction) => MaybePromise<unknown>;
|
|
5
|
+
export interface MiddlewareObj<C extends Update = Update> {
|
|
6
|
+
middleware: () => MiddlewareFn<C>;
|
|
7
|
+
}
|
|
8
|
+
export type Middleware<C extends Update = Update> = MiddlewareFn<C> | MiddlewareObj<C>;
|
|
9
|
+
export declare function flatten<C extends Update = Update>(mw: Middleware<C>): MiddlewareFn<C>;
|
|
10
|
+
export declare function concat<C extends Update = Update>(left: MiddlewareFn<C>, right: MiddlewareFn<C>): MiddlewareFn<C>;
|
|
11
|
+
export declare const skip: MiddlewareFn;
|
|
12
|
+
export declare class Composer<C extends Update> implements MiddlewareObj<C> {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(...middleware: Middleware<C>[]);
|
|
15
|
+
middleware(): MiddlewareFn<C>;
|
|
16
|
+
use(...middleware: Middleware<C>[]): Composer<C>;
|
|
17
|
+
branch(predicate: (ctx: C) => MaybePromise<boolean>, trueHandler_: Middleware<C>, falseHandler_: Middleware<C>): Composer<C>;
|
|
18
|
+
filter<D extends C>(predicate: (ctx: C) => ctx is D, ...middleware: Middleware<D>[]): Composer<D>;
|
|
19
|
+
filter(predicate: (ctx: C) => MaybePromise<boolean>, ...middleware: Middleware<C>[]): Composer<C>;
|
|
20
|
+
on<T extends keyof Update, F extends keyof NonNullable<Update[T]>>(filter: T extends FilterableUpdates ? T | [T, F, ...F[]] : T, ...middleawre: Middleware<FilterUpdate<C, T, F>>[]): Composer<FilterUpdate<C, T, F>>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _Composer_handle;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Composer = exports.skip = exports.concat = exports.flatten = void 0;
|
|
16
|
+
function flatten(mw) {
|
|
17
|
+
return typeof mw === "function" ? mw : (ctx, next) => mw.middleware()(ctx, next);
|
|
18
|
+
}
|
|
19
|
+
exports.flatten = flatten;
|
|
20
|
+
function concat(left, right) {
|
|
21
|
+
return async (ctx, next) => {
|
|
22
|
+
let called = false;
|
|
23
|
+
await left(ctx, async () => {
|
|
24
|
+
if (called) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
called = true;
|
|
29
|
+
await right(ctx, next);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.concat = concat;
|
|
35
|
+
const skip = (_ctx, next) => next();
|
|
36
|
+
exports.skip = skip;
|
|
37
|
+
class Composer {
|
|
38
|
+
constructor(...middleware) {
|
|
39
|
+
_Composer_handle.set(this, void 0);
|
|
40
|
+
__classPrivateFieldSet(this, _Composer_handle, middleware.length == 0 ? exports.skip : middleware.map(flatten).reduce(concat), "f");
|
|
41
|
+
}
|
|
42
|
+
middleware() {
|
|
43
|
+
return __classPrivateFieldGet(this, _Composer_handle, "f");
|
|
44
|
+
}
|
|
45
|
+
use(...middleware) {
|
|
46
|
+
const composer = new Composer(...middleware);
|
|
47
|
+
__classPrivateFieldSet(this, _Composer_handle, concat(__classPrivateFieldGet(this, _Composer_handle, "f"), flatten(composer)), "f");
|
|
48
|
+
return composer;
|
|
49
|
+
}
|
|
50
|
+
branch(predicate, trueHandler_, falseHandler_) {
|
|
51
|
+
const trueHandler = flatten(trueHandler_);
|
|
52
|
+
const falseHandler = flatten(falseHandler_);
|
|
53
|
+
return this.use(async (upd, next) => {
|
|
54
|
+
if (await predicate(upd)) {
|
|
55
|
+
await trueHandler(upd, next);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
await falseHandler(upd, next);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
filter(predicate, ...middleware) {
|
|
63
|
+
return this.branch(predicate, middleware.length == 0 ? exports.skip : middleware.map(flatten).reduce(concat), exports.skip);
|
|
64
|
+
}
|
|
65
|
+
on(filter, ...middleawre) {
|
|
66
|
+
const type = typeof filter === "string" ? filter : filter[0];
|
|
67
|
+
const keys = Array.isArray(filter) ? filter.slice(1) : [];
|
|
68
|
+
return this.filter((ctx) => {
|
|
69
|
+
if (type in ctx) {
|
|
70
|
+
if (keys.length > 0) {
|
|
71
|
+
for (const key of keys) {
|
|
72
|
+
// deno-lint-ignore ban-ts-comment
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
if (!(key in ctx[type])) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}, ...middleawre);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.Composer = Composer;
|
|
88
|
+
_Composer_handle = new WeakMap();
|