@mtkruto/node 0.1.113 → 0.1.115
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/client/0_utilities.d.ts +6 -0
- package/esm/client/0_utilities.js +53 -0
- package/esm/client/3_types.d.ts +60 -2
- package/esm/client/5_client.d.ts +44 -6
- package/esm/client/5_client.js +170 -42
- 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/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/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/client/0_utilities.d.ts +6 -0
- package/script/client/0_utilities.js +79 -1
- package/script/client/3_types.d.ts +60 -2
- package/script/client/5_client.d.ts +44 -6
- package/script/client/5_client.js +169 -41
- 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/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/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
|
@@ -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;
|
|
@@ -41,6 +41,10 @@ export interface ClientParams extends ClientPlainParams {
|
|
|
41
41
|
* Whether to use default handlers. Defaults to `true`.
|
|
42
42
|
*/
|
|
43
43
|
defaultHandlers?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to ignore outgoing messages. Defaults to `true` for bots, and `false` for users.
|
|
46
|
+
*/
|
|
47
|
+
ignoreOutgoing?: boolean;
|
|
44
48
|
}
|
|
45
49
|
export interface AnswerCallbackQueryParams {
|
|
46
50
|
/** A text to be shown to the user. */
|
|
@@ -57,7 +61,7 @@ export interface AuthorizeUserParams<S = string> {
|
|
|
57
61
|
code: S | (() => MaybePromise<S>);
|
|
58
62
|
password: S | ((hint: string | null) => MaybePromise<S>);
|
|
59
63
|
}
|
|
60
|
-
export interface
|
|
64
|
+
export interface SendMessageParams {
|
|
61
65
|
/**
|
|
62
66
|
* The parse mode to use. If not provided, the default parse mode will be used.
|
|
63
67
|
*/
|
|
@@ -226,11 +230,65 @@ export interface SetMyCommandsParams {
|
|
|
226
230
|
scope?: BotCommandScope;
|
|
227
231
|
}
|
|
228
232
|
export type GetMyCommandsParams = SetMyCommandsParams;
|
|
233
|
+
export interface DeleteMessagesParams {
|
|
234
|
+
/** Whether to delete the messages only for this side. */
|
|
235
|
+
onlyForMe?: boolean;
|
|
236
|
+
}
|
|
237
|
+
export interface DeleteMessageParams {
|
|
238
|
+
/** Whether to delete the message only for this side. */
|
|
239
|
+
onlyForMe?: boolean;
|
|
240
|
+
}
|
|
241
|
+
export interface SendPhotoParams {
|
|
242
|
+
/** The file name to assign. */
|
|
243
|
+
fileName?: string;
|
|
244
|
+
/** Size of each upload chunk in bytes. */
|
|
245
|
+
chunkSize?: number;
|
|
246
|
+
/** Upload abort signal. */
|
|
247
|
+
signal?: AbortSignal | null;
|
|
248
|
+
/** The caption of the photo. */
|
|
249
|
+
caption?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The caption's entities.
|
|
252
|
+
*/
|
|
253
|
+
captionEntities?: MessageEntity[];
|
|
254
|
+
/**
|
|
255
|
+
* The parse mode to use for the caption. If not provided, the default parse mode will be used.
|
|
256
|
+
*/
|
|
257
|
+
parseMode?: ParseMode;
|
|
258
|
+
/**
|
|
259
|
+
* Whether to mark the photo as a spoiler.
|
|
260
|
+
*/
|
|
261
|
+
hasSpoiler?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* Whether to send the message in a silent way without making a sound on the recipients' clients.
|
|
264
|
+
*/
|
|
265
|
+
disableNotification?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Whether to protect the contents of the message from copying and forwarding.
|
|
268
|
+
*/
|
|
269
|
+
protectContent?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* The identifier of a message to reply to.
|
|
272
|
+
*/
|
|
273
|
+
replyToMessageId?: number;
|
|
274
|
+
/**
|
|
275
|
+
* The identifier of a thread to send the message to.
|
|
276
|
+
*/
|
|
277
|
+
messageThreadId?: number;
|
|
278
|
+
/**
|
|
279
|
+
* The identifier of the chat to send the message on behalf of. User-only.
|
|
280
|
+
*/
|
|
281
|
+
sendAs?: ChatID;
|
|
282
|
+
/**
|
|
283
|
+
* The reply markup of the message. Bot-only.
|
|
284
|
+
*/
|
|
285
|
+
replyMarkup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
286
|
+
}
|
|
229
287
|
export type ConnectionState = "notConnected" | "updating" | "ready";
|
|
230
288
|
export type AuthorizationState = {
|
|
231
289
|
authorized: boolean;
|
|
232
290
|
};
|
|
233
|
-
export interface ReplyParams
|
|
291
|
+
export interface ReplyParams {
|
|
234
292
|
/** Whether to quote the message that is to be replied. Enabled by default for non-private chats. */
|
|
235
293
|
quote?: boolean;
|
|
236
294
|
}
|
|
@@ -4,9 +4,9 @@ import { Storage } from "../3_storage.js";
|
|
|
4
4
|
import { DC } from "../3_transport.js";
|
|
5
5
|
import { BotCommand, CallbackQuery, ChatAction, ChatID, InlineQuery, InlineQueryResult, Message, ParseMode, User } from "../3_types.js";
|
|
6
6
|
import { Migrate } from "../4_errors.js";
|
|
7
|
-
import { With } from "./0_utilities.js";
|
|
7
|
+
import { FileSource, With } from "./0_utilities.js";
|
|
8
8
|
import { ClientAbstract } from "./1_client_abstract.js";
|
|
9
|
-
import { AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, ClientParams, DownloadParams, EditMessageParams, FilterableUpdates, FilterUpdate, ForwardMessagesParams, GetMyCommandsParams, InvokeErrorHandler, ReplyParams,
|
|
9
|
+
import { AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, ClientParams, DeleteMessageParams, DeleteMessagesParams, DownloadParams, EditMessageParams, FilterableUpdates, FilterUpdate, ForwardMessagesParams, GetMyCommandsParams, InvokeErrorHandler, ReplyParams, SendMessageParams, SendPhotoParams, SendPollParams, SetMyCommandsParams, Update, UploadParams } from "./3_types.js";
|
|
10
10
|
import { Composer, Middleware } from "./4_composer.js";
|
|
11
11
|
declare const getEntity: unique symbol;
|
|
12
12
|
declare const getStickerSetName: unique symbol;
|
|
@@ -24,9 +24,15 @@ export interface Context extends Update {
|
|
|
24
24
|
/** Resolves to `effectiveMessage?.senderChat`. */
|
|
25
25
|
senderChat: this["msg"] extends never ? never : this["msg"]["senderChat"];
|
|
26
26
|
/** Reply the received message with a text message. */
|
|
27
|
-
reply: (text: string, params?: ReplyParams) => Promise<With<Message, "text">>;
|
|
27
|
+
reply: (text: string, params?: Omit<SendMessageParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "text">>;
|
|
28
28
|
/** Reply the received message with a poll. */
|
|
29
|
-
replyPoll: (question: string, options: [string, string, ...string[]], params?: SendPollParams) => Promise<With<Message, "poll">>;
|
|
29
|
+
replyPoll: (question: string, options: [string, string, ...string[]], params?: Omit<SendPollParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "poll">>;
|
|
30
|
+
/** Reply the received message with a photo. */
|
|
31
|
+
replyPhoto: (photo: FileSource, params?: Omit<SendPhotoParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "photo">>;
|
|
32
|
+
/** Delete the received message. */
|
|
33
|
+
delete: () => Promise<void>;
|
|
34
|
+
/** Forward the received message. */
|
|
35
|
+
forward: (to: ChatID, params?: ForwardMessagesParams) => Promise<this["msg"]>;
|
|
30
36
|
/** Send a chat action to the chat which the message was received from. */
|
|
31
37
|
sendChatAction: (action: ChatAction, params?: {
|
|
32
38
|
messageThreadId?: number;
|
|
@@ -41,6 +47,14 @@ export interface Context extends Update {
|
|
|
41
47
|
getMessage: (messageId: number) => Promise<Omit<Message, "replyToMessage"> | null>;
|
|
42
48
|
/** Retrieve multiple messages of the chat which the message was received from. */
|
|
43
49
|
getMessages: (messageIds: number[]) => Promise<Omit<Message, "replyToMessage">[]>;
|
|
50
|
+
/** Forward a message of the chat which the message was received from. */
|
|
51
|
+
forwardMessage: (to: ChatID, messageId: number, params?: ForwardMessagesParams) => Promise<Message>;
|
|
52
|
+
/** Forward multiple messages of the chat which the message was received from. */
|
|
53
|
+
forwardMessages: (to: ChatID, messageIds: number[], params?: ForwardMessagesParams) => Promise<Message[]>;
|
|
54
|
+
/** Delete a message in the chat which the message was received from. */
|
|
55
|
+
deleteMessage: (messageId: number, params?: DeleteMessagesParams) => Promise<void>;
|
|
56
|
+
/** Delete multiple messages in the chat which the message was received from. */
|
|
57
|
+
deleteMessages: (messageIds: number[], params?: DeleteMessagesParams) => Promise<void>;
|
|
44
58
|
toJSON: () => Update;
|
|
45
59
|
}
|
|
46
60
|
export declare function skipInvoke<C extends Context>(): InvokeErrorHandler<Client<C>>;
|
|
@@ -121,7 +135,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
121
135
|
* Alias for `invoke` with its second parameter being `true`.
|
|
122
136
|
*/
|
|
123
137
|
send<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<void>;
|
|
124
|
-
checkGap(pts: number, ptsCount: number
|
|
138
|
+
checkGap(pts: number, ptsCount: number): Promise<void>;
|
|
125
139
|
getUserAccessHash(userId: bigint): Promise<bigint>;
|
|
126
140
|
getInputPeer(id: ChatID): Promise<types.InputPeerChat | types.InputPeerUser | types.InputPeerChannel>;
|
|
127
141
|
private [getEntity];
|
|
@@ -136,7 +150,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
136
150
|
* @param text The message's text.
|
|
137
151
|
* @returns The sent text message.
|
|
138
152
|
*/
|
|
139
|
-
sendMessage(chatId: ChatID, text: string, params?:
|
|
153
|
+
sendMessage(chatId: ChatID, text: string, params?: SendMessageParams): Promise<With<Message, "text">>;
|
|
140
154
|
/**
|
|
141
155
|
* Edit a message's text.
|
|
142
156
|
*
|
|
@@ -322,5 +336,29 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
322
336
|
getMyShortDescription(params?: {
|
|
323
337
|
languageCode?: string;
|
|
324
338
|
}): Promise<string>;
|
|
339
|
+
/**
|
|
340
|
+
* Delete multiple messages.
|
|
341
|
+
*
|
|
342
|
+
* @method
|
|
343
|
+
* @param chatId The chat that contains the messages.
|
|
344
|
+
* @param messageIds The identifier of the messages to delete.
|
|
345
|
+
*/
|
|
346
|
+
deleteMessages(chatId: ChatID, messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
|
|
347
|
+
/**
|
|
348
|
+
* Delete a single message.
|
|
349
|
+
*
|
|
350
|
+
* @method
|
|
351
|
+
* @param chatId The chat that contains the message.
|
|
352
|
+
* @param messageId The identifier of the message to delete.
|
|
353
|
+
*/
|
|
354
|
+
deleteMessage(chatId: ChatID, messageId: number, params?: DeleteMessageParams): Promise<void>;
|
|
355
|
+
/**
|
|
356
|
+
* Send a photo.
|
|
357
|
+
*
|
|
358
|
+
* @method
|
|
359
|
+
* @param chatId The chat to send the photo to.
|
|
360
|
+
* @param photo The photo to send.
|
|
361
|
+
*/
|
|
362
|
+
sendPhoto(chatId: ChatID, photo: FileSource, params?: SendPhotoParams): Promise<With<Message, "photo">>;
|
|
325
363
|
}
|
|
326
364
|
export {};
|
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
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
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkChannelGap, _Client_processUpdates, _Client_setUpdateStateDate, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
|
|
13
|
+
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkChannelGap, _Client_processUpdates, _Client_setUpdateStateDate, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.Client = exports.ConnectionError = exports.restartAuth = exports.skipInvoke = exports.handleMigrationError = void 0;
|
|
16
16
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
@@ -124,6 +124,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
124
124
|
});
|
|
125
125
|
_Client_publicKeys.set(this, void 0);
|
|
126
126
|
_Client_autoStart.set(this, void 0);
|
|
127
|
+
_Client_ignoreOutgoing.set(this, void 0);
|
|
127
128
|
_Client_constructContext.set(this, (update) => {
|
|
128
129
|
const msg = update.message ?? update.editedMessage ?? update.callbackQuery?.message;
|
|
129
130
|
const mustGetMsg = () => {
|
|
@@ -137,6 +138,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
137
138
|
const chat = msg?.chat;
|
|
138
139
|
const from = update.callbackQuery?.from ?? update.inlineQuery?.from ?? update.message?.from ?? update.editedMessage?.from;
|
|
139
140
|
const senderChat = msg?.senderChat;
|
|
141
|
+
const getReplyToMessageId = (quote, effectiveMessage) => {
|
|
142
|
+
const shouldQuote = quote === undefined ? effectiveMessage.chat.type != "private" : quote;
|
|
143
|
+
const replyToMessageId = shouldQuote ? effectiveMessage.id : undefined;
|
|
144
|
+
return replyToMessageId;
|
|
145
|
+
};
|
|
140
146
|
return {
|
|
141
147
|
...update,
|
|
142
148
|
client: this,
|
|
@@ -146,12 +152,26 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
146
152
|
senderChat,
|
|
147
153
|
reply: (text, params) => {
|
|
148
154
|
const effectiveMessage = mustGetMsg();
|
|
149
|
-
const
|
|
150
|
-
return this.sendMessage(effectiveMessage.chat.id, text, { ...params, replyToMessageId
|
|
155
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
156
|
+
return this.sendMessage(effectiveMessage.chat.id, text, { ...params, replyToMessageId });
|
|
151
157
|
},
|
|
152
158
|
replyPoll: (question, options, params) => {
|
|
153
159
|
const effectiveMessage = mustGetMsg();
|
|
154
|
-
|
|
160
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
161
|
+
return this.sendPoll(effectiveMessage.chat.id, question, options, { ...params, replyToMessageId });
|
|
162
|
+
},
|
|
163
|
+
replyPhoto: (photo, params) => {
|
|
164
|
+
const effectiveMessage = mustGetMsg();
|
|
165
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
166
|
+
return this.sendPhoto(effectiveMessage.chat.id, photo, { ...params, replyToMessageId });
|
|
167
|
+
},
|
|
168
|
+
delete: () => {
|
|
169
|
+
const effectiveMessage = mustGetMsg();
|
|
170
|
+
return this.deleteMessage(effectiveMessage.chat.id, effectiveMessage.id);
|
|
171
|
+
},
|
|
172
|
+
forward: (to, params) => {
|
|
173
|
+
const effectiveMessage = mustGetMsg();
|
|
174
|
+
return this.forwardMessage(effectiveMessage.chat.id, to, effectiveMessage.id, params);
|
|
155
175
|
},
|
|
156
176
|
answerCallbackQuery: (params) => {
|
|
157
177
|
const { callbackQuery } = update;
|
|
@@ -183,6 +203,22 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
183
203
|
const effectiveMessage = mustGetMsg();
|
|
184
204
|
return this.getMessages(effectiveMessage.chat.id, messageIds);
|
|
185
205
|
},
|
|
206
|
+
forwardMessage: (to, messageId, params) => {
|
|
207
|
+
const effectiveMessage = mustGetMsg();
|
|
208
|
+
return this.forwardMessage(effectiveMessage.chat.id, to, messageId, params);
|
|
209
|
+
},
|
|
210
|
+
forwardMessages: (to, messageIds, params) => {
|
|
211
|
+
const effectiveMessage = mustGetMsg();
|
|
212
|
+
return this.forwardMessages(effectiveMessage.chat.id, to, messageIds, params);
|
|
213
|
+
},
|
|
214
|
+
deleteMessage: (messageId, params) => {
|
|
215
|
+
const effectiveMessage = mustGetMsg();
|
|
216
|
+
return this.deleteMessage(effectiveMessage.chat.id, messageId, params);
|
|
217
|
+
},
|
|
218
|
+
deleteMessages: (messageIds, params) => {
|
|
219
|
+
const effectiveMessage = mustGetMsg();
|
|
220
|
+
return this.deleteMessages(effectiveMessage.chat.id, messageIds, params);
|
|
221
|
+
},
|
|
186
222
|
get toJSON() {
|
|
187
223
|
return () => update;
|
|
188
224
|
},
|
|
@@ -262,6 +298,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
262
298
|
this.systemVersion = params?.systemVersion ?? _4_constants_js_1.SYSTEM_VERSION;
|
|
263
299
|
__classPrivateFieldSet(this, _Client_publicKeys, params?.publicKeys, "f");
|
|
264
300
|
__classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
|
|
301
|
+
__classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
|
|
265
302
|
if (params?.defaultHandlers ?? true) {
|
|
266
303
|
this.on("connectionState", ({ connectionState }, next) => {
|
|
267
304
|
(0, _1_utilities_js_1.drop)((async () => {
|
|
@@ -371,7 +408,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
371
408
|
release();
|
|
372
409
|
}
|
|
373
410
|
}
|
|
374
|
-
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
411
|
+
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
375
412
|
__classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
|
|
376
413
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { connectionState }), _0_utilities_js_1.resolve);
|
|
377
414
|
});
|
|
@@ -609,24 +646,19 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
609
646
|
send(function_) {
|
|
610
647
|
return this.invoke(function_, true);
|
|
611
648
|
}
|
|
612
|
-
async checkGap(pts, ptsCount
|
|
649
|
+
async checkGap(pts, ptsCount) {
|
|
613
650
|
const localState = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
614
651
|
if (localState.pts + ptsCount < pts) {
|
|
615
|
-
|
|
616
|
-
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
617
|
-
}
|
|
618
|
-
else {
|
|
619
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "processUpdates");
|
|
620
|
-
}
|
|
652
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "processUpdates");
|
|
621
653
|
}
|
|
622
654
|
}
|
|
623
655
|
async getUserAccessHash(userId) {
|
|
624
656
|
const users = await this.invoke(new _2_tl_js_1.functions.UsersGetUsers({ id: [new _2_tl_js_1.types.InputUser({ userId, accessHash: 0n })] }));
|
|
625
|
-
return users[0][_2_tl_js_1.as](_2_tl_js_1.types.User).accessHash ?? 0n;
|
|
657
|
+
return users[0]?.[_2_tl_js_1.as](_2_tl_js_1.types.User).accessHash ?? 0n;
|
|
626
658
|
}
|
|
627
659
|
async getInputPeer(id) {
|
|
628
660
|
const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
|
|
629
|
-
if (inputPeer instanceof _2_tl_js_1.types.InputPeerUser || inputPeer instanceof _2_tl_js_1.types.InputPeerChannel && inputPeer.accessHash == 0n && await this.storage.getAccountType() == "bot") {
|
|
661
|
+
if ((inputPeer instanceof _2_tl_js_1.types.InputPeerUser || inputPeer instanceof _2_tl_js_1.types.InputPeerChannel && inputPeer.accessHash == 0n) && await this.storage.getAccountType() == "bot") {
|
|
630
662
|
if ("channelId" in inputPeer) {
|
|
631
663
|
inputPeer.accessHash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChannelAccessHash).call(this, inputPeer.channelId);
|
|
632
664
|
}
|
|
@@ -693,7 +725,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
693
725
|
}
|
|
694
726
|
dRecv("received %s", body.constructor.name);
|
|
695
727
|
if (body instanceof _2_tl_js_1.types._TypeUpdates || body instanceof _2_tl_js_1.types._TypeUpdate) {
|
|
696
|
-
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(() => __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, body));
|
|
728
|
+
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(() => __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, body, true));
|
|
697
729
|
}
|
|
698
730
|
else if (body instanceof _2_tl_js_1.types.NewSessionCreated) {
|
|
699
731
|
__classPrivateFieldGet(this, _Client_state, "f").salt = body.serverSalt;
|
|
@@ -725,7 +757,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
725
757
|
};
|
|
726
758
|
if (result instanceof _2_tl_js_1.types._TypeUpdates || result instanceof _2_tl_js_1.types._TypeUpdate) {
|
|
727
759
|
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(async () => {
|
|
728
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, result);
|
|
760
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, result, true);
|
|
729
761
|
resolvePromise();
|
|
730
762
|
});
|
|
731
763
|
}
|
|
@@ -881,20 +913,15 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
881
913
|
}
|
|
882
914
|
}
|
|
883
915
|
}
|
|
884
|
-
}, _Client_checkChannelGap = async function _Client_checkChannelGap(channelId, pts, ptsCount
|
|
916
|
+
}, _Client_checkChannelGap = async function _Client_checkChannelGap(channelId, pts, ptsCount) {
|
|
885
917
|
let localPts = await this.storage.getChannelPts(channelId);
|
|
886
918
|
if (!localPts) {
|
|
887
919
|
localPts = pts - ptsCount;
|
|
888
920
|
}
|
|
889
921
|
if (localPts + ptsCount < pts) {
|
|
890
|
-
|
|
891
|
-
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
892
|
-
}
|
|
893
|
-
else {
|
|
894
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, channelId, "processUpdates");
|
|
895
|
-
}
|
|
922
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, channelId, "processUpdates");
|
|
896
923
|
}
|
|
897
|
-
}, _Client_processUpdates = async function _Client_processUpdates(updates_,
|
|
924
|
+
}, _Client_processUpdates = async function _Client_processUpdates(updates_, checkGap) {
|
|
898
925
|
/// First, individual updates (Update[1]) and updateShort* are extracted from Updates.[2]
|
|
899
926
|
///
|
|
900
927
|
/// If an updatesTooLong[3] was received, an update gap recovery is initiated and no further action will be taken.
|
|
@@ -936,7 +963,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
936
963
|
if (update.pts == 0) {
|
|
937
964
|
continue;
|
|
938
965
|
}
|
|
939
|
-
|
|
966
|
+
if (checkGap) {
|
|
967
|
+
await this.checkGap(update.pts, update.ptsCount);
|
|
968
|
+
}
|
|
940
969
|
localState ??= await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
941
970
|
originalPts ??= localState.pts;
|
|
942
971
|
if (localState.pts + update.ptsCount > update.pts) {
|
|
@@ -952,7 +981,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
952
981
|
}
|
|
953
982
|
const ptsCount = update.ptsCount;
|
|
954
983
|
const channelId = update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage ? update.message.peerId[_2_tl_js_1.as](_2_tl_js_1.types.PeerChannel).channelId : update.channelId;
|
|
955
|
-
|
|
984
|
+
if (checkGap) {
|
|
985
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_checkChannelGap).call(this, channelId, update.pts, ptsCount);
|
|
986
|
+
}
|
|
956
987
|
let currentPts = channelPtsMap.get(channelId);
|
|
957
988
|
if (currentPts === undefined) {
|
|
958
989
|
currentPts = await this.storage.getChannelPts(channelId);
|
|
@@ -966,14 +997,6 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
966
997
|
}
|
|
967
998
|
}
|
|
968
999
|
}
|
|
969
|
-
if (!assertNoGap) {
|
|
970
|
-
if (localState != null && originalPts != null && localState.pts != originalPts) {
|
|
971
|
-
await this.storage.setState(localState);
|
|
972
|
-
}
|
|
973
|
-
for (const [channelId, pts] of channelPtsMap.entries()) {
|
|
974
|
-
await this.storage.setChannelPts(channelId, pts);
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
1000
|
/// We process the updates when we are sure there is no gap.
|
|
978
1001
|
if (updates_ instanceof _2_tl_js_1.types.Updates || updates_ instanceof _2_tl_js_1.types.UpdatesCombined) {
|
|
979
1002
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, updates_.chats);
|
|
@@ -1052,10 +1075,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1052
1075
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1053
1076
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1054
1077
|
for (const message of difference.newMessages) {
|
|
1055
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewMessage({ message, pts: 0, ptsCount: 0 }),
|
|
1078
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewMessage({ message, pts: 0, ptsCount: 0 }), false);
|
|
1056
1079
|
}
|
|
1057
1080
|
for (const update of difference.otherUpdates) {
|
|
1058
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update,
|
|
1081
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1059
1082
|
}
|
|
1060
1083
|
if (difference instanceof _2_tl_js_1.types.UpdatesDifference) {
|
|
1061
1084
|
await this.storage.setState(difference.state);
|
|
@@ -1103,10 +1126,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1103
1126
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1104
1127
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1105
1128
|
for (const message of difference.newMessages) {
|
|
1106
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, ptsCount: 0 }),
|
|
1129
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, ptsCount: 0 }), false);
|
|
1107
1130
|
}
|
|
1108
1131
|
for (const update of difference.otherUpdates) {
|
|
1109
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update,
|
|
1132
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1110
1133
|
}
|
|
1111
1134
|
await this.storage.setChannelPts(channelId, difference.pts);
|
|
1112
1135
|
dGapC("recovered from update gap [%o, %s]", channelId, source);
|
|
@@ -1118,7 +1141,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1118
1141
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1119
1142
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1120
1143
|
for (const message of difference.messages) {
|
|
1121
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, ptsCount: 0 }),
|
|
1144
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, ptsCount: 0 }), false);
|
|
1122
1145
|
}
|
|
1123
1146
|
const pts_ = difference.dialog[_2_tl_js_1.as](_2_tl_js_1.types.Dialog).pts;
|
|
1124
1147
|
if (pts_ != undefined) {
|
|
@@ -1915,6 +1938,104 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1915
1938
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "getMyShortDescription");
|
|
1916
1939
|
return await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getMyInfo).call(this, params?.languageCode).then((v) => v.about);
|
|
1917
1940
|
}
|
|
1941
|
+
/**
|
|
1942
|
+
* Delete multiple messages.
|
|
1943
|
+
*
|
|
1944
|
+
* @method
|
|
1945
|
+
* @param chatId The chat that contains the messages.
|
|
1946
|
+
* @param messageIds The identifier of the messages to delete.
|
|
1947
|
+
*/
|
|
1948
|
+
async deleteMessages(chatId, messageIds, params) {
|
|
1949
|
+
const peer = await this.getInputPeer(chatId);
|
|
1950
|
+
if (peer instanceof _2_tl_js_1.types.InputPeerChannel) {
|
|
1951
|
+
await this.invoke(new _2_tl_js_1.functions.ChannelsDeleteMessages({ channel: new _2_tl_js_1.types.InputChannel(peer), id: messageIds }));
|
|
1952
|
+
}
|
|
1953
|
+
else {
|
|
1954
|
+
await this.invoke(new _2_tl_js_1.functions.MessagesDeleteMessages({ id: messageIds, revoke: params?.onlyForMe ? undefined : true }));
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* Delete a single message.
|
|
1959
|
+
*
|
|
1960
|
+
* @method
|
|
1961
|
+
* @param chatId The chat that contains the message.
|
|
1962
|
+
* @param messageId The identifier of the message to delete.
|
|
1963
|
+
*/
|
|
1964
|
+
async deleteMessage(chatId, messageId, params) {
|
|
1965
|
+
await this.deleteMessages(chatId, [messageId], params);
|
|
1966
|
+
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Send a photo.
|
|
1969
|
+
*
|
|
1970
|
+
* @method
|
|
1971
|
+
* @param chatId The chat to send the photo to.
|
|
1972
|
+
* @param photo The photo to send.
|
|
1973
|
+
*/
|
|
1974
|
+
async sendPhoto(chatId, photo, params) {
|
|
1975
|
+
let media = null;
|
|
1976
|
+
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
1977
|
+
if (typeof photo === "string") {
|
|
1978
|
+
let fileId = null;
|
|
1979
|
+
try {
|
|
1980
|
+
fileId = _3_types_js_1.FileID.decode(photo);
|
|
1981
|
+
}
|
|
1982
|
+
catch (err) {
|
|
1983
|
+
d("fileId: %o", err);
|
|
1984
|
+
}
|
|
1985
|
+
if (fileId != null) {
|
|
1986
|
+
if (fileId.fileType != _3_types_js_1.FileType.Photo) {
|
|
1987
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1988
|
+
}
|
|
1989
|
+
if (fileId.params.mediaId == undefined || fileId.params.accessHash == undefined || fileId.params.fileReference == undefined) {
|
|
1990
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1991
|
+
}
|
|
1992
|
+
media = new _2_tl_js_1.types.InputMediaPhoto({
|
|
1993
|
+
id: new _2_tl_js_1.types.InputPhoto({
|
|
1994
|
+
id: fileId.params.mediaId,
|
|
1995
|
+
accessHash: fileId.params.accessHash,
|
|
1996
|
+
fileReference: fileId.params.fileReference,
|
|
1997
|
+
}),
|
|
1998
|
+
spoiler,
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
if (media == null) {
|
|
2003
|
+
if (typeof photo === "string" && (0, _0_utilities_js_1.isHttpUrl)(photo)) {
|
|
2004
|
+
media = new _2_tl_js_1.types.InputMediaPhotoExternal({ url: photo, spoiler });
|
|
2005
|
+
}
|
|
2006
|
+
else {
|
|
2007
|
+
const [contents, fileName] = await (0, _0_utilities_js_1.getFileContents)(photo);
|
|
2008
|
+
const file = await this.upload(contents, { fileName, chunkSize: params?.chunkSize, signal: params?.signal });
|
|
2009
|
+
media = new _2_tl_js_1.types.InputMediaUploadedPhoto({ file, spoiler });
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
const peer = await this.getInputPeer(chatId);
|
|
2013
|
+
const randomId = (0, _1_utilities_js_1.getRandomId)();
|
|
2014
|
+
const silent = params?.disableNotification ? true : undefined;
|
|
2015
|
+
const noforwards = params?.protectContent ? true : undefined;
|
|
2016
|
+
const replyToMsgId = params?.replyToMessageId;
|
|
2017
|
+
const topMsgId = params?.messageThreadId;
|
|
2018
|
+
const sendAs = params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
|
|
2019
|
+
const replyMarkup = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params);
|
|
2020
|
+
const caption_ = params?.caption;
|
|
2021
|
+
const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
2022
|
+
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
2023
|
+
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
2024
|
+
const result = await this.invoke(new _2_tl_js_1.functions.MessagesSendMedia({
|
|
2025
|
+
peer,
|
|
2026
|
+
randomId,
|
|
2027
|
+
silent,
|
|
2028
|
+
noforwards,
|
|
2029
|
+
replyMarkup,
|
|
2030
|
+
replyTo: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ replyToMsgId, topMsgId }) : undefined,
|
|
2031
|
+
sendAs,
|
|
2032
|
+
media,
|
|
2033
|
+
message: caption ?? "",
|
|
2034
|
+
entities: captionEntities,
|
|
2035
|
+
}));
|
|
2036
|
+
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
2037
|
+
return __classPrivateFieldGet(Client, _a, "m", _Client_assertMsgHas).call(Client, message, "photo");
|
|
2038
|
+
}
|
|
1918
2039
|
}
|
|
1919
2040
|
exports.Client = Client;
|
|
1920
2041
|
_a = Client, _Client_handleUpdate =
|
|
@@ -1975,8 +2096,15 @@ async function _Client_handleUpdate(update) {
|
|
|
1975
2096
|
update instanceof _2_tl_js_1.types.UpdateEditChannelMessage) {
|
|
1976
2097
|
const key = update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage ? "message" : "editedMessage";
|
|
1977
2098
|
if (!(update.message instanceof _2_tl_js_1.types.MessageEmpty)) {
|
|
1978
|
-
const
|
|
1979
|
-
|
|
2099
|
+
const isOutgoing = update.message.out;
|
|
2100
|
+
let shouldIgnore = isOutgoing ? (await this.storage.getAccountType()) == "user" ? false : true : false;
|
|
2101
|
+
if (__classPrivateFieldGet(this, _Client_ignoreOutgoing, "f") != null && isOutgoing) {
|
|
2102
|
+
shouldIgnore = __classPrivateFieldGet(this, _Client_ignoreOutgoing, "f");
|
|
2103
|
+
}
|
|
2104
|
+
if (!shouldIgnore) {
|
|
2105
|
+
const message = await (0, _3_types_js_1.constructMessage)(update.message, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this));
|
|
2106
|
+
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { [key]: message }), _0_utilities_js_1.resolve);
|
|
2107
|
+
}
|
|
1980
2108
|
}
|
|
1981
2109
|
}
|
|
1982
2110
|
if (update instanceof _2_tl_js_1.types.UpdateDeleteMessages) {
|