@mtkruto/node 0.0.991 → 0.0.993
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/1_utilities.d.ts +12 -0
- package/esm/1_utilities.js +12 -0
- package/esm/2_connection.d.ts +2 -0
- package/esm/2_connection.js +2 -0
- package/esm/2_tl.d.ts +10 -0
- package/esm/2_tl.js +10 -0
- package/esm/3_storage.d.ts +6 -0
- package/esm/3_storage.js +6 -0
- package/esm/3_transport.d.ts +4 -0
- package/esm/3_transport.js +4 -0
- package/esm/3_types.d.ts +35 -0
- package/esm/3_types.js +35 -0
- package/esm/{constants.d.ts → 4_constants.d.ts} +2 -2
- package/esm/{constants.js → 4_constants.js} +1 -1
- package/esm/5_client.d.ts +2 -0
- package/esm/5_client.js +2 -0
- package/esm/client/0_html.d.ts +1 -1
- package/esm/client/0_html.js +1 -1
- package/esm/client/0_message.d.ts +1 -2
- package/esm/client/0_message.js +7 -14
- package/esm/client/0_password.d.ts +2 -2
- package/esm/client/0_password.js +2 -4
- package/esm/client/0_utilities.d.ts +3 -5
- package/esm/client/0_utilities.js +3 -22
- package/esm/client/1_client_abstract.d.ts +2 -2
- package/esm/client/1_client_abstract.js +3 -3
- package/esm/client/2_client_plain.d.ts +3 -3
- package/esm/client/2_client_plain.js +13 -20
- package/esm/client/3_client.d.ts +95 -18
- package/esm/client/3_client.js +124 -35
- package/esm/connection/0_connection.d.ts +1 -1
- package/esm/connection/1_connection_web_socket.js +1 -1
- package/esm/mod.d.ts +8 -21
- package/esm/mod.js +8 -21
- package/esm/storage/0_storage.d.ts +4 -5
- package/esm/storage/0_storage.js +3 -8
- package/esm/storage/0_utilities.js +2 -2
- package/esm/storage/1_storage_local_storage.d.ts +1 -1
- package/esm/storage/1_storage_memory.d.ts +1 -1
- package/esm/storage/1_storage_session_storage.d.ts +1 -1
- package/esm/tl/0_tl_raw_reader.js +1 -1
- package/esm/tl/0_tl_raw_writer.js +1 -1
- package/esm/tl/1_tl_object.js +1 -1
- package/esm/tl/3_deserialize.js +1 -1
- package/esm/tl/3_utilities.d.ts +3 -0
- package/esm/tl/3_utilities.js +20 -0
- package/esm/tl/4_tl_writer.js +1 -1
- package/esm/transport/0_obfuscation.d.ts +2 -2
- package/esm/transport/0_obfuscation.js +1 -2
- package/esm/transport/0_transport.d.ts +1 -2
- package/esm/transport/1_transport_abridged.d.ts +1 -1
- package/esm/transport/1_transport_abridged.js +1 -1
- package/esm/transport/1_transport_intermediate.d.ts +1 -1
- package/esm/transport/1_transport_intermediate.js +1 -1
- package/esm/transport/2_transport_provider.d.ts +1 -1
- package/esm/transport/2_transport_provider.js +1 -1
- package/esm/types/!0_file_id.js +6 -9
- package/esm/types/!0_misc.d.ts +7 -0
- package/esm/types/!0_misc.js +1 -0
- package/esm/types/0_audio.d.ts +3 -3
- package/esm/types/0_audio.js +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +1 -1
- package/esm/types/0_chat_administrator_rights.js +1 -1
- package/esm/types/0_chat_photo.d.ts +3 -3
- package/esm/types/0_chat_photo.js +1 -1
- package/esm/types/0_color.d.ts +2 -0
- package/esm/types/0_color.js +16 -0
- package/esm/types/0_contact.d.ts +2 -2
- package/esm/types/0_dice.d.ts +1 -1
- package/esm/types/0_force_reply.d.ts +1 -1
- package/esm/types/0_force_reply.js +1 -1
- package/esm/types/0_location.d.ts +1 -1
- package/esm/types/0_location.js +1 -2
- package/esm/types/0_mask_position.d.ts +1 -1
- package/esm/types/0_message_entity.d.ts +5 -5
- package/esm/types/0_message_entity.js +1 -1
- package/esm/types/0_poll_option.d.ts +1 -1
- package/esm/types/0_reply_keyboard_remove.d.ts +1 -1
- package/esm/types/0_reply_keyboard_remove.js +2 -2
- package/esm/types/0_thumbnail.d.ts +2 -2
- package/esm/types/0_thumbnail.js +1 -1
- package/esm/types/0_venue.d.ts +1 -1
- package/esm/types/0_venue.js +1 -2
- package/esm/types/0_voice.d.ts +3 -3
- package/esm/types/0_web_app_info.d.ts +2 -2
- package/esm/types/1_animation.d.ts +3 -3
- package/esm/types/1_animation.js +1 -1
- package/esm/types/1_chat.d.ts +5 -4
- package/esm/types/1_chat.js +8 -9
- package/esm/types/1_document.d.ts +4 -4
- package/esm/types/1_document.js +1 -1
- package/esm/types/1_inline_keyboard_button.d.ts +4 -4
- package/esm/types/1_inline_keyboard_button.js +2 -2
- package/esm/types/1_keyboard_button.d.ts +8 -8
- package/esm/types/1_keyboard_button.js +2 -2
- package/esm/types/1_photo.d.ts +2 -2
- package/esm/types/1_photo.js +1 -1
- package/esm/types/1_poll.d.ts +8 -8
- package/esm/types/1_poll.js +1 -1
- package/esm/types/1_sticker.d.ts +3 -3
- package/esm/types/1_sticker.js +1 -2
- package/esm/types/1_user.d.ts +4 -3
- package/esm/types/1_user.js +4 -4
- package/esm/types/1_video.d.ts +3 -3
- package/esm/types/1_video.js +1 -1
- package/esm/types/1_video_note.d.ts +2 -2
- package/esm/types/1_video_note.js +1 -1
- package/esm/types/2_game.d.ts +3 -3
- package/esm/types/2_game.js +2 -3
- package/esm/types/2_inline_keyboard_markup.d.ts +2 -2
- package/esm/types/2_inline_keyboard_markup.js +1 -1
- package/esm/types/2_inline_query.d.ts +19 -0
- package/esm/types/2_inline_query.js +41 -0
- package/esm/types/2_reply_keyboard_markup.d.ts +2 -2
- package/esm/types/2_reply_keyboard_markup.js +1 -1
- package/esm/types/3_message.d.ts +21 -23
- package/esm/types/3_message.js +16 -18
- package/esm/types/4_callback_query.d.ts +14 -0
- package/esm/types/4_callback_query.js +24 -0
- package/esm/utilities/0_base64.js +1 -1
- package/esm/utilities/0_crypto.js +1 -1
- package/esm/utilities/0_queue.js +1 -1
- package/esm/utilities/1_auth.js +1 -1
- package/package.json +1 -1
- package/script/1_utilities.d.ts +12 -0
- package/script/1_utilities.js +28 -0
- package/script/2_connection.d.ts +2 -0
- package/script/2_connection.js +18 -0
- package/script/2_tl.d.ts +10 -0
- package/script/2_tl.js +40 -0
- package/script/3_storage.d.ts +6 -0
- package/script/3_storage.js +22 -0
- package/script/3_transport.d.ts +4 -0
- package/script/3_transport.js +20 -0
- package/script/3_types.d.ts +35 -0
- package/script/3_types.js +51 -0
- package/script/{constants.d.ts → 4_constants.d.ts} +2 -2
- package/script/{constants.js → 4_constants.js} +1 -1
- package/script/5_client.d.ts +2 -0
- package/script/5_client.js +18 -0
- package/script/client/0_html.d.ts +1 -1
- package/script/client/0_html.js +2 -2
- package/script/client/0_message.d.ts +1 -2
- package/script/client/0_message.js +32 -39
- package/script/client/0_password.d.ts +2 -2
- package/script/client/0_password.js +20 -22
- package/script/client/0_utilities.d.ts +3 -5
- package/script/client/0_utilities.js +24 -68
- package/script/client/1_client_abstract.d.ts +2 -2
- package/script/client/1_client_abstract.js +6 -6
- package/script/client/2_client_plain.d.ts +3 -3
- package/script/client/2_client_plain.js +45 -52
- package/script/client/3_client.d.ts +95 -18
- package/script/client/3_client.js +368 -303
- package/script/connection/0_connection.d.ts +1 -1
- package/script/connection/1_connection_web_socket.js +5 -5
- package/script/mod.d.ts +8 -21
- package/script/mod.js +18 -33
- package/script/storage/0_storage.d.ts +4 -5
- package/script/storage/0_storage.js +11 -39
- package/script/storage/0_utilities.js +6 -6
- package/script/storage/1_storage_local_storage.d.ts +1 -1
- package/script/storage/1_storage_memory.d.ts +1 -1
- package/script/storage/1_storage_session_storage.d.ts +1 -1
- package/script/tl/0_tl_raw_reader.js +6 -6
- package/script/tl/0_tl_raw_writer.js +7 -7
- package/script/tl/1_tl_object.js +3 -3
- package/script/tl/3_deserialize.js +2 -2
- package/script/tl/3_utilities.d.ts +3 -0
- package/script/tl/3_utilities.js +48 -0
- package/script/tl/4_tl_writer.js +2 -2
- package/script/transport/0_obfuscation.d.ts +2 -2
- package/script/transport/0_obfuscation.js +5 -6
- package/script/transport/0_transport.d.ts +1 -2
- package/script/transport/1_transport_abridged.d.ts +1 -1
- package/script/transport/1_transport_abridged.js +3 -3
- package/script/transport/1_transport_intermediate.d.ts +1 -1
- package/script/transport/1_transport_intermediate.js +3 -3
- package/script/transport/2_transport_provider.d.ts +1 -1
- package/script/transport/2_transport_provider.js +2 -2
- package/script/types/!0_file_id.js +24 -27
- package/script/types/!0_misc.d.ts +7 -0
- package/script/types/!0_misc.js +2 -0
- package/script/types/0_audio.d.ts +3 -3
- package/script/types/0_audio.js +2 -25
- package/script/types/0_chat_administrator_rights.d.ts +1 -1
- package/script/types/0_chat_administrator_rights.js +2 -25
- package/script/types/0_chat_photo.d.ts +3 -3
- package/script/types/0_chat_photo.js +2 -25
- package/script/types/0_color.d.ts +2 -0
- package/script/types/{!0_id_color.js → 0_color.js} +10 -10
- package/script/types/0_contact.d.ts +2 -2
- package/script/types/0_dice.d.ts +1 -1
- package/script/types/0_force_reply.d.ts +1 -1
- package/script/types/0_force_reply.js +2 -25
- package/script/types/0_location.d.ts +1 -1
- package/script/types/0_location.js +5 -29
- package/script/types/0_mask_position.d.ts +1 -1
- package/script/types/0_message_entity.d.ts +5 -5
- package/script/types/0_message_entity.js +39 -62
- package/script/types/0_poll_option.d.ts +1 -1
- package/script/types/0_reply_keyboard_remove.d.ts +1 -1
- package/script/types/0_reply_keyboard_remove.js +4 -27
- package/script/types/0_thumbnail.d.ts +2 -2
- package/script/types/0_thumbnail.js +2 -25
- package/script/types/0_venue.d.ts +1 -1
- package/script/types/0_venue.js +2 -26
- package/script/types/0_voice.d.ts +3 -3
- package/script/types/0_web_app_info.d.ts +2 -2
- package/script/types/1_animation.d.ts +3 -3
- package/script/types/1_animation.js +2 -25
- package/script/types/1_chat.d.ts +5 -4
- package/script/types/1_chat.js +20 -44
- package/script/types/1_document.d.ts +4 -4
- package/script/types/1_document.js +2 -25
- package/script/types/1_inline_keyboard_button.d.ts +4 -4
- package/script/types/1_inline_keyboard_button.js +19 -42
- package/script/types/1_keyboard_button.d.ts +8 -8
- package/script/types/1_keyboard_button.js +24 -47
- package/script/types/1_photo.d.ts +2 -2
- package/script/types/1_photo.js +4 -27
- package/script/types/1_poll.d.ts +8 -8
- package/script/types/1_poll.js +2 -2
- package/script/types/1_sticker.d.ts +3 -3
- package/script/types/1_sticker.js +6 -30
- package/script/types/1_user.d.ts +4 -3
- package/script/types/1_user.js +6 -29
- package/script/types/1_video.d.ts +3 -3
- package/script/types/1_video.js +2 -25
- package/script/types/1_video_note.d.ts +2 -2
- package/script/types/1_video_note.js +2 -25
- package/script/types/2_game.d.ts +3 -3
- package/script/types/2_game.js +6 -30
- package/script/types/2_inline_keyboard_markup.d.ts +2 -2
- package/script/types/2_inline_keyboard_markup.js +3 -26
- package/script/types/2_inline_query.d.ts +19 -0
- package/script/types/2_inline_query.js +45 -0
- package/script/types/2_reply_keyboard_markup.d.ts +2 -2
- package/script/types/2_reply_keyboard_markup.js +3 -26
- package/script/types/3_message.d.ts +21 -23
- package/script/types/3_message.js +94 -119
- package/script/types/4_callback_query.d.ts +14 -0
- package/script/types/4_callback_query.js +28 -0
- package/script/utilities/0_base64.js +3 -3
- package/script/utilities/0_crypto.js +3 -3
- package/script/utilities/0_queue.js +2 -2
- package/script/utilities/1_auth.js +5 -5
- package/esm/types/!0_id_color.d.ts +0 -1
- package/esm/types/!0_id_color.js +0 -16
- package/script/types/!0_id_color.d.ts +0 -1
- /package/esm/{deps.d.ts → 0_deps.d.ts} +0 -0
- /package/esm/{deps.js → 0_deps.js} +0 -0
- /package/script/{deps.d.ts → 0_deps.d.ts} +0 -0
- /package/script/{deps.js → 0_deps.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.webSocketTransportProvider = void 0;
|
|
4
|
-
const
|
|
4
|
+
const _2_connection_js_1 = require("../2_connection.js");
|
|
5
5
|
const _1_transport_intermediate_js_1 = require("./1_transport_intermediate.js");
|
|
6
6
|
const dcToNameMap = {
|
|
7
7
|
"1": "pluto",
|
|
@@ -21,7 +21,7 @@ const webSocketTransportProvider = (params) => {
|
|
|
21
21
|
params ??= {};
|
|
22
22
|
params.wss ??= typeof location !== "undefined" && location.protocol == "http:" && location.hostname != "localhost" ? false : true;
|
|
23
23
|
const url = `${params.wss ? "wss" : "ws"}://${dcToNameMap[dc]}${cdn ? "-1" : ""}.web.telegram.org/${dc.endsWith("-test") ? "apiws_test" : "apiws"}`;
|
|
24
|
-
const connection = new
|
|
24
|
+
const connection = new _2_connection_js_1.ConnectionWebSocket(url);
|
|
25
25
|
const transport = new _1_transport_intermediate_js_1.TransportIntermediate(connection, true);
|
|
26
26
|
const dcId = getDcId(dc, cdn);
|
|
27
27
|
return { connection, transport, dcId };
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FileUniqueID = exports.FileUniqueType = exports.FileID = exports.ThumbnailSource = exports.FileType = void 0;
|
|
4
4
|
// Direct port from Pyrogram
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const _0_rle_js_1 = require("../utilities/0_rle.js");
|
|
8
|
-
const _0_tl_raw_writer_js_1 = require("../tl/0_tl_raw_writer.js");
|
|
9
|
-
const _0_tl_raw_reader_js_1 = require("../tl/0_tl_raw_reader.js");
|
|
5
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
6
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
10
7
|
var FileType;
|
|
11
8
|
(function (FileType) {
|
|
12
9
|
FileType[FileType["Thumbnail"] = 0] = "Thumbnail";
|
|
@@ -87,7 +84,7 @@ class FileID {
|
|
|
87
84
|
this.params.thumbnailSize ??= "";
|
|
88
85
|
}
|
|
89
86
|
static decode(fileId) {
|
|
90
|
-
const decoded = (0,
|
|
87
|
+
const decoded = (0, _1_utilities_js_1.rleDecode)((0, _1_utilities_js_1.base64DecodeUrlSafe)(fileId));
|
|
91
88
|
const major = decoded[decoded.length - 1];
|
|
92
89
|
let minor;
|
|
93
90
|
let buffer;
|
|
@@ -99,7 +96,7 @@ class FileID {
|
|
|
99
96
|
minor = decoded[decoded.length - 2];
|
|
100
97
|
buffer = decoded.slice(0, -2);
|
|
101
98
|
}
|
|
102
|
-
const reader = new
|
|
99
|
+
const reader = new _2_tl_js_1.TLReader(buffer);
|
|
103
100
|
let fileType = reader.readInt32();
|
|
104
101
|
const dcId = reader.readInt32();
|
|
105
102
|
const hasWebLocation = Boolean(fileType & WEB_LOCATION_FLAG);
|
|
@@ -149,20 +146,20 @@ class FileID {
|
|
|
149
146
|
return new FileID(major, minor, fileType, dcId, { fileReference, mediaId, accessHash, volumeId, thumbnailSource, stickerSetId, stickerSetAccessHash, localId });
|
|
150
147
|
}
|
|
151
148
|
default:
|
|
152
|
-
(0,
|
|
149
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
153
150
|
}
|
|
154
151
|
}
|
|
155
152
|
else if (DOCUMENT_TYPES.includes(fileType)) {
|
|
156
153
|
return new FileID(minor, major, fileType, dcId, { fileReference, mediaId, accessHash });
|
|
157
154
|
}
|
|
158
155
|
else {
|
|
159
|
-
(0,
|
|
156
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
160
157
|
}
|
|
161
158
|
}
|
|
162
159
|
encode(major, minor) {
|
|
163
160
|
major ??= this.major;
|
|
164
161
|
minor ??= this.minor;
|
|
165
|
-
const writer = new
|
|
162
|
+
const writer = new _2_tl_js_1.TLWriter();
|
|
166
163
|
let fileType = this.fileType;
|
|
167
164
|
if (this.params.url) {
|
|
168
165
|
fileType |= WEB_LOCATION_FLAG;
|
|
@@ -179,13 +176,13 @@ class FileID {
|
|
|
179
176
|
writer.writeBytes(this.params.fileReference);
|
|
180
177
|
}
|
|
181
178
|
if (this.params.mediaId == undefined || this.params.accessHash == undefined) {
|
|
182
|
-
(0,
|
|
179
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
183
180
|
}
|
|
184
181
|
writer.writeInt64(this.params.mediaId);
|
|
185
182
|
writer.writeInt64(this.params.accessHash);
|
|
186
183
|
if (PHOTO_TYPES.includes(this.fileType)) {
|
|
187
184
|
if (this.params.volumeId == undefined || this.params.thumbnailSize == undefined || this.params.localId == undefined) {
|
|
188
|
-
(0,
|
|
185
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
189
186
|
}
|
|
190
187
|
writer.writeInt64(this.params.volumeId);
|
|
191
188
|
if (major >= 4) {
|
|
@@ -194,14 +191,14 @@ class FileID {
|
|
|
194
191
|
switch (this.params.thumbnailSource) {
|
|
195
192
|
case ThumbnailSource.Legacy:
|
|
196
193
|
if (this.params.secret == undefined) {
|
|
197
|
-
(0,
|
|
194
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
198
195
|
}
|
|
199
196
|
writer.writeInt64(this.params.secret);
|
|
200
197
|
writer.writeInt32(this.params.localId);
|
|
201
198
|
break;
|
|
202
199
|
case ThumbnailSource.Thumbnail:
|
|
203
200
|
if (this.params.thumbnailFileType == undefined || this.params.thumbnailSize == undefined) {
|
|
204
|
-
(0,
|
|
201
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
205
202
|
}
|
|
206
203
|
writer.writeInt32(Number(this.params.thumbnailFileType));
|
|
207
204
|
writer.writeInt32(this.params.thumbnailSize.charCodeAt(0));
|
|
@@ -210,7 +207,7 @@ class FileID {
|
|
|
210
207
|
case ThumbnailSource.ChatPhotoSmall:
|
|
211
208
|
case ThumbnailSource.ChatPhotoBig:
|
|
212
209
|
if (this.params.chatId == undefined || this.params.chatAccessHash == undefined) {
|
|
213
|
-
(0,
|
|
210
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
214
211
|
}
|
|
215
212
|
writer.writeInt64(BigInt(this.params.chatId));
|
|
216
213
|
writer.writeInt64(this.params.chatAccessHash);
|
|
@@ -218,14 +215,14 @@ class FileID {
|
|
|
218
215
|
break;
|
|
219
216
|
case ThumbnailSource.StickerSetThumbnail:
|
|
220
217
|
if (this.params.stickerSetId == undefined || this.params.stickerSetAccessHash == undefined) {
|
|
221
|
-
(0,
|
|
218
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
222
219
|
}
|
|
223
220
|
writer.writeInt64(this.params.stickerSetId);
|
|
224
221
|
writer.writeInt64(this.params.stickerSetAccessHash);
|
|
225
222
|
writer.writeInt32(this.params.localId);
|
|
226
223
|
break;
|
|
227
224
|
default:
|
|
228
|
-
(0,
|
|
225
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
229
226
|
}
|
|
230
227
|
}
|
|
231
228
|
else if (DOCUMENT_TYPES.includes(this.fileType)) {
|
|
@@ -233,10 +230,10 @@ class FileID {
|
|
|
233
230
|
writer.writeInt32(major);
|
|
234
231
|
}
|
|
235
232
|
else {
|
|
236
|
-
(0,
|
|
233
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
237
234
|
}
|
|
238
235
|
writer.write(new Uint8Array([minor, major]));
|
|
239
|
-
return (0,
|
|
236
|
+
return (0, _1_utilities_js_1.base64EncodeUrlSafe)((0, _1_utilities_js_1.rleEncode)(writer.buffer));
|
|
240
237
|
}
|
|
241
238
|
}
|
|
242
239
|
Object.defineProperty(FileID, "MAJOR", {
|
|
@@ -277,7 +274,7 @@ class FileUniqueID {
|
|
|
277
274
|
});
|
|
278
275
|
}
|
|
279
276
|
static decode(fileId) {
|
|
280
|
-
const reader = new
|
|
277
|
+
const reader = new _2_tl_js_1.TLReader((0, _1_utilities_js_1.rleDecode)((0, _1_utilities_js_1.base64DecodeUrlSafe)(fileId)));
|
|
281
278
|
const fileUniqueType = reader.readInt32();
|
|
282
279
|
switch (fileUniqueType) {
|
|
283
280
|
case FileUniqueType.Web: {
|
|
@@ -294,36 +291,36 @@ class FileUniqueID {
|
|
|
294
291
|
return new FileUniqueID(fileUniqueType, { mediaId });
|
|
295
292
|
}
|
|
296
293
|
default:
|
|
297
|
-
(0,
|
|
294
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
298
295
|
}
|
|
299
296
|
}
|
|
300
297
|
encode() {
|
|
301
|
-
const writer = new
|
|
298
|
+
const writer = new _2_tl_js_1.TLWriter();
|
|
302
299
|
writer.writeInt32(this.fileUniqueType);
|
|
303
300
|
switch (this.fileUniqueType) {
|
|
304
301
|
case FileUniqueType.Web:
|
|
305
302
|
if (this.params.url == undefined) {
|
|
306
|
-
(0,
|
|
303
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
307
304
|
}
|
|
308
305
|
writer.writeString(this.params.url);
|
|
309
306
|
break;
|
|
310
307
|
case FileUniqueType.Photo:
|
|
311
308
|
if (this.params.volumeId == undefined || this.params.localId == undefined) {
|
|
312
|
-
(0,
|
|
309
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
313
310
|
}
|
|
314
311
|
writer.writeInt64(this.params.volumeId);
|
|
315
312
|
writer.writeInt32(this.params.localId);
|
|
316
313
|
break;
|
|
317
314
|
case FileUniqueType.Document:
|
|
318
315
|
if (this.params.mediaId == undefined) {
|
|
319
|
-
(0,
|
|
316
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
320
317
|
}
|
|
321
318
|
writer.writeInt64(this.params.mediaId);
|
|
322
319
|
break;
|
|
323
320
|
default:
|
|
324
|
-
(0,
|
|
321
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
325
322
|
}
|
|
326
|
-
return (0,
|
|
323
|
+
return (0, _1_utilities_js_1.base64EncodeUrlSafe)((0, _1_utilities_js_1.rleEncode)(writer.buffer));
|
|
327
324
|
}
|
|
328
325
|
}
|
|
329
326
|
exports.FileUniqueID = FileUniqueID;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MaybePromise } from "../1_utilities.js";
|
|
2
|
+
import { types } from "../2_tl.js";
|
|
3
|
+
export interface EntityGetter {
|
|
4
|
+
(peer: types.PeerUser): MaybePromise<types.User | null>;
|
|
5
|
+
(peer: types.PeerChat): MaybePromise<types.Chat | null>;
|
|
6
|
+
(peer: types.PeerChannel): MaybePromise<types.Channel | null>;
|
|
7
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
2
|
import { Thumbnail } from "./0_thumbnail.js";
|
|
3
3
|
/** This object represents an audio file to be treated as music by the Telegram clients. */
|
|
4
4
|
export interface Audio {
|
|
5
5
|
/** Identifier for this file, which can be used to download or reuse the file */
|
|
6
6
|
fileId: string;
|
|
7
|
-
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
7
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
|
|
8
8
|
fileUniqueId: string;
|
|
9
9
|
/** Duration of the audio in seconds as defined by sender */
|
|
10
10
|
duration: number;
|
|
@@ -14,7 +14,7 @@ export interface Audio {
|
|
|
14
14
|
title?: string;
|
|
15
15
|
/** MIME type of the file as defined by sender */
|
|
16
16
|
mimeType: string;
|
|
17
|
-
/** File size in bytes
|
|
17
|
+
/** File size in bytes */
|
|
18
18
|
fileSize: number;
|
|
19
19
|
/** Thumbnail of the album cover to which the music file belongs */
|
|
20
20
|
thumbnails: Thumbnail[];
|
package/script/types/0_audio.js
CHANGED
|
@@ -1,30 +1,7 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.constructAudio = void 0;
|
|
27
|
-
const
|
|
4
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
28
5
|
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
29
6
|
function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
30
7
|
return {
|
|
@@ -35,7 +12,7 @@ function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
|
35
12
|
title: audioAttribute?.title,
|
|
36
13
|
mimeType: document.mimeType,
|
|
37
14
|
fileSize: Number(document.size),
|
|
38
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof types.PhotoSize ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
|
|
15
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof _2_tl_js_1.types.PhotoSize ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
|
|
39
16
|
};
|
|
40
17
|
}
|
|
41
18
|
exports.constructAudio = constructAudio;
|
|
@@ -1,30 +1,7 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.chatAdministratorRightsToTlObject = exports.constructChatAdministratorRights = void 0;
|
|
27
|
-
const
|
|
4
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
28
5
|
function constructChatAdministratorRights(rights_) {
|
|
29
6
|
const rights = {
|
|
30
7
|
isAnonymous: rights_.anonymous || false,
|
|
@@ -52,7 +29,7 @@ function constructChatAdministratorRights(rights_) {
|
|
|
52
29
|
}
|
|
53
30
|
exports.constructChatAdministratorRights = constructChatAdministratorRights;
|
|
54
31
|
function chatAdministratorRightsToTlObject(rights) {
|
|
55
|
-
return new types.ChatAdminRights({
|
|
32
|
+
return new _2_tl_js_1.types.ChatAdminRights({
|
|
56
33
|
anonymous: rights.isAnonymous || undefined,
|
|
57
34
|
other: rights.canManageChat || undefined,
|
|
58
35
|
deleteMessages: rights.canDeleteMessages || undefined,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
2
|
export declare namespace ChatPhoto {
|
|
3
3
|
interface Base {
|
|
4
4
|
/** File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */
|
|
5
5
|
smallFileId: string;
|
|
6
|
-
/** Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
6
|
+
/** Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
|
|
7
7
|
smallFileUniqueId: string;
|
|
8
8
|
/** File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */
|
|
9
9
|
bigFileId: string;
|
|
10
|
-
/** Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
10
|
+
/** Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
|
|
11
11
|
bigFileUniqueId: string;
|
|
12
12
|
/** True, if an [animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) is available for the user */
|
|
13
13
|
hasVideo: boolean;
|
|
@@ -1,30 +1,7 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.constructChatPhoto = void 0;
|
|
27
|
-
const
|
|
4
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
28
5
|
const _0_file_id_js_1 = require("./!0_file_id.js");
|
|
29
6
|
function constructChatPhoto(photo, chatId, chatAccessHash) {
|
|
30
7
|
const smallFileId = new _0_file_id_js_1.FileID(null, null, _0_file_id_js_1.FileType.ChatPhoto, photo.dcId, {
|
|
@@ -47,7 +24,7 @@ function constructChatPhoto(photo, chatId, chatAccessHash) {
|
|
|
47
24
|
localId: 0,
|
|
48
25
|
}).encode();
|
|
49
26
|
const bigFileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
|
|
50
|
-
if (photo instanceof types.ChatPhoto) {
|
|
27
|
+
if (photo instanceof _2_tl_js_1.types.ChatPhoto) {
|
|
51
28
|
return {
|
|
52
29
|
smallFileId,
|
|
53
30
|
smallFileUniqueId,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getColor = void 0;
|
|
4
4
|
const colors = [
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
5
|
+
"red",
|
|
6
|
+
"orange",
|
|
7
|
+
"violet",
|
|
8
|
+
"green",
|
|
9
|
+
"cyan",
|
|
10
|
+
"blue",
|
|
11
|
+
"pink",
|
|
12
12
|
];
|
|
13
|
-
function
|
|
13
|
+
function getColor(id) {
|
|
14
14
|
id = Number(String(id).replaceAll("-100", "-"));
|
|
15
15
|
if (id < 0) {
|
|
16
16
|
id = -id;
|
|
17
17
|
}
|
|
18
18
|
return colors[id % 7];
|
|
19
19
|
}
|
|
20
|
-
exports.
|
|
20
|
+
exports.getColor = getColor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
2
|
/** This object represents a phone contact. */
|
|
3
3
|
export interface Contact {
|
|
4
4
|
/** Contact's phone number */
|
|
@@ -7,7 +7,7 @@ export interface Contact {
|
|
|
7
7
|
firstName: string;
|
|
8
8
|
/** Contact's last name */
|
|
9
9
|
lastName?: string;
|
|
10
|
-
/** Contact's user identifier in Telegram
|
|
10
|
+
/** Contact's user identifier in Telegram */
|
|
11
11
|
userId?: number;
|
|
12
12
|
/** Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard) */
|
|
13
13
|
vcard?: string;
|
package/script/types/0_dice.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
2
|
/** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. */
|
|
3
3
|
export interface ForceReply {
|
|
4
4
|
/** Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' */
|
|
@@ -1,30 +1,7 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.forceReplyToTlObject = exports.constructForceReply = void 0;
|
|
27
|
-
const
|
|
4
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
28
5
|
function constructForceReply(replyMarkup_) {
|
|
29
6
|
const replyMarkup = { forceReply: true };
|
|
30
7
|
if (replyMarkup_.placeholder) {
|
|
@@ -37,7 +14,7 @@ function constructForceReply(replyMarkup_) {
|
|
|
37
14
|
}
|
|
38
15
|
exports.constructForceReply = constructForceReply;
|
|
39
16
|
function forceReplyToTlObject(replyMarkup) {
|
|
40
|
-
return new types.ReplyKeyboardForceReply({
|
|
17
|
+
return new _2_tl_js_1.types.ReplyKeyboardForceReply({
|
|
41
18
|
selective: replyMarkup.selective || undefined,
|
|
42
19
|
placeholder: replyMarkup.inputFieldPlaceholder,
|
|
43
20
|
});
|
|
@@ -1,43 +1,19 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.constructLocation = void 0;
|
|
27
|
-
const
|
|
28
|
-
const types = __importStar(require("../tl/2_types.js"));
|
|
4
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
29
5
|
function constructLocation(geo_) {
|
|
30
|
-
if (geo_ instanceof types.MessageMediaGeo) {
|
|
31
|
-
const geo = geo_.geo[
|
|
6
|
+
if (geo_ instanceof _2_tl_js_1.types.MessageMediaGeo) {
|
|
7
|
+
const geo = geo_.geo[_2_tl_js_1.as](_2_tl_js_1.types.GeoPoint);
|
|
32
8
|
return {
|
|
33
9
|
latitude: geo.lat,
|
|
34
10
|
longitude: geo.long,
|
|
35
11
|
horizontalAccuracy: geo.accuracyRadius,
|
|
36
12
|
};
|
|
37
13
|
}
|
|
38
|
-
else if (geo_ instanceof types.MessageMediaGeoLive) {
|
|
14
|
+
else if (geo_ instanceof _2_tl_js_1.types.MessageMediaGeoLive) {
|
|
39
15
|
const media = geo_;
|
|
40
|
-
const geo = media.geo[
|
|
16
|
+
const geo = media.geo[_2_tl_js_1.as](_2_tl_js_1.types.GeoPoint);
|
|
41
17
|
return {
|
|
42
18
|
latitude: geo.lat,
|
|
43
19
|
longitude: geo.long,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
2
|
/** This object describes the position on faces where a mask should be placed by default. */
|
|
3
3
|
export interface MaskPosition {
|
|
4
4
|
/** The part of the face relative to which the mask should be placed. One of "forehead", "eyes", "mouth", or "chin". */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
2
|
export type MessageEntityType = "mention" | "hashtag" | "bot_command" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "text_link" | "text_mention" | "cashtag" | "phone_number" | "underline" | "strikethrough" | "blockquote" | "bank_card" | "spoiler" | "custom_emoji";
|
|
3
3
|
export declare namespace MessageEntity {
|
|
4
4
|
interface Base {
|
|
@@ -31,7 +31,7 @@ export declare namespace MessageEntity {
|
|
|
31
31
|
}
|
|
32
32
|
interface Pre extends Base {
|
|
33
33
|
type: "pre";
|
|
34
|
-
/** For
|
|
34
|
+
/** For "pre" only, the programming language of the entity text */
|
|
35
35
|
language: string;
|
|
36
36
|
}
|
|
37
37
|
interface Code extends Base {
|
|
@@ -39,12 +39,12 @@ export declare namespace MessageEntity {
|
|
|
39
39
|
}
|
|
40
40
|
interface TextLink extends Base {
|
|
41
41
|
type: "text_link";
|
|
42
|
-
/** For
|
|
42
|
+
/** For "text_link" 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
46
|
type: "text_mention";
|
|
47
|
-
/** For
|
|
47
|
+
/** For "text_mention" only, the ID of the mentioned user */
|
|
48
48
|
userId: number;
|
|
49
49
|
}
|
|
50
50
|
interface Cashtag extends Base {
|
|
@@ -70,7 +70,7 @@ export declare namespace MessageEntity {
|
|
|
70
70
|
}
|
|
71
71
|
interface CustomEmoji extends Base {
|
|
72
72
|
type: "custom_emoji";
|
|
73
|
-
/** For
|
|
73
|
+
/** For "custom_emoji" only, unique identifier of the custom emoji */
|
|
74
74
|
customEmojiId: string;
|
|
75
75
|
}
|
|
76
76
|
}
|