@mtkruto/node 0.1.145 → 0.1.147

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.
Files changed (71) hide show
  1. package/esm/3_types.d.ts +3 -1
  2. package/esm/3_types.js +3 -1
  3. package/esm/4_constants.d.ts +1 -1
  4. package/esm/4_constants.js +1 -1
  5. package/esm/client/1_reaction_manager.d.ts +4 -2
  6. package/esm/client/2_message_manager.d.ts +3 -2
  7. package/esm/client/2_message_manager.js +19 -2
  8. package/esm/client/3_callback_query_manager.d.ts +3 -2
  9. package/esm/client/3_chat_list_manager.d.ts +3 -2
  10. package/esm/client/3_inline_query_manager.d.ts +3 -2
  11. package/esm/client/3_inline_query_manager.js +1 -1
  12. package/esm/types/0_mini_app_info.d.ts +6 -0
  13. package/esm/types/0_mini_app_info.js +3 -0
  14. package/esm/types/0_network_statistics_entry.d.ts +1 -0
  15. package/esm/types/0_reaction.d.ts +1 -0
  16. package/esm/types/1_inline_query_result_button.d.ts +2 -2
  17. package/esm/types/1_input_message_content.d.ts +1 -0
  18. package/esm/types/1_keyboard_button.d.ts +5 -4
  19. package/esm/types/1_keyboard_button.js +3 -3
  20. package/esm/types/1_network_statistics.d.ts +1 -0
  21. package/esm/types/2_inline_keyboard_button.d.ts +4 -4
  22. package/esm/types/2_inline_keyboard_button.js +4 -4
  23. package/esm/types/2_inline_query.d.ts +1 -0
  24. package/esm/types/2_invite_link.d.ts +23 -0
  25. package/esm/types/2_invite_link.js +27 -0
  26. package/esm/types/2_message_reaction_count.d.ts +1 -0
  27. package/esm/types/3_chat_member_updated.d.ts +23 -0
  28. package/esm/types/3_chat_member_updated.js +33 -0
  29. package/esm/types/4_inline_query_result.d.ts +1 -0
  30. package/esm/types/4_inline_query_result.js +1 -1
  31. package/esm/types/4_message.d.ts +8 -8
  32. package/esm/types/4_message.js +2 -2
  33. package/esm/types/6_update.d.ts +19 -2
  34. package/package.json +1 -1
  35. package/script/3_types.d.ts +3 -1
  36. package/script/3_types.js +3 -1
  37. package/script/4_constants.d.ts +1 -1
  38. package/script/4_constants.js +1 -1
  39. package/script/client/1_reaction_manager.d.ts +4 -2
  40. package/script/client/2_message_manager.d.ts +3 -2
  41. package/script/client/2_message_manager.js +51 -34
  42. package/script/client/3_callback_query_manager.d.ts +3 -2
  43. package/script/client/3_chat_list_manager.d.ts +3 -2
  44. package/script/client/3_inline_query_manager.d.ts +3 -2
  45. package/script/client/3_inline_query_manager.js +1 -1
  46. package/script/types/0_mini_app_info.d.ts +6 -0
  47. package/script/types/0_mini_app_info.js +7 -0
  48. package/script/types/0_network_statistics_entry.d.ts +1 -0
  49. package/script/types/0_reaction.d.ts +1 -0
  50. package/script/types/1_inline_query_result_button.d.ts +2 -2
  51. package/script/types/1_input_message_content.d.ts +1 -0
  52. package/script/types/1_keyboard_button.d.ts +5 -4
  53. package/script/types/1_keyboard_button.js +3 -3
  54. package/script/types/1_network_statistics.d.ts +1 -0
  55. package/script/types/2_inline_keyboard_button.d.ts +4 -4
  56. package/script/types/2_inline_keyboard_button.js +4 -4
  57. package/script/types/2_inline_query.d.ts +1 -0
  58. package/script/types/2_invite_link.d.ts +23 -0
  59. package/script/types/2_invite_link.js +31 -0
  60. package/script/types/2_message_reaction_count.d.ts +1 -0
  61. package/script/types/3_chat_member_updated.d.ts +23 -0
  62. package/script/types/3_chat_member_updated.js +37 -0
  63. package/script/types/4_inline_query_result.d.ts +1 -0
  64. package/script/types/4_inline_query_result.js +1 -1
  65. package/script/types/4_message.d.ts +8 -8
  66. package/script/types/4_message.js +2 -2
  67. package/script/types/6_update.d.ts +19 -2
  68. package/esm/types/0_web_app_info.d.ts +0 -5
  69. package/esm/types/0_web_app_info.js +0 -3
  70. package/script/types/0_web_app_info.d.ts +0 -5
  71. package/script/types/0_web_app_info.js +0 -7
@@ -6,6 +6,7 @@ import { InlineQuery } from "./2_inline_query.js";
6
6
  import { MessageInteractions } from "./2_message_interactions.js";
7
7
  import { MessageReactionCount } from "./2_message_reaction_count.js";
8
8
  import { MessageReactions } from "./2_message_reactions.js";
9
+ import { ChatMemberUpdated } from "./3_chat_member_updated.js";
9
10
  import { Message } from "./4_message.js";
10
11
  import { CallbackQuery } from "./5_callback_query.js";
11
12
  import { Chat } from "./5_chat.js";
@@ -183,6 +184,20 @@ export interface UpdateMessageReactionCount {
183
184
  export interface UpdateMessageReactions {
184
185
  messageReactions: MessageReactions;
185
186
  }
187
+ /**
188
+ * The status of a chat member was changed.
189
+ * @unlisted
190
+ */
191
+ export interface UpdateChatMember {
192
+ chatMember: ChatMemberUpdated;
193
+ }
194
+ /**
195
+ * The status of the current account was changed in a chat.
196
+ * @unlisted
197
+ */
198
+ export interface UpdateMyChatMember {
199
+ myChatMember: ChatMemberUpdated;
200
+ }
186
201
  /** @unlisted */
187
202
  export interface UpdateMap {
188
203
  message: UpdateNewMessage;
@@ -199,8 +214,10 @@ export interface UpdateMap {
199
214
  messageInteractions: UpdateMessageInteractions;
200
215
  messageReactionCount: UpdateMessageReactionCount;
201
216
  messageReactions: UpdateMessageReactions;
217
+ chatMember: UpdateChatMember;
218
+ myChatMember: UpdateMyChatMember;
202
219
  }
203
220
  /** @unlisted */
204
- export type UpdateIntersection<T> = T & Partial<UpdateConnectionState & UpdateAuthorizationState & UpdateNewMessage & UpdateEditedMessage & UpdateDeletedMessages & UpdateCallbackQuery & UpdateInlineQuery & UpdateChosenInlineResult & UpdateNewChat & UpdateEditedChat & UpdateDeletedChat & UpdateMessageInteractions & UpdateMessageReactionCount & UpdateMessageReactions>;
221
+ export type UpdateIntersection<T> = T & Partial<UpdateConnectionState & UpdateAuthorizationState & UpdateNewMessage & UpdateEditedMessage & UpdateDeletedMessages & UpdateCallbackQuery & UpdateInlineQuery & UpdateChosenInlineResult & UpdateNewChat & UpdateEditedChat & UpdateDeletedChat & UpdateMessageInteractions & UpdateMessageReactionCount & UpdateMessageReactions & UpdateChatMember & UpdateMyChatMember>;
205
222
  /** An incoming update. */
206
- export type Update = UpdateConnectionState | UpdateAuthorizationState | UpdateNewMessage | UpdateEditedMessage | UpdateDeletedMessages | UpdateCallbackQuery | UpdateInlineQuery | UpdateChosenInlineResult | UpdateNewChat | UpdateEditedChat | UpdateDeletedChat | UpdateMessageInteractions | UpdateMessageReactionCount | UpdateMessageReactions;
223
+ export type Update = UpdateConnectionState | UpdateAuthorizationState | UpdateNewMessage | UpdateEditedMessage | UpdateDeletedMessages | UpdateCallbackQuery | UpdateInlineQuery | UpdateChosenInlineResult | UpdateNewChat | UpdateEditedChat | UpdateDeletedChat | UpdateMessageInteractions | UpdateMessageReactionCount | UpdateMessageReactions | UpdateChatMember | UpdateMyChatMember;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtkruto/node",
3
- "version": "0.1.145",
3
+ "version": "0.1.147",
4
4
  "description": "MTKruto for Node.js",
5
5
  "author": "Roj <rojvv@icloud.com>",
6
6
  "repository": {
@@ -18,6 +18,7 @@ export * from "./types/0_login_url.js";
18
18
  export * from "./types/0_mask_position.js";
19
19
  export * from "./types/0_message_entity.js";
20
20
  export * from "./types/0_message_identifier.js";
21
+ export * from "./types/0_mini_app_info.js";
21
22
  export * from "./types/0_network_statistics_entry.js";
22
23
  export * from "./types/0_parse_mode.js";
23
24
  export * from "./types/0_poll_option.js";
@@ -26,7 +27,6 @@ export * from "./types/0_restriction_reason.js";
26
27
  export * from "./types/0_thumbnail.js";
27
28
  export * from "./types/0_venue.js";
28
29
  export * from "./types/0_voice.js";
29
- export * from "./types/0_web_app_info.js";
30
30
  export * from "./types/1_animation.js";
31
31
  export * from "./types/1_audio.js";
32
32
  export * from "./types/1_bot_command_scope.js";
@@ -52,9 +52,11 @@ export * from "./types/2_chosen_inline_result.js";
52
52
  export * from "./types/2_game.js";
53
53
  export * from "./types/2_inline_keyboard_button.js";
54
54
  export * from "./types/2_inline_query.js";
55
+ export * from "./types/2_invite_link.js";
55
56
  export * from "./types/2_message_interactions.js";
56
57
  export * from "./types/2_message_reaction_count.js";
57
58
  export * from "./types/2_message_reactions.js";
59
+ export * from "./types/3_chat_member_updated.js";
58
60
  export * from "./types/3_reply_markup.js";
59
61
  export * from "./types/4_inline_query_result.js";
60
62
  export * from "./types/4_message.js";
package/script/3_types.js CHANGED
@@ -34,6 +34,7 @@ __exportStar(require("./types/0_login_url.js"), exports);
34
34
  __exportStar(require("./types/0_mask_position.js"), exports);
35
35
  __exportStar(require("./types/0_message_entity.js"), exports);
36
36
  __exportStar(require("./types/0_message_identifier.js"), exports);
37
+ __exportStar(require("./types/0_mini_app_info.js"), exports);
37
38
  __exportStar(require("./types/0_network_statistics_entry.js"), exports);
38
39
  __exportStar(require("./types/0_parse_mode.js"), exports);
39
40
  __exportStar(require("./types/0_poll_option.js"), exports);
@@ -42,7 +43,6 @@ __exportStar(require("./types/0_restriction_reason.js"), exports);
42
43
  __exportStar(require("./types/0_thumbnail.js"), exports);
43
44
  __exportStar(require("./types/0_venue.js"), exports);
44
45
  __exportStar(require("./types/0_voice.js"), exports);
45
- __exportStar(require("./types/0_web_app_info.js"), exports);
46
46
  __exportStar(require("./types/1_animation.js"), exports);
47
47
  __exportStar(require("./types/1_audio.js"), exports);
48
48
  __exportStar(require("./types/1_bot_command_scope.js"), exports);
@@ -68,9 +68,11 @@ __exportStar(require("./types/2_chosen_inline_result.js"), exports);
68
68
  __exportStar(require("./types/2_game.js"), exports);
69
69
  __exportStar(require("./types/2_inline_keyboard_button.js"), exports);
70
70
  __exportStar(require("./types/2_inline_query.js"), exports);
71
+ __exportStar(require("./types/2_invite_link.js"), exports);
71
72
  __exportStar(require("./types/2_message_interactions.js"), exports);
72
73
  __exportStar(require("./types/2_message_reaction_count.js"), exports);
73
74
  __exportStar(require("./types/2_message_reactions.js"), exports);
75
+ __exportStar(require("./types/3_chat_member_updated.js"), exports);
74
76
  __exportStar(require("./types/3_reply_markup.js"), exports);
75
77
  __exportStar(require("./types/4_inline_query_result.js"), exports);
76
78
  __exportStar(require("./types/4_message.js"), exports);
@@ -4,7 +4,7 @@ export type PublicKeys = readonly [bigint, [bigint, bigint]][];
4
4
  export declare const PUBLIC_KEYS: PublicKeys;
5
5
  export declare const INITIAL_DC: DC;
6
6
  export declare const LAYER = 172;
7
- export declare const APP_VERSION = "MTKruto 0.1.145";
7
+ export declare const APP_VERSION = "MTKruto 0.1.147";
8
8
  export declare const DEVICE_MODEL: string;
9
9
  export declare const LANG_CODE: string;
10
10
  export declare const LANG_PACK = "";
@@ -79,7 +79,7 @@ exports.PUBLIC_KEYS = Object.freeze([
79
79
  ]);
80
80
  exports.INITIAL_DC = "2";
81
81
  exports.LAYER = 172;
82
- exports.APP_VERSION = "MTKruto 0.1.145";
82
+ exports.APP_VERSION = "MTKruto 0.1.147";
83
83
  // @ts-ignore: lib
84
84
  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;
85
85
  exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -1,9 +1,11 @@
1
1
  import { enums, types } from "../2_tl.js";
2
2
  import { Update } from "../3_types.js";
3
3
  import { C } from "./0_types.js";
4
+ type ReactionManagerUpdate = types.UpdateBotMessageReactions | types.UpdateBotMessageReaction | types.UpdateMessageReactions | types.UpdateChannelMessageViews | types.UpdateChannelMessageForwards;
4
5
  export declare class ReactionManager {
5
6
  #private;
6
7
  constructor(c: C);
7
- static canHandleUpdate(update: enums.Update): update is types.UpdateBotMessageReactions | types.UpdateBotMessageReaction | types.UpdateMessageReactions | types.UpdateChannelMessageViews | types.UpdateChannelMessageForwards;
8
- handleUpdate(update: types.UpdateBotMessageReactions | types.UpdateBotMessageReaction | types.UpdateMessageReactions | types.UpdateChannelMessageViews | types.UpdateChannelMessageForwards): Promise<Update | null>;
8
+ static canHandleUpdate(update: enums.Update): update is ReactionManagerUpdate;
9
+ handleUpdate(update: ReactionManagerUpdate): Promise<Update | null>;
9
10
  }
11
+ export {};
@@ -7,6 +7,7 @@ import { FileManager } from "./1_file_manager.js";
7
7
  interface C extends C_ {
8
8
  fileManager: FileManager;
9
9
  }
10
+ type MessageManagerUpdate = types.UpdateNewMessage | types.UpdateNewChannelMessage | types.UpdateEditMessage | types.UpdateEditChannelMessage | types.UpdateDeleteMessages | types.UpdateDeleteChannelMessages | types.UpdateChannelParticipant | types.UpdateChatParticipant;
10
11
  export declare class MessageManager {
11
12
  #private;
12
13
  constructor(c: C);
@@ -46,8 +47,8 @@ export declare class MessageManager {
46
47
  setReactions(chatId: number, messageId: number, reactions: Reaction[], params?: SetReactionsParams): Promise<void>;
47
48
  addReaction(chatId: number, messageId: number, reaction: Reaction, params?: AddReactionParams): Promise<void>;
48
49
  removeReaction(chatId: number, messageId: number, reaction: Reaction): Promise<void>;
49
- static canHandleUpdate(update: enums.Update): update is types.UpdateNewMessage | types.UpdateNewChannelMessage | types.UpdateEditMessage | types.UpdateEditChannelMessage | types.UpdateDeleteMessages | types.UpdateDeleteChannelMessages;
50
- handleUpdate(update: types.UpdateNewMessage | types.UpdateNewChannelMessage | types.UpdateEditMessage | types.UpdateEditChannelMessage | types.UpdateDeleteMessages | types.UpdateDeleteChannelMessages): Promise<Update | null>;
50
+ static canHandleUpdate(update: enums.Update): update is MessageManagerUpdate;
51
+ handleUpdate(update: MessageManagerUpdate): Promise<Update | null>;
51
52
  sendChatAction(chatId: ID, action: ChatAction, params?: {
52
53
  messageThreadId?: number;
53
54
  }): Promise<void>;
@@ -17,6 +17,7 @@ const _0_deps_js_1 = require("../0_deps.js");
17
17
  const _1_utilities_js_1 = require("../1_utilities.js");
18
18
  const _2_tl_js_1 = require("../2_tl.js");
19
19
  const _3_types_js_1 = require("../3_types.js");
20
+ const _3_types_js_2 = require("../3_types.js");
20
21
  const _4_constants_js_1 = require("../4_constants.js");
21
22
  const _0_html_js_1 = require("./0_html.js");
22
23
  const _0_utilities_js_1 = require("./0_utilities.js");
@@ -103,7 +104,7 @@ class MessageManager {
103
104
  default:
104
105
  (0, _1_utilities_js_1.UNREACHABLE)();
105
106
  }
106
- const entities = entities_?.length > 0 ? await Promise.all(entities_.map((v) => (0, _3_types_js_1.messageEntityToTlObject)(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity))) : undefined;
107
+ const entities = entities_?.length > 0 ? await Promise.all(entities_.map((v) => (0, _3_types_js_2.messageEntityToTlObject)(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity))) : undefined;
107
108
  return [text, entities];
108
109
  }
109
110
  async getStickerSetName(inputStickerSet, hash = 0) {
@@ -119,7 +120,7 @@ class MessageManager {
119
120
  }
120
121
  }
121
122
  async constructMessage(message_, r) {
122
- return await (0, _3_types_js_1.constructMessage)(message_, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity, this.getMessage.bind(this), this.getStickerSetName.bind(this), r);
123
+ return await (0, _3_types_js_2.constructMessage)(message_, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity, this.getMessage.bind(this), this.getStickerSetName.bind(this), r);
123
124
  }
124
125
  async forwardMessages(from, to, messageIds, params) {
125
126
  const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.forwardMessages({
@@ -201,7 +202,7 @@ class MessageManager {
201
202
  reply_markup: replyMarkup,
202
203
  });
203
204
  const message_ = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
204
- return (0, _3_types_js_1.assertMessageType)(message_, "text");
205
+ return (0, _3_types_js_2.assertMessageType)(message_, "text");
205
206
  }
206
207
  async sendVenue(chatId, latitude, longitude, title, address, params) {
207
208
  const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
@@ -232,7 +233,7 @@ class MessageManager {
232
233
  message: "",
233
234
  });
234
235
  const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
235
- return (0, _3_types_js_1.assertMessageType)(message, "venue");
236
+ return (0, _3_types_js_2.assertMessageType)(message, "venue");
236
237
  }
237
238
  async sendContact(chatId, firstName, number, params) {
238
239
  const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
@@ -258,7 +259,7 @@ class MessageManager {
258
259
  message: "",
259
260
  });
260
261
  const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
261
- return (0, _3_types_js_1.assertMessageType)(message, "contact");
262
+ return (0, _3_types_js_2.assertMessageType)(message, "contact");
262
263
  }
263
264
  async sendDice(chatId, params) {
264
265
  const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
@@ -281,7 +282,7 @@ class MessageManager {
281
282
  message: "",
282
283
  });
283
284
  const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
284
- return (0, _3_types_js_1.assertMessageType)(message, "dice");
285
+ return (0, _3_types_js_2.assertMessageType)(message, "dice");
285
286
  }
286
287
  async sendLocation(chatId, latitude, longitude, params) {
287
288
  const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
@@ -319,10 +320,10 @@ class MessageManager {
319
320
  message: "",
320
321
  });
321
322
  const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
322
- return (0, _3_types_js_1.assertMessageType)(message, "location");
323
+ return (0, _3_types_js_2.assertMessageType)(message, "location");
323
324
  }
324
325
  async sendVideoNote(chatId, audio, params) {
325
- const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, audio, params, _3_types_js_1.FileType.VideoNote, [
326
+ const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, audio, params, _3_types_js_2.FileType.VideoNote, [
326
327
  new _2_tl_js_1.types.DocumentAttributeVideo({
327
328
  round_message: true,
328
329
  w: params?.length ?? 0,
@@ -330,29 +331,29 @@ class MessageManager {
330
331
  duration: params?.duration ?? 0,
331
332
  }),
332
333
  ], false);
333
- return (0, _3_types_js_1.assertMessageType)(message, "videoNote");
334
+ return (0, _3_types_js_2.assertMessageType)(message, "videoNote");
334
335
  }
335
336
  async sendAudio(chatId, audio, params) {
336
- const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, audio, params, _3_types_js_1.FileType.Audio, [
337
+ const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, audio, params, _3_types_js_2.FileType.Audio, [
337
338
  new _2_tl_js_1.types.DocumentAttributeAudio({
338
339
  duration: params?.duration ?? 0,
339
340
  performer: params?.performer,
340
341
  title: params?.title,
341
342
  }),
342
343
  ]);
343
- return (0, _3_types_js_1.assertMessageType)(message, "audio");
344
+ return (0, _3_types_js_2.assertMessageType)(message, "audio");
344
345
  }
345
346
  async sendVoice(chatId, voice, params) {
346
- const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, voice, params, _3_types_js_1.FileType.Voice, [
347
+ const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, voice, params, _3_types_js_2.FileType.Voice, [
347
348
  new _2_tl_js_1.types.DocumentAttributeAudio({
348
349
  voice: true,
349
350
  duration: params?.duration ?? 0,
350
351
  }),
351
352
  ]);
352
- return (0, _3_types_js_1.assertMessageType)(message, "voice");
353
+ return (0, _3_types_js_2.assertMessageType)(message, "voice");
353
354
  }
354
355
  async sendAnimation(chatId, animation, params) {
355
- const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, animation, params, _3_types_js_1.FileType.Animation, [
356
+ const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, animation, params, _3_types_js_2.FileType.Animation, [
356
357
  new _2_tl_js_1.types.DocumentAttributeAnimated(),
357
358
  new _2_tl_js_1.types.DocumentAttributeVideo({
358
359
  supports_streaming: true,
@@ -361,10 +362,10 @@ class MessageManager {
361
362
  duration: params?.duration ?? 0,
362
363
  }),
363
364
  ]);
364
- return (0, _3_types_js_1.assertMessageType)(message, "animation");
365
+ return (0, _3_types_js_2.assertMessageType)(message, "animation");
365
366
  }
366
367
  async sendVideo(chatId, video, params) {
367
- const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, video, params, _3_types_js_1.FileType.Video, [
368
+ const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, video, params, _3_types_js_2.FileType.Video, [
368
369
  new _2_tl_js_1.types.DocumentAttributeVideo({
369
370
  supports_streaming: params?.supportsStreaming ? true : undefined,
370
371
  w: params?.width ?? 0,
@@ -372,17 +373,17 @@ class MessageManager {
372
373
  duration: params?.duration ?? 0,
373
374
  }),
374
375
  ]);
375
- return (0, _3_types_js_1.assertMessageType)(message, "video");
376
+ return (0, _3_types_js_2.assertMessageType)(message, "video");
376
377
  }
377
378
  async sendDocument(chatId, document, params) {
378
- const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, document, params, _3_types_js_1.FileType.Document, []);
379
- return (0, _3_types_js_1.assertMessageType)(message, "document");
379
+ const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, document, params, _3_types_js_2.FileType.Document, []);
380
+ return (0, _3_types_js_2.assertMessageType)(message, "document");
380
381
  }
381
382
  async sendPhoto(chatId, photo, params) {
382
383
  let media = null;
383
384
  const spoiler = params?.hasSpoiler ? true : undefined;
384
385
  if (typeof photo === "string") {
385
- const fileId = __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveFileId).call(this, photo, _3_types_js_1.FileType.Photo);
386
+ const fileId = __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveFileId).call(this, photo, _3_types_js_2.FileType.Photo);
386
387
  if (fileId != null) {
387
388
  media = new _2_tl_js_1.types.InputMediaPhoto({
388
389
  id: new _2_tl_js_1.types.InputPhoto(fileId),
@@ -401,7 +402,7 @@ class MessageManager {
401
402
  }
402
403
  }
403
404
  const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendMedia).call(this, chatId, media, params);
404
- return (0, _3_types_js_1.assertMessageType)(message, "photo");
405
+ return (0, _3_types_js_2.assertMessageType)(message, "photo");
405
406
  }
406
407
  async sendPoll(chatId, question, options, params) {
407
408
  const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
@@ -444,7 +445,7 @@ class MessageManager {
444
445
  message: "",
445
446
  });
446
447
  const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
447
- return (0, _3_types_js_1.assertMessageType)(message, "poll");
448
+ return (0, _3_types_js_2.assertMessageType)(message, "poll");
448
449
  }
449
450
  async editMessageReplyMarkup(chatId, messageId, params) {
450
451
  const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editMessage({
@@ -466,7 +467,7 @@ class MessageManager {
466
467
  reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
467
468
  });
468
469
  const message_ = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
469
- return (0, _3_types_js_1.assertMessageType)(message_, "text");
470
+ return (0, _3_types_js_2.assertMessageType)(message_, "text");
470
471
  }
471
472
  async deleteMessages(chatId, messageIds, params) {
472
473
  const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
@@ -516,7 +517,7 @@ class MessageManager {
516
517
  async addReaction(chatId, messageId, reaction, params) {
517
518
  const chosenReactions = await this.getMessage(chatId, messageId).then((v) => v?.reactions ?? []).then((v) => v.filter((v) => v.chosen));
518
519
  for (const r of chosenReactions) {
519
- if ((0, _3_types_js_1.reactionEqual)(r.reaction, reaction)) {
520
+ if ((0, _3_types_js_2.reactionEqual)(r.reaction, reaction)) {
520
521
  return;
521
522
  }
522
523
  }
@@ -526,7 +527,7 @@ class MessageManager {
526
527
  async removeReaction(chatId, messageId, reaction) {
527
528
  const chosenReactions = await this.getMessage(chatId, messageId).then((v) => v?.reactions ?? []).then((v) => v.filter((v) => v.chosen));
528
529
  for (const r of chosenReactions) {
529
- if ((0, _3_types_js_1.reactionEqual)(r.reaction, reaction)) {
530
+ if ((0, _3_types_js_2.reactionEqual)(r.reaction, reaction)) {
530
531
  const reactions = chosenReactions.filter((v) => v != r).map((v) => v.reaction);
531
532
  await this.setReactions(chatId, messageId, reactions);
532
533
  break;
@@ -534,14 +535,20 @@ class MessageManager {
534
535
  }
535
536
  }
536
537
  static canHandleUpdate(update) {
537
- return update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage || update instanceof _2_tl_js_1.types.UpdateDeleteMessages || update instanceof _2_tl_js_1.types.UpdateDeleteChannelMessages;
538
+ return update instanceof _2_tl_js_1.types.UpdateNewMessage ||
539
+ update instanceof _2_tl_js_1.types.UpdateNewChannelMessage ||
540
+ update instanceof _2_tl_js_1.types.UpdateEditMessage ||
541
+ update instanceof _2_tl_js_1.types.UpdateEditChannelMessage ||
542
+ update instanceof _2_tl_js_1.types.UpdateDeleteMessages ||
543
+ update instanceof _2_tl_js_1.types.UpdateDeleteChannelMessages ||
544
+ update instanceof _2_tl_js_1.types.UpdateChannelParticipant ||
545
+ update instanceof _2_tl_js_1.types.UpdateChatParticipant;
538
546
  }
539
547
  async handleUpdate(update) {
540
548
  if (update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage) {
541
549
  if (update.message instanceof _2_tl_js_1.types.Message || update.message instanceof _2_tl_js_1.types.MessageService) {
542
550
  const chatId = (0, _2_tl_js_1.peerToChatId)(update.message.peer_id);
543
551
  await __classPrivateFieldGet(this, _MessageManager_c, "f").storage.setMessage(chatId, update.message.id, update.message);
544
- // promises.push(this.#chatListManager.reassignChatLastMessage(chatId));
545
552
  }
546
553
  }
547
554
  if (update instanceof _2_tl_js_1.types.UpdateNewMessage ||
@@ -588,6 +595,16 @@ class MessageManager {
588
595
  }
589
596
  return { deletedMessages };
590
597
  }
598
+ if (update instanceof _2_tl_js_1.types.UpdateChannelParticipant || update instanceof _2_tl_js_1.types.UpdateChatParticipant) {
599
+ const chatMember = await (0, _3_types_js_1.constructChatMemberUpdated)(update, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity);
600
+ const selfId = await __classPrivateFieldGet(this, _MessageManager_c, "f").getSelfId();
601
+ if (chatMember.oldChatMember.user.id == selfId) {
602
+ return { myChatMember: chatMember };
603
+ }
604
+ else {
605
+ return { chatMember };
606
+ }
607
+ }
591
608
  return null;
592
609
  }
593
610
  async sendChatAction(chatId, action, params) {
@@ -721,7 +738,7 @@ class MessageManager {
721
738
  await __classPrivateFieldGet(this, _MessageManager_c, "f").api.channels.editBanned({
722
739
  channel: new _2_tl_js_1.types.InputChannel(chat),
723
740
  participant: member,
724
- banned_rights: (0, _3_types_js_1.chatMemberRightsToTlObject)(params?.rights, params?.untilDate),
741
+ banned_rights: (0, _3_types_js_2.chatMemberRightsToTlObject)(params?.rights, params?.untilDate),
725
742
  });
726
743
  }
727
744
  async getChatAdministrators(chatId) {
@@ -740,7 +757,7 @@ class MessageManager {
740
757
  }
741
758
  const chatMembers = new Array();
742
759
  for (const p of participants.participants) {
743
- chatMembers.push(await (0, _3_types_js_1.constructChatMember)(p, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity));
760
+ chatMembers.push(await (0, _3_types_js_2.constructChatMember)(p, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity));
744
761
  }
745
762
  return chatMembers;
746
763
  }
@@ -751,7 +768,7 @@ class MessageManager {
751
768
  }
752
769
  const chatMembers = new Array();
753
770
  for (const p of fullChat.full_chat.participants.participants) {
754
- chatMembers.push(await (0, _3_types_js_1.constructChatMember)(p, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity));
771
+ chatMembers.push(await (0, _3_types_js_2.constructChatMember)(p, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity));
755
772
  }
756
773
  return chatMembers;
757
774
  }
@@ -786,7 +803,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
786
803
  }, _MessageManager_constructReplyMarkup = async function _MessageManager_constructReplyMarkup(params) {
787
804
  if (params?.replyMarkup) {
788
805
  await __classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("replyMarkup");
789
- return (0, _3_types_js_1.replyMarkupToTlObject)(params.replyMarkup, this.usernameResolver.bind(this));
806
+ return (0, _3_types_js_2.replyMarkupToTlObject)(params.replyMarkup, this.usernameResolver.bind(this));
790
807
  }
791
808
  }, _MessageManager_resolveSendAs = async function _MessageManager_resolveSendAs(params) {
792
809
  const sendAs = params?.sendAs;
@@ -797,7 +814,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
797
814
  }, _MessageManager_constructReplyTo = async function _MessageManager_constructReplyTo(params) {
798
815
  const topMsgId = params?.messageThreadId;
799
816
  const replyToMsgId = params?.replyToMessageId;
800
- return replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: await Promise.all(params?.replyQuote?.entities.map((v) => (0, _3_types_js_1.messageEntityToTlObject)(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity)) ?? []), quote_offset: params?.replyQuote?.offset }) : undefined;
817
+ return replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: await Promise.all(params?.replyQuote?.entities.map((v) => (0, _3_types_js_2.messageEntityToTlObject)(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity)) ?? []), quote_offset: params?.replyQuote?.offset }) : undefined;
801
818
  }, _MessageManager_sendDocumentInner = async function _MessageManager_sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = false) {
802
819
  let media = null;
803
820
  const spoiler = params?.hasSpoiler ? true : undefined;
@@ -865,7 +882,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
865
882
  }, _MessageManager_resolveFileId = function _MessageManager_resolveFileId(maybeFileId, expectedFileType) {
866
883
  let fileId = null;
867
884
  try {
868
- fileId = _3_types_js_1.FileID.decode(maybeFileId);
885
+ fileId = _3_types_js_2.FileID.decode(maybeFileId);
869
886
  }
870
887
  catch (err) {
871
888
  d("fileId: %o", err);
@@ -888,7 +905,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
888
905
  await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.sendReaction({
889
906
  peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
890
907
  msg_id: messageId,
891
- reaction: reactions.map((v) => (0, _3_types_js_1.reactionToTlObject)(v)),
908
+ reaction: reactions.map((v) => (0, _3_types_js_2.reactionToTlObject)(v)),
892
909
  big: params?.big ? true : undefined,
893
910
  add_to_recent: params?.addToRecents ? true : undefined,
894
911
  });
@@ -6,11 +6,12 @@ import { MessageManager } from "./2_message_manager.js";
6
6
  type C = C_ & {
7
7
  messageManager: MessageManager;
8
8
  };
9
+ type CallbackQueryManagerUpdate = types.UpdateBotCallbackQuery | types.UpdateInlineBotCallbackQuery;
9
10
  export declare class CallbackQueryManager {
10
11
  #private;
11
12
  constructor(c: C);
12
13
  answerCallbackQuery(id: string, params?: AnswerCallbackQueryParams): Promise<void>;
13
- static canHandleUpdate(update: enums.Update): update is types.UpdateBotCallbackQuery | types.UpdateInlineBotCallbackQuery;
14
- handleUpdate(update: types.UpdateBotCallbackQuery | types.UpdateInlineBotCallbackQuery): Promise<Update>;
14
+ static canHandleUpdate(update: enums.Update): update is CallbackQueryManagerUpdate;
15
+ handleUpdate(update: CallbackQueryManagerUpdate): Promise<Update>;
15
16
  }
16
17
  export {};
@@ -5,13 +5,14 @@ import { MessageManager } from "./2_message_manager.js";
5
5
  type C = C_ & {
6
6
  messageManager: MessageManager;
7
7
  };
8
+ type ChatListManagerUpdate = types.UpdateNewMessage | types.UpdateNewChannelMessage | types.UpdatePinnedDialogs | types.UpdateFolderPeers | types.UpdateChannel | types.UpdateChat | types.UpdateUser | types.UpdateUserName;
8
9
  export declare class ChatListManager {
9
10
  #private;
10
11
  constructor(c: C);
11
12
  reassignChatLastMessage(chatId: number, add?: boolean, sendUpdate?: boolean): Promise<() => Promise<void>>;
12
13
  getChats(from?: "archived" | "main", after?: Chat, limit?: number): Promise<Chat[]>;
13
- static canHandleUpdate(update: enums.Update): update is types.UpdateNewMessage | types.UpdateNewChannelMessage | types.UpdatePinnedDialogs | types.UpdateFolderPeers | types.UpdateChannel | types.UpdateChat | types.UpdateUser | types.UpdateUserName;
14
- handleUpdate(update: types.UpdateNewMessage | types.UpdateNewChannelMessage | types.UpdatePinnedDialogs | types.UpdateFolderPeers | types.UpdateChannel | types.UpdateChat | types.UpdateUser | types.UpdateUserName): Promise<void>;
14
+ static canHandleUpdate(update: enums.Update): update is ChatListManagerUpdate;
15
+ handleUpdate(update: ChatListManagerUpdate): Promise<void>;
15
16
  getChat(chatId: ID): Promise<Chat>;
16
17
  }
17
18
  export {};
@@ -6,11 +6,12 @@ import { MessageManager } from "./2_message_manager.js";
6
6
  type C = C_ & {
7
7
  messageManager: MessageManager;
8
8
  };
9
+ type InlineQueryManagerUpdate = types.UpdateBotInlineQuery | types.UpdateBotInlineSend;
9
10
  export declare class InlineQueryManager {
10
11
  #private;
11
12
  constructor(c: C);
12
13
  answerInlineQuery(id: string, results: InlineQueryResult[], params?: AnswerInlineQueryParams): Promise<void>;
13
- static canHandleUpdate(update: enums.Update): update is types.UpdateBotInlineQuery | types.UpdateBotInlineSend;
14
- handleUpdate(update: types.UpdateBotInlineQuery | types.UpdateBotInlineSend): Promise<Update>;
14
+ static canHandleUpdate(update: enums.Update): update is InlineQueryManagerUpdate;
15
+ handleUpdate(update: InlineQueryManagerUpdate): Promise<Update>;
15
16
  }
16
17
  export {};
@@ -28,7 +28,7 @@ class InlineQueryManager {
28
28
  results: await Promise.all(results.map((v) => (0, _3_types_js_1.inlineQueryResultToTlObject)(v, __classPrivateFieldGet(this, _InlineQueryManager_c, "f").messageManager.parseText.bind(__classPrivateFieldGet(this, _InlineQueryManager_c, "f").messageManager), __classPrivateFieldGet(this, _InlineQueryManager_c, "f").messageManager.usernameResolver.bind(__classPrivateFieldGet(this, _InlineQueryManager_c, "f").messageManager)))),
29
29
  cache_time: params?.cacheTime ?? 300,
30
30
  private: params?.isPersonal ? true : undefined,
31
- switch_webview: params?.button && params.button.webApp ? new _2_tl_js_1.types.InlineBotWebView({ text: params.button.text, url: params.button.webApp.url }) : undefined,
31
+ switch_webview: params?.button && params.button.miniApp ? new _2_tl_js_1.types.InlineBotWebView({ text: params.button.text, url: params.button.miniApp.url }) : undefined,
32
32
  switch_pm: params?.button && params.button.startParameter ? new _2_tl_js_1.types.InlineBotSwitchPM({ text: params.button.text, start_param: params.button.startParameter }) : undefined,
33
33
  gallery: params?.isGallery ? true : undefined,
34
34
  next_offset: params?.nextOffset,
@@ -0,0 +1,6 @@
1
+ /** The necessary information to launch a mini app. */
2
+ export interface MiniAppInfo {
3
+ /** An HTTPS URL of the mini app to be opened with additional data. */
4
+ url: string;
5
+ }
6
+ export declare function constructMiniAppInfo(url: string): MiniAppInfo;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constructMiniAppInfo = void 0;
4
+ function constructMiniAppInfo(url) {
5
+ return { url };
6
+ }
7
+ exports.constructMiniAppInfo = constructMiniAppInfo;
@@ -1,3 +1,4 @@
1
+ /** An entry of a client's network statistics. */
1
2
  export interface NetworkStatisticsEntry {
2
3
  sent: number;
3
4
  received: number;
@@ -9,6 +9,7 @@ export interface ReactionCustomEmoji {
9
9
  type: "customEmoji";
10
10
  id: string;
11
11
  }
12
+ /** A reaction type. */
12
13
  export type Reaction = ReactionEmoji | ReactionCustomEmoji;
13
14
  export declare function constructReaction(reaction: enums.Reaction): Reaction;
14
15
  export declare function reactionToTlObject(reaction: Reaction): enums.Reaction;
@@ -1,6 +1,6 @@
1
- import { WebAppInfo } from "./0_web_app_info.js";
1
+ import { MiniAppInfo } from "./0_mini_app_info.js";
2
2
  export interface InlineQueryResultButton {
3
3
  text: string;
4
- webApp?: WebAppInfo;
4
+ miniApp?: MiniAppInfo;
5
5
  startParameter?: string;
6
6
  }
@@ -85,4 +85,5 @@ export interface InputMessageContentInvoice {
85
85
  sendEmailToProvider?: boolean;
86
86
  isFlexible?: boolean;
87
87
  }
88
+ /** The content of a message to be returned as an inline query result. */
88
89
  export type InputMessageContent = InputMessageContentText | InputMessageContentLocation | InputMessageContentVenue | InputMessageContentContact | InputMessageContentInvoice;
@@ -1,7 +1,7 @@
1
1
  import { enums } from "../2_tl.js";
2
2
  import { ChatAdministratorRights } from "./0_chat_administrator_rights.js";
3
3
  import { KeyboardButtonPollType } from "./0_keyboard_button_poll_type.js";
4
- import { WebAppInfo } from "./0_web_app_info.js";
4
+ import { MiniAppInfo } from "./0_mini_app_info.js";
5
5
  /** @unlisted */
6
6
  export interface KeyboardButtonText {
7
7
  text: string;
@@ -40,9 +40,10 @@ export interface KeyboardButtonRequestPoll extends KeyboardButtonText {
40
40
  requestPoll: KeyboardButtonPollType;
41
41
  }
42
42
  /** @unlisted */
43
- export interface KeyboardButtonWebApp extends KeyboardButtonText {
44
- webApp: WebAppInfo;
43
+ export interface KeyboardButtonMiniApp extends KeyboardButtonText {
44
+ miniApp: MiniAppInfo;
45
45
  }
46
- export type KeyboardButton = KeyboardButtonText | KeyboardButtonRequestUser | KeyboardButtonRequestChat | KeyboardButtonRequestContact | KeyboardButtonRequestLocation | KeyboardButtonRequestPoll | KeyboardButtonWebApp;
46
+ /** A button of a custom keyboard. */
47
+ export type KeyboardButton = KeyboardButtonText | KeyboardButtonRequestUser | KeyboardButtonRequestChat | KeyboardButtonRequestContact | KeyboardButtonRequestLocation | KeyboardButtonRequestPoll | KeyboardButtonMiniApp;
47
48
  export declare function constructKeyboardButton(button_: enums.KeyboardButton): KeyboardButton;
48
49
  export declare function keyboardButtonToTlObject(button: KeyboardButton): import("../tl/2_types.js").KeyboardButton_ | import("../tl/2_types.js").KeyboardButtonRequestPhone_ | import("../tl/2_types.js").KeyboardButtonRequestGeoLocation_ | import("../tl/2_types.js").KeyboardButtonRequestPoll_ | import("../tl/2_types.js").KeyboardButtonWebView_ | import("../tl/2_types.js").KeyboardButtonRequestPeer_;
@@ -75,7 +75,7 @@ function constructKeyboardButton(button_) {
75
75
  return button;
76
76
  }
77
77
  else if (button_ instanceof _2_tl_js_1.types.KeyboardButtonWebView || button_ instanceof _2_tl_js_1.types.KeyboardButtonSimpleWebView) {
78
- return { text: button_.text, webApp: { url: button_.url } };
78
+ return { text: button_.text, miniApp: { url: button_.url } };
79
79
  }
80
80
  else {
81
81
  (0, _1_utilities_js_1.UNREACHABLE)();
@@ -130,8 +130,8 @@ function keyboardButtonToTlObject(button) {
130
130
  else if ("requestPoll" in button) {
131
131
  return new _2_tl_js_1.types.KeyboardButtonRequestPoll({ text: button.text, quiz: button.requestPoll.type == "quiz" });
132
132
  }
133
- else if ("webApp" in button) {
134
- return new _2_tl_js_1.types.KeyboardButtonWebView({ text: button.text, url: button.webApp.url });
133
+ else if ("miniApp" in button) {
134
+ return new _2_tl_js_1.types.KeyboardButtonWebView({ text: button.text, url: button.miniApp.url });
135
135
  }
136
136
  else {
137
137
  return new _2_tl_js_1.types.KeyboardButton({ text: button.text });
@@ -1,4 +1,5 @@
1
1
  import { NetworkStatisticsEntry } from "./0_network_statistics_entry.js";
2
+ /** A client's network statistics. */
2
3
  export interface NetworkStatistics {
3
4
  messages: NetworkStatisticsEntry;
4
5
  cdn: NetworkStatisticsEntry;