@mtkruto/node 0.0.996 → 0.0.998
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/0_deps.d.ts +2 -2
- package/esm/0_deps.js +2 -2
- package/esm/3_types.d.ts +1 -0
- package/esm/3_types.js +1 -0
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_html.js +1 -1
- package/esm/client/3_types.d.ts +3 -2
- package/esm/client/3_types.js +1 -1
- package/esm/client/4_client.d.ts +11 -4
- package/esm/client/4_client.js +60 -9
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.js +14 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +14 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less.js +14 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +14 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
- package/{script/deps/deno.land/std@0.200.0 → esm/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +8 -1
- package/esm/tl/3_tl_reader.d.ts +1 -1
- package/esm/tl/3_tl_reader.js +6 -0
- package/esm/tl/4_tl_writer.js +8 -0
- package/esm/tl/6_message.js +3 -0
- package/esm/types/0_chat_action.d.ts +1 -0
- package/esm/types/0_chat_action.js +1 -0
- package/esm/types/0_message_entity.d.ts +10 -10
- package/esm/types/0_message_entity.js +12 -12
- package/esm/types/1_chat.d.ts +5 -10
- package/esm/types/1_chat.js +4 -11
- package/esm/types/1_sticker.d.ts +2 -2
- package/esm/types/1_sticker.js +1 -1
- package/esm/types/3_message.js +3 -3
- package/package.json +1 -1
- package/script/0_deps.d.ts +2 -2
- package/script/0_deps.js +2 -2
- package/script/3_types.d.ts +1 -0
- package/script/3_types.js +1 -0
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_html.js +1 -1
- package/script/client/3_types.d.ts +3 -2
- package/script/client/3_types.js +3 -0
- package/script/client/4_client.d.ts +11 -4
- package/script/client/4_client.js +60 -9
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater.js +18 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +18 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
- package/script/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less.js +18 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +18 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
- package/{esm/deps/deno.land/std@0.200.0 → script/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +10 -3
- package/script/tl/3_tl_reader.d.ts +1 -1
- package/script/tl/3_tl_reader.js +6 -0
- package/script/tl/4_tl_writer.js +8 -0
- package/script/tl/6_message.js +3 -0
- package/script/types/0_chat_action.d.ts +1 -0
- package/script/types/0_chat_action.js +2 -0
- package/script/types/0_message_entity.d.ts +10 -10
- package/script/types/0_message_entity.js +12 -12
- package/script/types/1_chat.d.ts +5 -10
- package/script/types/1_chat.js +5 -12
- package/script/types/1_sticker.d.ts +2 -2
- package/script/types/1_sticker.js +1 -1
- package/script/types/3_message.js +2 -2
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
package/esm/0_deps.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.201.0/assert/mod.js";
|
|
2
2
|
export { ctr256Decrypt, ctr256Encrypt, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.1.3/mod.js";
|
|
3
3
|
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
|
|
4
4
|
export { Mutex, type MutexInterface } from "async-mutex";
|
|
5
5
|
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
|
|
6
6
|
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
|
|
7
7
|
export declare const debug: typeof debug_;
|
|
8
|
-
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.
|
|
8
|
+
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.201.0/encoding/base64.js";
|
package/esm/0_deps.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.201.0/assert/mod.js";
|
|
2
2
|
export { ctr256Decrypt, ctr256Encrypt, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.1.3/mod.js";
|
|
3
3
|
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
|
|
4
4
|
export { Mutex } from "async-mutex";
|
|
5
5
|
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
|
|
6
6
|
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
|
|
7
7
|
export const debug = (v) => debug_(v);
|
|
8
|
-
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.
|
|
8
|
+
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.201.0/encoding/base64.js";
|
package/esm/3_types.d.ts
CHANGED
package/esm/3_types.js
CHANGED
package/esm/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 = 161;
|
|
8
|
-
export declare const APP_VERSION = "MTKruto 0.0.
|
|
8
|
+
export declare const APP_VERSION = "MTKruto 0.0.998";
|
|
9
9
|
export declare const DEVICE_MODEL: string;
|
|
10
10
|
export declare const LANG_CODE: string;
|
|
11
11
|
export declare const LANG_PACK = "";
|
package/esm/4_constants.js
CHANGED
|
@@ -54,7 +54,7 @@ export const PUBLIC_KEYS = Object.freeze([
|
|
|
54
54
|
export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
55
55
|
export const INITIAL_DC = "2-test";
|
|
56
56
|
export const LAYER = 161;
|
|
57
|
-
export const APP_VERSION = "MTKruto 0.0.
|
|
57
|
+
export const APP_VERSION = "MTKruto 0.0.998";
|
|
58
58
|
// @ts-ignore: lib
|
|
59
59
|
export const 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;
|
|
60
60
|
export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/esm/client/0_html.js
CHANGED
|
@@ -27,7 +27,7 @@ export function parseHtml(html) {
|
|
|
27
27
|
if (!url) {
|
|
28
28
|
throw new Error("Missing attribute href");
|
|
29
29
|
}
|
|
30
|
-
queue.push({ type: "
|
|
30
|
+
queue.push({ type: "textLink", offset: text.length, length: 0, url });
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
case "ins":
|
package/esm/client/3_types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { MaybePromise } from "../1_utilities.js";
|
|
|
2
2
|
import { CallbackQuery, ForceReply, InlineKeyboardMarkup, InlineQuery, Message, MessageEntity, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "../3_types.js";
|
|
3
3
|
import { With } from "./0_utilities.js";
|
|
4
4
|
import { ClientPlainParams } from "./2_client_plain.js";
|
|
5
|
-
export type ParseMode = "
|
|
5
|
+
export type ParseMode = "HTML" | null;
|
|
6
6
|
export interface ClientParams extends ClientPlainParams {
|
|
7
7
|
/**
|
|
8
8
|
* A parse mode to use when the `parseMode` parameter is not specified when sending or editing messages. Defauls to `ParseMode.None`.
|
|
@@ -196,7 +196,7 @@ export interface SendPollParams {
|
|
|
196
196
|
*/
|
|
197
197
|
protectContent?: boolean;
|
|
198
198
|
}
|
|
199
|
-
export type ConnectionState = "
|
|
199
|
+
export type ConnectionState = "notConnected" | "updating" | "ready";
|
|
200
200
|
export type AuthorizationState = {
|
|
201
201
|
authorized: boolean;
|
|
202
202
|
};
|
|
@@ -217,3 +217,4 @@ export interface Handler<U extends Partial<Update> = Partial<Update>> {
|
|
|
217
217
|
export type FilterUpdate<U extends Update, T extends keyof U, F extends keyof NonNullable<U[T]>> = With<U, T> & Pick<{
|
|
218
218
|
[P in T]-?: With<NonNullable<U[T]>, F>;
|
|
219
219
|
}, T>;
|
|
220
|
+
export declare const skip: Handler;
|
package/esm/client/3_types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const skip = (__, _) => _();
|
package/esm/client/4_client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { MaybePromise } from "../1_utilities.js";
|
|
|
2
2
|
import { functions, ReadObject, types } from "../2_tl.js";
|
|
3
3
|
import { Storage } from "../3_storage.js";
|
|
4
4
|
import { DC } from "../3_transport.js";
|
|
5
|
-
import { Message } from "../3_types.js";
|
|
5
|
+
import { ChatAction, Message } from "../3_types.js";
|
|
6
6
|
import { With } from "./0_utilities.js";
|
|
7
7
|
import { ClientAbstract } from "./1_client_abstract.js";
|
|
8
8
|
import { AnswerCallbackQueryParams, AuthorizeUserParams, ChatID, ClientParams, EditMessageParams, FilterableUpdates, FilterUpdate, ForwardMessagesParams, Handler, ParseMode, SendMessagesParams, SendPollParams, Update } from "./3_types.js";
|
|
@@ -36,7 +36,6 @@ export declare class Client extends ClientAbstract {
|
|
|
36
36
|
* @param storage The storage provider to use. Defaults to memory storage.
|
|
37
37
|
* @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
|
|
38
38
|
* @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
|
|
39
|
-
* @param params Other parameters.
|
|
40
39
|
*/
|
|
41
40
|
constructor(storage?: Storage, apiId?: number | null, apiHash?: string | null, params?: ClientParams);
|
|
42
41
|
private propagateConnectionState;
|
|
@@ -203,10 +202,18 @@ export declare class Client extends ClientAbstract {
|
|
|
203
202
|
* @param options The poll's options.
|
|
204
203
|
*/
|
|
205
204
|
sendPoll(chatId: ChatID, question: string, options: [string, string, ...string[]], params?: SendPollParams): Promise<With<Message, "poll">>;
|
|
205
|
+
/**
|
|
206
|
+
* Send a chat action.
|
|
207
|
+
*
|
|
208
|
+
* @param chatId The chat to send the chat action to.
|
|
209
|
+
* @param action The chat action.
|
|
210
|
+
* @param messageThreadId The thread to send the chat action to.
|
|
211
|
+
*/
|
|
212
|
+
sendChatAction(chatId: ChatID, action_: ChatAction, messageThreadId?: number): Promise<void>;
|
|
206
213
|
private handle;
|
|
207
214
|
use(handler: Handler): void;
|
|
208
215
|
branch(predicate: (upd: Update) => MaybePromise<boolean>, trueHandler: Handler, falseHandler: Handler): void;
|
|
209
|
-
filter<D extends Update>(predicate: (
|
|
210
|
-
filter(predicate: (
|
|
216
|
+
filter<D extends Update>(predicate: (update: Update) => update is D, handler: Handler<D>): void;
|
|
217
|
+
filter(predicate: (update: Update) => MaybePromise<boolean>, handler: Handler): void;
|
|
211
218
|
on<T extends keyof Update, F extends keyof NonNullable<Update[T]>>(filter: T extends FilterableUpdates ? T | [T, F, ...F[]] : T, handler: Handler<FilterUpdate<Update, T, F>>): void;
|
|
212
219
|
}
|
package/esm/client/4_client.js
CHANGED
|
@@ -10,6 +10,7 @@ import { checkPassword } from "./0_password.js";
|
|
|
10
10
|
import { parseHtml } from "./0_html.js";
|
|
11
11
|
import { ClientPlain } from "./2_client_plain.js";
|
|
12
12
|
import { ClientAbstract } from "./1_client_abstract.js";
|
|
13
|
+
import { skip } from "./3_types.js";
|
|
13
14
|
const d = debug("Client");
|
|
14
15
|
const dGap = debug("Client/recoverUpdateGap");
|
|
15
16
|
const dGapC = debug("Client/recoverChannelUpdateGap");
|
|
@@ -27,7 +28,6 @@ export class Client extends ClientAbstract {
|
|
|
27
28
|
* @param storage The storage provider to use. Defaults to memory storage.
|
|
28
29
|
* @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
|
|
29
30
|
* @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
|
|
30
|
-
* @param params Other parameters.
|
|
31
31
|
*/
|
|
32
32
|
constructor(storage = new StorageMemory(), apiId = 0, apiHash = "", params) {
|
|
33
33
|
super(params);
|
|
@@ -152,7 +152,7 @@ export class Client extends ClientAbstract {
|
|
|
152
152
|
value: ((connected) => {
|
|
153
153
|
this.connectMutex.acquire().then(async (release) => {
|
|
154
154
|
try {
|
|
155
|
-
const connectionState = connected ? "ready" : "
|
|
155
|
+
const connectionState = connected ? "ready" : "notConnected";
|
|
156
156
|
if (this.connected == connected && this.lastPropagatedConnectionState != connectionState) {
|
|
157
157
|
await this.propagateConnectionState(connectionState);
|
|
158
158
|
this.lastPropagatedConnectionState = connectionState;
|
|
@@ -216,9 +216,9 @@ export class Client extends ClientAbstract {
|
|
|
216
216
|
enumerable: true,
|
|
217
217
|
configurable: true,
|
|
218
218
|
writable: true,
|
|
219
|
-
value:
|
|
219
|
+
value: skip
|
|
220
220
|
});
|
|
221
|
-
this.parseMode = params?.parseMode ??
|
|
221
|
+
this.parseMode = params?.parseMode ?? null;
|
|
222
222
|
this.appVersion = params?.appVersion ?? APP_VERSION;
|
|
223
223
|
this.deviceModel = params?.deviceModel ?? DEVICE_MODEL;
|
|
224
224
|
this.langCode = params?.langCode ?? LANG_CODE;
|
|
@@ -1177,8 +1177,11 @@ export class Client extends ClientAbstract {
|
|
|
1177
1177
|
return messages;
|
|
1178
1178
|
}
|
|
1179
1179
|
async resolveSendAs(params) {
|
|
1180
|
-
|
|
1181
|
-
|
|
1180
|
+
const sendAs = params?.sendAs;
|
|
1181
|
+
if (sendAs !== undefined) {
|
|
1182
|
+
await this.assertUser("sendAs");
|
|
1183
|
+
return sendAs ? await this.getInputPeer(sendAs) : undefined;
|
|
1184
|
+
}
|
|
1182
1185
|
}
|
|
1183
1186
|
/**
|
|
1184
1187
|
* Send a text message.
|
|
@@ -1216,9 +1219,9 @@ export class Client extends ClientAbstract {
|
|
|
1216
1219
|
const entities_ = params?.entities ?? [];
|
|
1217
1220
|
const parseMode = params?.parseMode ?? this.parseMode;
|
|
1218
1221
|
switch (parseMode) {
|
|
1219
|
-
case
|
|
1222
|
+
case null:
|
|
1220
1223
|
break;
|
|
1221
|
-
case "
|
|
1224
|
+
case "HTML": {
|
|
1222
1225
|
const [newText, entitiesToPush] = parseHtml(text);
|
|
1223
1226
|
text = newText;
|
|
1224
1227
|
for (const entity of entitiesToPush) {
|
|
@@ -1583,6 +1586,54 @@ export class Client extends ClientAbstract {
|
|
|
1583
1586
|
const message = await this.updatesToMessages(chatId, result).then((v) => v[0]);
|
|
1584
1587
|
return Client.assertMsgHas(message, "poll");
|
|
1585
1588
|
}
|
|
1589
|
+
/**
|
|
1590
|
+
* Send a chat action.
|
|
1591
|
+
*
|
|
1592
|
+
* @param chatId The chat to send the chat action to.
|
|
1593
|
+
* @param action The chat action.
|
|
1594
|
+
* @param messageThreadId The thread to send the chat action to.
|
|
1595
|
+
*/
|
|
1596
|
+
async sendChatAction(chatId, action_, messageThreadId) {
|
|
1597
|
+
let action;
|
|
1598
|
+
switch (action_) {
|
|
1599
|
+
case "type":
|
|
1600
|
+
action = new types.SendMessageTypingAction();
|
|
1601
|
+
break;
|
|
1602
|
+
case "uploadPhoto":
|
|
1603
|
+
action = new types.SendMessageUploadPhotoAction({ progress: 0 });
|
|
1604
|
+
break;
|
|
1605
|
+
case "recordVideo":
|
|
1606
|
+
action = new types.SendMessageRecordVideoAction();
|
|
1607
|
+
break;
|
|
1608
|
+
case "uploadVideo":
|
|
1609
|
+
action = new types.SendMessageRecordVideoAction();
|
|
1610
|
+
break;
|
|
1611
|
+
case "recordVoice":
|
|
1612
|
+
action = new types.SendMessageRecordAudioAction();
|
|
1613
|
+
break;
|
|
1614
|
+
case "uploadAudio":
|
|
1615
|
+
action = new types.SendMessageUploadAudioAction({ progress: 0 });
|
|
1616
|
+
break;
|
|
1617
|
+
case "uploadDocument":
|
|
1618
|
+
action = new types.SendMessageUploadDocumentAction({ progress: 0 });
|
|
1619
|
+
break;
|
|
1620
|
+
case "chooseSticker":
|
|
1621
|
+
action = new types.SendMessageChooseStickerAction();
|
|
1622
|
+
break;
|
|
1623
|
+
case "findLocation":
|
|
1624
|
+
action = new types.SendMessageGeoLocationAction();
|
|
1625
|
+
break;
|
|
1626
|
+
case "recordVideoNote":
|
|
1627
|
+
action = new types.SendMessageRecordRoundAction();
|
|
1628
|
+
break;
|
|
1629
|
+
case "uploadVideoNote":
|
|
1630
|
+
action = new types.SendMessageUploadRoundAction({ progress: 0 });
|
|
1631
|
+
break;
|
|
1632
|
+
default:
|
|
1633
|
+
throw new Error("Invalid chat action: " + action_);
|
|
1634
|
+
}
|
|
1635
|
+
await this.invoke(new functions.MessagesSetTyping({ peer: await this.getInputPeer(chatId), action, topMsgId: messageThreadId }));
|
|
1636
|
+
}
|
|
1586
1637
|
use(handler) {
|
|
1587
1638
|
const handle = this.handle;
|
|
1588
1639
|
this.handle = async (upd, next) => {
|
|
@@ -1606,7 +1657,7 @@ export class Client extends ClientAbstract {
|
|
|
1606
1657
|
});
|
|
1607
1658
|
}
|
|
1608
1659
|
filter(predicate, handler) {
|
|
1609
|
-
this.branch(predicate, handler,
|
|
1660
|
+
this.branch(predicate, handler, skip);
|
|
1610
1661
|
}
|
|
1611
1662
|
on(filter, handler) {
|
|
1612
1663
|
const type = typeof filter === "string" ? filter : filter[0];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
import { format } from "./_format.js";
|
|
3
|
+
import { AssertionError } from "./assertion_error.js";
|
|
4
|
+
/**
|
|
5
|
+
* Make an assertion that `actual` is greater than `expected`.
|
|
6
|
+
* If not then throw.
|
|
7
|
+
*/
|
|
8
|
+
export function assertGreater(actual, expected, msg) {
|
|
9
|
+
if (actual > expected)
|
|
10
|
+
return;
|
|
11
|
+
const actualString = format(actual);
|
|
12
|
+
const expectedString = format(expected);
|
|
13
|
+
throw new AssertionError(msg ?? `Expect ${actualString} > ${expectedString}`);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
import { format } from "./_format.js";
|
|
3
|
+
import { AssertionError } from "./assertion_error.js";
|
|
4
|
+
/**
|
|
5
|
+
* Make an assertion that `actual` is greater than or equal to `expected`.
|
|
6
|
+
* If not then throw.
|
|
7
|
+
*/
|
|
8
|
+
export function assertGreaterOrEqual(actual, expected, msg) {
|
|
9
|
+
if (actual >= expected)
|
|
10
|
+
return;
|
|
11
|
+
const actualString = format(actual);
|
|
12
|
+
const expectedString = format(expected);
|
|
13
|
+
throw new AssertionError(msg ?? `Expect ${actualString} >= ${expectedString}`);
|
|
14
|
+
}
|
|
@@ -22,11 +22,11 @@ export function assertInstanceOf(actual, expectedType, msg = "") {
|
|
|
22
22
|
else {
|
|
23
23
|
actualTypeStr = typeof actual;
|
|
24
24
|
}
|
|
25
|
-
if (expectedTypeStr
|
|
25
|
+
if (expectedTypeStr === actualTypeStr) {
|
|
26
26
|
msg =
|
|
27
27
|
`Expected object to be an instance of "${expectedTypeStr}"${msgSuffix}`;
|
|
28
28
|
}
|
|
29
|
-
else if (actualTypeStr
|
|
29
|
+
else if (actualTypeStr === "function") {
|
|
30
30
|
msg =
|
|
31
31
|
`Expected object to be an instance of "${expectedTypeStr}" but was not an instanced object${msgSuffix}`;
|
|
32
32
|
}
|
|
@@ -20,7 +20,10 @@ ErrorClass, msgIncludes, msg) {
|
|
|
20
20
|
}
|
|
21
21
|
if (msgIncludes && (!(error instanceof Error) ||
|
|
22
22
|
!stripColor(error.message).includes(stripColor(msgIncludes)))) {
|
|
23
|
-
msg = `Expected error message to include
|
|
23
|
+
msg = `Expected error message to include ${JSON.stringify(msgIncludes)}, but got ${error instanceof Error
|
|
24
|
+
? JSON.stringify(error.message)
|
|
25
|
+
: '"[not an Error]"' // TODO(kt3k): show more useful information
|
|
26
|
+
}${msgSuffix}`;
|
|
24
27
|
throw new AssertionError(msg);
|
|
25
28
|
}
|
|
26
29
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
import { format } from "./_format.js";
|
|
3
|
+
import { AssertionError } from "./assertion_error.js";
|
|
4
|
+
/**
|
|
5
|
+
* Make an assertion that `actual` is less than `expected`.
|
|
6
|
+
* If not then throw.
|
|
7
|
+
*/
|
|
8
|
+
export function assertLess(actual, expected, msg) {
|
|
9
|
+
if (actual < expected)
|
|
10
|
+
return;
|
|
11
|
+
const actualString = format(actual);
|
|
12
|
+
const expectedString = format(expected);
|
|
13
|
+
throw new AssertionError(msg ?? `Expect ${actualString} < ${expectedString}`);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
import { format } from "./_format.js";
|
|
3
|
+
import { AssertionError } from "./assertion_error.js";
|
|
4
|
+
/**
|
|
5
|
+
* Make an assertion that `actual` is less than or equal to `expected`.
|
|
6
|
+
* If not then throw.
|
|
7
|
+
*/
|
|
8
|
+
export function assertLessOrEqual(actual, expected, msg) {
|
|
9
|
+
if (actual <= expected)
|
|
10
|
+
return;
|
|
11
|
+
const actualString = format(actual);
|
|
12
|
+
const expectedString = format(expected);
|
|
13
|
+
throw new AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
|
|
14
|
+
}
|
|
@@ -12,8 +12,12 @@ export * from "./assert_array_includes.js";
|
|
|
12
12
|
export * from "./assert_equals.js";
|
|
13
13
|
export * from "./assert_exists.js";
|
|
14
14
|
export * from "./assert_false.js";
|
|
15
|
+
export * from "./assert_greater_or_equal.js";
|
|
16
|
+
export * from "./assert_greater.js";
|
|
15
17
|
export * from "./assert_instance_of.js";
|
|
16
18
|
export * from "./assert_is_error.js";
|
|
19
|
+
export * from "./assert_less_or_equal.js";
|
|
20
|
+
export * from "./assert_less.js";
|
|
17
21
|
export * from "./assert_match.js";
|
|
18
22
|
export * from "./assert_not_equals.js";
|
|
19
23
|
export * from "./assert_not_instance_of.js";
|
|
@@ -13,8 +13,12 @@ export * from "./assert_array_includes.js";
|
|
|
13
13
|
export * from "./assert_equals.js";
|
|
14
14
|
export * from "./assert_exists.js";
|
|
15
15
|
export * from "./assert_false.js";
|
|
16
|
+
export * from "./assert_greater_or_equal.js";
|
|
17
|
+
export * from "./assert_greater.js";
|
|
16
18
|
export * from "./assert_instance_of.js";
|
|
17
19
|
export * from "./assert_is_error.js";
|
|
20
|
+
export * from "./assert_less_or_equal.js";
|
|
21
|
+
export * from "./assert_less.js";
|
|
18
22
|
export * from "./assert_match.js";
|
|
19
23
|
export * from "./assert_not_equals.js";
|
|
20
24
|
export * from "./assert_not_instance_of.js";
|
package/{script/deps/deno.land/std@0.200.0 → esm/deps/deno.land/std@0.201.0}/fmt/colors.d.ts
RENAMED
|
@@ -262,9 +262,16 @@ export declare function rgb24(str: string, color: number | Rgb): string;
|
|
|
262
262
|
* @param color code
|
|
263
263
|
*/
|
|
264
264
|
export declare function bgRgb24(str: string, color: number | Rgb): string;
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated (will be removed in 1.0.0) Use `stripAnsiCode` instead.
|
|
267
|
+
*
|
|
268
|
+
* Remove ANSI escape codes from the string.
|
|
269
|
+
* @param string to remove ANSI escape codes from
|
|
270
|
+
*/
|
|
271
|
+
export declare const stripColor: typeof stripAnsiCode;
|
|
265
272
|
/**
|
|
266
273
|
* Remove ANSI escape codes from the string.
|
|
267
274
|
* @param string to remove ANSI escape codes from
|
|
268
275
|
*/
|
|
269
|
-
export declare function
|
|
276
|
+
export declare function stripAnsiCode(string: string): string;
|
|
270
277
|
export {};
|
|
@@ -465,10 +465,17 @@ const ANSI_PATTERN = new RegExp([
|
|
|
465
465
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
466
466
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))",
|
|
467
467
|
].join("|"), "g");
|
|
468
|
+
/**
|
|
469
|
+
* @deprecated (will be removed in 1.0.0) Use `stripAnsiCode` instead.
|
|
470
|
+
*
|
|
471
|
+
* Remove ANSI escape codes from the string.
|
|
472
|
+
* @param string to remove ANSI escape codes from
|
|
473
|
+
*/
|
|
474
|
+
export const stripColor = stripAnsiCode;
|
|
468
475
|
/**
|
|
469
476
|
* Remove ANSI escape codes from the string.
|
|
470
477
|
* @param string to remove ANSI escape codes from
|
|
471
478
|
*/
|
|
472
|
-
export function
|
|
479
|
+
export function stripAnsiCode(string) {
|
|
473
480
|
return string.replace(ANSI_PATTERN, "");
|
|
474
481
|
}
|
package/esm/tl/3_tl_reader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLRawReader } from "./0_tl_raw_reader.js";
|
|
2
2
|
import { TLObject } from "./1_tl_object.js";
|
|
3
|
-
export type ReadObject = TLObject | Array<ReadObject | TLObject>;
|
|
3
|
+
export type ReadObject = boolean | TLObject | Array<ReadObject | TLObject>;
|
|
4
4
|
export declare class TLReader extends TLRawReader {
|
|
5
5
|
readObject(id?: number): ReadObject;
|
|
6
6
|
}
|
package/esm/tl/3_tl_reader.js
CHANGED
|
@@ -15,6 +15,12 @@ export class TLReader extends TLRawReader {
|
|
|
15
15
|
}
|
|
16
16
|
return items;
|
|
17
17
|
}
|
|
18
|
+
else if (id == 0x997275b5) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
else if (id == 0xbc799737) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
18
24
|
const constructor = map.get(id);
|
|
19
25
|
if (constructor) {
|
|
20
26
|
return deserialize(this, constructor[paramDesc], constructor);
|
package/esm/tl/4_tl_writer.js
CHANGED
|
@@ -10,6 +10,14 @@ export class TLWriter extends TLRawWriter {
|
|
|
10
10
|
this.writeObject(item);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
else if (typeof object === "boolean") {
|
|
14
|
+
if (object) {
|
|
15
|
+
this.writeInt32(0x997275b5, false);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.writeInt32(0xbc799737, false);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
13
21
|
else {
|
|
14
22
|
this.write(object[serialize]());
|
|
15
23
|
}
|
package/esm/tl/6_message.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ChatAction = "type" | "uploadPhoto" | "recordVideo" | "uploadVideo" | "recordVoice" | "uploadAudio" | "uploadDocument" | "chooseSticker" | "findLocation" | "recordVideoNote" | "uploadVideoNote";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
export type MessageEntityType = "mention" | "hashtag" | "
|
|
2
|
+
export type MessageEntityType = "mention" | "hashtag" | "botCommand" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "textLink" | "textMention" | "cashtag" | "phoneNumber" | "underline" | "strikethrough" | "blockquote" | "bankCard" | "spoiler" | "customEmoji";
|
|
3
3
|
export declare namespace MessageEntity {
|
|
4
4
|
interface Base {
|
|
5
5
|
type: MessageEntityType;
|
|
@@ -15,7 +15,7 @@ export declare namespace MessageEntity {
|
|
|
15
15
|
type: "hashtag";
|
|
16
16
|
}
|
|
17
17
|
interface BotCommand extends Base {
|
|
18
|
-
type: "
|
|
18
|
+
type: "botCommand";
|
|
19
19
|
}
|
|
20
20
|
interface URL extends Base {
|
|
21
21
|
type: "url";
|
|
@@ -38,20 +38,20 @@ export declare namespace MessageEntity {
|
|
|
38
38
|
type: "code";
|
|
39
39
|
}
|
|
40
40
|
interface TextLink extends Base {
|
|
41
|
-
type: "
|
|
42
|
-
/** For "
|
|
41
|
+
type: "textLink";
|
|
42
|
+
/** For "textLink" only, URL that will be opened after user taps on the text */
|
|
43
43
|
url: string;
|
|
44
44
|
}
|
|
45
45
|
interface TextMention extends Base {
|
|
46
|
-
type: "
|
|
47
|
-
/** For "
|
|
46
|
+
type: "textMention";
|
|
47
|
+
/** For "textMention" only, the ID of the mentioned user */
|
|
48
48
|
userId: number;
|
|
49
49
|
}
|
|
50
50
|
interface Cashtag extends Base {
|
|
51
51
|
type: "cashtag";
|
|
52
52
|
}
|
|
53
53
|
interface PhoneNumber extends Base {
|
|
54
|
-
type: "
|
|
54
|
+
type: "phoneNumber";
|
|
55
55
|
}
|
|
56
56
|
interface Underline extends Base {
|
|
57
57
|
type: "underline";
|
|
@@ -63,14 +63,14 @@ export declare namespace MessageEntity {
|
|
|
63
63
|
type: "blockquote";
|
|
64
64
|
}
|
|
65
65
|
interface BankCard extends Base {
|
|
66
|
-
type: "
|
|
66
|
+
type: "bankCard";
|
|
67
67
|
}
|
|
68
68
|
interface Spoiler extends Base {
|
|
69
69
|
type: "spoiler";
|
|
70
70
|
}
|
|
71
71
|
interface CustomEmoji extends Base {
|
|
72
|
-
type: "
|
|
73
|
-
/** For "
|
|
72
|
+
type: "customEmoji";
|
|
73
|
+
/** For "customEmoji" only, unique identifier of the custom emoji */
|
|
74
74
|
customEmojiId: string;
|
|
75
75
|
}
|
|
76
76
|
}
|