@mtkruto/node 0.1.113 → 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/client/0_utilities.d.ts +6 -0
- package/esm/client/0_utilities.js +53 -0
- package/esm/client/3_types.d.ts +56 -2
- package/esm/client/5_client.d.ts +43 -5
- package/esm/client/5_client.js +137 -4
- 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 +56 -2
- package/script/client/5_client.d.ts +43 -5
- package/script/client/5_client.js +136 -3
- 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
|
@@ -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];
|
|
@@ -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;
|
|
@@ -57,7 +57,7 @@ export interface AuthorizeUserParams<S = string> {
|
|
|
57
57
|
code: S | (() => MaybePromise<S>);
|
|
58
58
|
password: S | ((hint: string | null) => MaybePromise<S>);
|
|
59
59
|
}
|
|
60
|
-
export interface
|
|
60
|
+
export interface SendMessageParams {
|
|
61
61
|
/**
|
|
62
62
|
* The parse mode to use. If not provided, the default parse mode will be used.
|
|
63
63
|
*/
|
|
@@ -226,11 +226,65 @@ export interface SetMyCommandsParams {
|
|
|
226
226
|
scope?: BotCommandScope;
|
|
227
227
|
}
|
|
228
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
|
+
}
|
|
229
283
|
export type ConnectionState = "notConnected" | "updating" | "ready";
|
|
230
284
|
export type AuthorizationState = {
|
|
231
285
|
authorized: boolean;
|
|
232
286
|
};
|
|
233
|
-
export interface ReplyParams
|
|
287
|
+
export interface ReplyParams {
|
|
234
288
|
/** Whether to quote the message that is to be replied. Enabled by default for non-private chats. */
|
|
235
289
|
quote?: boolean;
|
|
236
290
|
}
|
|
@@ -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>>;
|
|
@@ -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 {};
|
|
@@ -137,6 +137,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
137
137
|
const chat = msg?.chat;
|
|
138
138
|
const from = update.callbackQuery?.from ?? update.inlineQuery?.from ?? update.message?.from ?? update.editedMessage?.from;
|
|
139
139
|
const senderChat = msg?.senderChat;
|
|
140
|
+
const getReplyToMessageId = (quote, effectiveMessage) => {
|
|
141
|
+
const shouldQuote = quote === undefined ? effectiveMessage.chat.type != "private" : quote;
|
|
142
|
+
const replyToMessageId = shouldQuote ? effectiveMessage.id : undefined;
|
|
143
|
+
return replyToMessageId;
|
|
144
|
+
};
|
|
140
145
|
return {
|
|
141
146
|
...update,
|
|
142
147
|
client: this,
|
|
@@ -146,12 +151,26 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
146
151
|
senderChat,
|
|
147
152
|
reply: (text, params) => {
|
|
148
153
|
const effectiveMessage = mustGetMsg();
|
|
149
|
-
const
|
|
150
|
-
return this.sendMessage(effectiveMessage.chat.id, text, { ...params, replyToMessageId
|
|
154
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
155
|
+
return this.sendMessage(effectiveMessage.chat.id, text, { ...params, replyToMessageId });
|
|
151
156
|
},
|
|
152
157
|
replyPoll: (question, options, params) => {
|
|
153
158
|
const effectiveMessage = mustGetMsg();
|
|
154
|
-
|
|
159
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
160
|
+
return this.sendPoll(effectiveMessage.chat.id, question, options, { ...params, replyToMessageId });
|
|
161
|
+
},
|
|
162
|
+
replyPhoto: (photo, params) => {
|
|
163
|
+
const effectiveMessage = mustGetMsg();
|
|
164
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
165
|
+
return this.sendPhoto(effectiveMessage.chat.id, photo, { ...params, replyToMessageId });
|
|
166
|
+
},
|
|
167
|
+
delete: () => {
|
|
168
|
+
const effectiveMessage = mustGetMsg();
|
|
169
|
+
return this.deleteMessage(effectiveMessage.chat.id, effectiveMessage.id);
|
|
170
|
+
},
|
|
171
|
+
forward: (to, params) => {
|
|
172
|
+
const effectiveMessage = mustGetMsg();
|
|
173
|
+
return this.forwardMessage(effectiveMessage.chat.id, to, effectiveMessage.id, params);
|
|
155
174
|
},
|
|
156
175
|
answerCallbackQuery: (params) => {
|
|
157
176
|
const { callbackQuery } = update;
|
|
@@ -183,6 +202,22 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
183
202
|
const effectiveMessage = mustGetMsg();
|
|
184
203
|
return this.getMessages(effectiveMessage.chat.id, messageIds);
|
|
185
204
|
},
|
|
205
|
+
forwardMessage: (to, messageId, params) => {
|
|
206
|
+
const effectiveMessage = mustGetMsg();
|
|
207
|
+
return this.forwardMessage(effectiveMessage.chat.id, to, messageId, params);
|
|
208
|
+
},
|
|
209
|
+
forwardMessages: (to, messageIds, params) => {
|
|
210
|
+
const effectiveMessage = mustGetMsg();
|
|
211
|
+
return this.forwardMessages(effectiveMessage.chat.id, to, messageIds, params);
|
|
212
|
+
},
|
|
213
|
+
deleteMessage: (messageId, params) => {
|
|
214
|
+
const effectiveMessage = mustGetMsg();
|
|
215
|
+
return this.deleteMessage(effectiveMessage.chat.id, messageId, params);
|
|
216
|
+
},
|
|
217
|
+
deleteMessages: (messageIds, params) => {
|
|
218
|
+
const effectiveMessage = mustGetMsg();
|
|
219
|
+
return this.deleteMessages(effectiveMessage.chat.id, messageIds, params);
|
|
220
|
+
},
|
|
186
221
|
get toJSON() {
|
|
187
222
|
return () => update;
|
|
188
223
|
},
|
|
@@ -1915,6 +1950,104 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1915
1950
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "getMyShortDescription");
|
|
1916
1951
|
return await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getMyInfo).call(this, params?.languageCode).then((v) => v.about);
|
|
1917
1952
|
}
|
|
1953
|
+
/**
|
|
1954
|
+
* Delete multiple messages.
|
|
1955
|
+
*
|
|
1956
|
+
* @method
|
|
1957
|
+
* @param chatId The chat that contains the messages.
|
|
1958
|
+
* @param messageIds The identifier of the messages to delete.
|
|
1959
|
+
*/
|
|
1960
|
+
async deleteMessages(chatId, messageIds, params) {
|
|
1961
|
+
const peer = await this.getInputPeer(chatId);
|
|
1962
|
+
if (peer instanceof _2_tl_js_1.types.InputPeerChannel) {
|
|
1963
|
+
await this.invoke(new _2_tl_js_1.functions.ChannelsDeleteMessages({ channel: new _2_tl_js_1.types.InputChannel(peer), id: messageIds }));
|
|
1964
|
+
}
|
|
1965
|
+
else {
|
|
1966
|
+
await this.invoke(new _2_tl_js_1.functions.MessagesDeleteMessages({ id: messageIds, revoke: params?.onlyForMe ? undefined : true }));
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
/**
|
|
1970
|
+
* Delete a single message.
|
|
1971
|
+
*
|
|
1972
|
+
* @method
|
|
1973
|
+
* @param chatId The chat that contains the message.
|
|
1974
|
+
* @param messageId The identifier of the message to delete.
|
|
1975
|
+
*/
|
|
1976
|
+
async deleteMessage(chatId, messageId, params) {
|
|
1977
|
+
await this.deleteMessages(chatId, [messageId], params);
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* Send a photo.
|
|
1981
|
+
*
|
|
1982
|
+
* @method
|
|
1983
|
+
* @param chatId The chat to send the photo to.
|
|
1984
|
+
* @param photo The photo to send.
|
|
1985
|
+
*/
|
|
1986
|
+
async sendPhoto(chatId, photo, params) {
|
|
1987
|
+
let media = null;
|
|
1988
|
+
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
1989
|
+
if (typeof photo === "string") {
|
|
1990
|
+
let fileId = null;
|
|
1991
|
+
try {
|
|
1992
|
+
fileId = _3_types_js_1.FileID.decode(photo);
|
|
1993
|
+
}
|
|
1994
|
+
catch (err) {
|
|
1995
|
+
d("fileId: %o", err);
|
|
1996
|
+
}
|
|
1997
|
+
if (fileId != null) {
|
|
1998
|
+
if (fileId.fileType != _3_types_js_1.FileType.Photo) {
|
|
1999
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
2000
|
+
}
|
|
2001
|
+
if (fileId.params.mediaId == undefined || fileId.params.accessHash == undefined || fileId.params.fileReference == undefined) {
|
|
2002
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
2003
|
+
}
|
|
2004
|
+
media = new _2_tl_js_1.types.InputMediaPhoto({
|
|
2005
|
+
id: new _2_tl_js_1.types.InputPhoto({
|
|
2006
|
+
id: fileId.params.mediaId,
|
|
2007
|
+
accessHash: fileId.params.accessHash,
|
|
2008
|
+
fileReference: fileId.params.fileReference,
|
|
2009
|
+
}),
|
|
2010
|
+
spoiler,
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
if (media == null) {
|
|
2015
|
+
if (typeof photo === "string" && (0, _0_utilities_js_1.isHttpUrl)(photo)) {
|
|
2016
|
+
media = new _2_tl_js_1.types.InputMediaPhotoExternal({ url: photo, spoiler });
|
|
2017
|
+
}
|
|
2018
|
+
else {
|
|
2019
|
+
const [contents, fileName] = await (0, _0_utilities_js_1.getFileContents)(photo);
|
|
2020
|
+
const file = await this.upload(contents, { fileName, chunkSize: params?.chunkSize, signal: params?.signal });
|
|
2021
|
+
media = new _2_tl_js_1.types.InputMediaUploadedPhoto({ file, spoiler });
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
const peer = await this.getInputPeer(chatId);
|
|
2025
|
+
const randomId = (0, _1_utilities_js_1.getRandomId)();
|
|
2026
|
+
const silent = params?.disableNotification ? true : undefined;
|
|
2027
|
+
const noforwards = params?.protectContent ? true : undefined;
|
|
2028
|
+
const replyToMsgId = params?.replyToMessageId;
|
|
2029
|
+
const topMsgId = params?.messageThreadId;
|
|
2030
|
+
const sendAs = params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
|
|
2031
|
+
const replyMarkup = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params);
|
|
2032
|
+
const caption_ = params?.caption;
|
|
2033
|
+
const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
2034
|
+
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
2035
|
+
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
2036
|
+
const result = await this.invoke(new _2_tl_js_1.functions.MessagesSendMedia({
|
|
2037
|
+
peer,
|
|
2038
|
+
randomId,
|
|
2039
|
+
silent,
|
|
2040
|
+
noforwards,
|
|
2041
|
+
replyMarkup,
|
|
2042
|
+
replyTo: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ replyToMsgId, topMsgId }) : undefined,
|
|
2043
|
+
sendAs,
|
|
2044
|
+
media,
|
|
2045
|
+
message: caption ?? "",
|
|
2046
|
+
entities: captionEntities,
|
|
2047
|
+
}));
|
|
2048
|
+
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
2049
|
+
return __classPrivateFieldGet(Client, _a, "m", _Client_assertMsgHas).call(Client, message, "photo");
|
|
2050
|
+
}
|
|
1918
2051
|
}
|
|
1919
2052
|
exports.Client = Client;
|
|
1920
2053
|
_a = Client, _Client_handleUpdate =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @deprecated (will be removed in 0.210.0) Use
|
|
2
|
+
* @deprecated (will be removed in 0.210.0) Use {@linkcode encodeBase64} instead.
|
|
3
3
|
*
|
|
4
4
|
* CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727
|
|
5
5
|
* Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const encode: typeof encodeBase64;
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated (will be removed in 0.210.0) Use
|
|
10
|
+
* @deprecated (will be removed in 0.210.0) Use {@linkcode decodeBase64} instead.
|
|
11
11
|
*
|
|
12
12
|
* Decodes a given RFC4648 base64 encoded string
|
|
13
13
|
* @param b64
|
|
@@ -96,7 +96,7 @@ const base64abc = [
|
|
|
96
96
|
"/",
|
|
97
97
|
];
|
|
98
98
|
/**
|
|
99
|
-
* @deprecated (will be removed in 0.210.0) Use
|
|
99
|
+
* @deprecated (will be removed in 0.210.0) Use {@linkcode encodeBase64} instead.
|
|
100
100
|
*
|
|
101
101
|
* CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727
|
|
102
102
|
* Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation
|
|
@@ -104,7 +104,7 @@ const base64abc = [
|
|
|
104
104
|
*/
|
|
105
105
|
exports.encode = encodeBase64;
|
|
106
106
|
/**
|
|
107
|
-
* @deprecated (will be removed in 0.210.0) Use
|
|
107
|
+
* @deprecated (will be removed in 0.210.0) Use {@linkcode decodeBase64} instead.
|
|
108
108
|
*
|
|
109
109
|
* Decodes a given RFC4648 base64 encoded string
|
|
110
110
|
* @param b64
|
package/{esm/deps/deno.land/std@0.204.0 → script/deps/deno.land/std@0.207.0}/fmt/colors.d.ts
RENAMED
|
@@ -263,7 +263,7 @@ export declare function rgb24(str: string, color: number | Rgb): string;
|
|
|
263
263
|
*/
|
|
264
264
|
export declare function bgRgb24(str: string, color: number | Rgb): string;
|
|
265
265
|
/**
|
|
266
|
-
* @deprecated (will be removed in 1.0.0) Use
|
|
266
|
+
* @deprecated (will be removed in 1.0.0) Use {@linkcode stripAnsiCode} instead.
|
|
267
267
|
*
|
|
268
268
|
* Remove ANSI escape codes from the string.
|
|
269
269
|
* @param string to remove ANSI escape codes from
|