@mtkruto/node 0.180.1 → 0.190.0

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 (125) hide show
  1. package/esm/3_types.d.ts +3 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +3 -0
  4. package/esm/client/0_params.d.ts +42 -30
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +42 -4
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  9. package/esm/client/2_client_encrypted.js +19 -12
  10. package/esm/client/2_file_manager.js +1 -1
  11. package/esm/client/3_account_manager.d.ts +2 -0
  12. package/esm/client/3_account_manager.d.ts.map +1 -1
  13. package/esm/client/3_account_manager.js +10 -0
  14. package/esm/client/3_message_manager.d.ts +1 -0
  15. package/esm/client/3_message_manager.d.ts.map +1 -1
  16. package/esm/client/3_message_manager.js +26 -19
  17. package/esm/client/3_secret_chat_manager.js +2 -2
  18. package/esm/client/4_chat_manager.d.ts +2 -1
  19. package/esm/client/4_chat_manager.d.ts.map +1 -1
  20. package/esm/client/4_chat_manager.js +7 -1
  21. package/esm/client/4_context.d.ts +126 -48
  22. package/esm/client/4_context.d.ts.map +1 -1
  23. package/esm/client/4_context.js +321 -125
  24. package/esm/client/4_poll_manager.d.ts +3 -1
  25. package/esm/client/4_poll_manager.d.ts.map +1 -1
  26. package/esm/client/4_poll_manager.js +16 -5
  27. package/esm/client/6_client.d.ts +45 -5
  28. package/esm/client/6_client.d.ts.map +1 -1
  29. package/esm/client/6_client.js +53 -3
  30. package/esm/client/6_client_dispatcher.d.ts +43 -5
  31. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  32. package/esm/client/6_client_dispatcher.js +51 -3
  33. package/esm/types/0_checklist_changed.d.ts +1 -1
  34. package/esm/types/0_checklist_changed.d.ts.map +1 -1
  35. package/esm/types/0_location.d.ts +2 -2
  36. package/esm/types/0_location.d.ts.map +1 -1
  37. package/esm/types/0_message_viewer.d.ts +29 -0
  38. package/esm/types/0_message_viewer.d.ts.map +1 -0
  39. package/esm/types/0_message_viewer.js +25 -0
  40. package/esm/types/1_input_poll_media.d.ts +5 -5
  41. package/esm/types/1_input_poll_media.d.ts.map +1 -1
  42. package/esm/types/1_input_sticker.d.ts +1 -1
  43. package/esm/types/1_sticker.d.ts +3 -3
  44. package/esm/types/1_sticker.d.ts.map +1 -1
  45. package/esm/types/1_video.d.ts +3 -3
  46. package/esm/types/1_video.d.ts.map +1 -1
  47. package/esm/types/1_video_note.d.ts +3 -3
  48. package/esm/types/1_video_note.d.ts.map +1 -1
  49. package/esm/types/2_poll_voter.d.ts +13 -0
  50. package/esm/types/2_poll_voter.d.ts.map +1 -0
  51. package/esm/types/2_poll_voter.js +18 -0
  52. package/esm/types/3_input_media.d.ts +5 -5
  53. package/esm/types/3_input_media.d.ts.map +1 -1
  54. package/esm/types/3_poll_voter_list.d.ts +31 -0
  55. package/esm/types/3_poll_voter_list.d.ts.map +1 -0
  56. package/esm/types/3_poll_voter_list.js +28 -0
  57. package/esm/types/4_reply_to.d.ts +2 -2
  58. package/esm/types/4_reply_to.d.ts.map +1 -1
  59. package/esm/types/6_message_content.d.ts +2 -2
  60. package/esm/types/6_message_content.d.ts.map +1 -1
  61. package/esm/types/B_update.d.ts +9 -9
  62. package/esm/types/B_update.d.ts.map +1 -1
  63. package/package.json +1 -1
  64. package/script/3_types.d.ts +3 -0
  65. package/script/3_types.d.ts.map +1 -1
  66. package/script/3_types.js +3 -0
  67. package/script/client/0_params.d.ts +42 -30
  68. package/script/client/0_params.d.ts.map +1 -1
  69. package/script/client/1_client_generic.d.ts +42 -4
  70. package/script/client/1_client_generic.d.ts.map +1 -1
  71. package/script/client/2_client_encrypted.d.ts.map +1 -1
  72. package/script/client/2_client_encrypted.js +19 -12
  73. package/script/client/2_file_manager.js +1 -1
  74. package/script/client/3_account_manager.d.ts +2 -0
  75. package/script/client/3_account_manager.d.ts.map +1 -1
  76. package/script/client/3_account_manager.js +10 -0
  77. package/script/client/3_message_manager.d.ts +1 -0
  78. package/script/client/3_message_manager.d.ts.map +1 -1
  79. package/script/client/3_message_manager.js +25 -18
  80. package/script/client/3_secret_chat_manager.js +2 -2
  81. package/script/client/4_chat_manager.d.ts +2 -1
  82. package/script/client/4_chat_manager.d.ts.map +1 -1
  83. package/script/client/4_chat_manager.js +7 -1
  84. package/script/client/4_context.d.ts +126 -48
  85. package/script/client/4_context.d.ts.map +1 -1
  86. package/script/client/4_context.js +321 -125
  87. package/script/client/4_poll_manager.d.ts +3 -1
  88. package/script/client/4_poll_manager.d.ts.map +1 -1
  89. package/script/client/4_poll_manager.js +15 -4
  90. package/script/client/6_client.d.ts +45 -5
  91. package/script/client/6_client.d.ts.map +1 -1
  92. package/script/client/6_client.js +53 -3
  93. package/script/client/6_client_dispatcher.d.ts +43 -5
  94. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  95. package/script/client/6_client_dispatcher.js +51 -3
  96. package/script/types/0_checklist_changed.d.ts +1 -1
  97. package/script/types/0_checklist_changed.d.ts.map +1 -1
  98. package/script/types/0_location.d.ts +2 -2
  99. package/script/types/0_location.d.ts.map +1 -1
  100. package/script/types/0_message_viewer.d.ts +29 -0
  101. package/script/types/0_message_viewer.d.ts.map +1 -0
  102. package/script/types/0_message_viewer.js +28 -0
  103. package/script/types/1_input_poll_media.d.ts +5 -5
  104. package/script/types/1_input_poll_media.d.ts.map +1 -1
  105. package/script/types/1_input_sticker.d.ts +1 -1
  106. package/script/types/1_sticker.d.ts +3 -3
  107. package/script/types/1_sticker.d.ts.map +1 -1
  108. package/script/types/1_video.d.ts +3 -3
  109. package/script/types/1_video.d.ts.map +1 -1
  110. package/script/types/1_video_note.d.ts +3 -3
  111. package/script/types/1_video_note.d.ts.map +1 -1
  112. package/script/types/2_poll_voter.d.ts +13 -0
  113. package/script/types/2_poll_voter.d.ts.map +1 -0
  114. package/script/types/2_poll_voter.js +21 -0
  115. package/script/types/3_input_media.d.ts +5 -5
  116. package/script/types/3_input_media.d.ts.map +1 -1
  117. package/script/types/3_poll_voter_list.d.ts +31 -0
  118. package/script/types/3_poll_voter_list.d.ts.map +1 -0
  119. package/script/types/3_poll_voter_list.js +31 -0
  120. package/script/types/4_reply_to.d.ts +2 -2
  121. package/script/types/4_reply_to.d.ts.map +1 -1
  122. package/script/types/6_message_content.d.ts +2 -2
  123. package/script/types/6_message_content.d.ts.map +1 -1
  124. package/script/types/B_update.d.ts +9 -9
  125. package/script/types/B_update.d.ts.map +1 -1
@@ -454,7 +454,7 @@ class MessageManager {
454
454
  quote_entities: await Promise.all(params.replyTo.quote?.entities.map((v) => (0, _3_types_js_2.messageEntityToTlObject)(v, this.#c.getPeer)) ?? []),
455
455
  quote_offset: params.replyTo.quote?.offset,
456
456
  monoforum_peer_id: directMessagesTopicId ? await this.#c.getInputPeer(directMessagesTopicId) : undefined,
457
- poll_option: params.replyTo.pollOptionId ? (0, _1_utilities_js_1.encodeText)(String(params.replyTo.pollOptionId)) : undefined,
457
+ poll_option: params.replyTo.pollOptionIndex ? (0, _1_utilities_js_1.encodeText)(String(params.replyTo.pollOptionIndex)) : undefined,
458
458
  todo_item_id: params.replyTo.checklistItemId,
459
459
  };
460
460
  }
@@ -667,13 +667,13 @@ class MessageManager {
667
667
  async sendVideo(chatId, video, params) {
668
668
  this.#checkParams(params);
669
669
  const message = await this.#sendDocumentInner(chatId, video, params, _3_types_js_2.FileType.Video, [
670
- { _: "documentAttributeVideo", supports_streaming: params?.supportsStreaming || undefined, w: params?.width ?? 0, h: params?.height ?? 0, duration: params?.duration ?? 0 },
670
+ { _: "documentAttributeVideo", supports_streaming: params?.isStreamingSupported || undefined, w: params?.width ?? 0, h: params?.height ?? 0, duration: params?.duration ?? 0 },
671
671
  ], undefined, VIDEO_MIME_TYPES, () => "video.mp4");
672
672
  return (0, _3_types_js_2.assertMessageType)(message, "video");
673
673
  }
674
674
  async #sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = true, expectedMimeTypes, createName) {
675
675
  let media = null;
676
- const spoiler = params?.hasSpoiler || undefined;
676
+ const spoiler = params?.isSpoiler || undefined;
677
677
  const ttl_seconds = params && "selfDestruct" in params && typeof params.selfDestruct !== undefined ? (0, _3_types_js_1.selfDestructOptionToInt)(params.selfDestruct) : undefined;
678
678
  if (typeof document === "string") {
679
679
  const fileId = this.resolveFileId(document, fileType);
@@ -1097,7 +1097,7 @@ class MessageManager {
1097
1097
  }
1098
1098
  async #resolveInputMediaInner(document, media, fileType, otherAttribs) {
1099
1099
  let media_ = null;
1100
- const spoiler = "hasSpoiler" in media && media.hasSpoiler || undefined;
1100
+ const spoiler = "isSpoiler" in media && media.isSpoiler || undefined;
1101
1101
  if (typeof document === "string") {
1102
1102
  const fileId = this.resolveFileId(document, fileType);
1103
1103
  if (fileId !== null) {
@@ -1144,7 +1144,7 @@ class MessageManager {
1144
1144
  return await this.#resolveInputMediaInner(media.document, media, _3_types_js_2.FileType.Document, []);
1145
1145
  case "photo": {
1146
1146
  let media_ = null;
1147
- const spoiler = media.hasSpoiler || undefined;
1147
+ const spoiler = media.isSpoiler || undefined;
1148
1148
  const ttl_seconds = "selfDestruct" in media && media.selfDestruct !== undefined ? (0, _3_types_js_1.selfDestructOptionToInt)(media.selfDestruct) : undefined;
1149
1149
  if (typeof media.photo === "string") {
1150
1150
  const fileId = this.resolveFileId(media.photo, [_3_types_js_2.FileType.Photo, _3_types_js_2.FileType.ProfilePhoto]);
@@ -1166,7 +1166,7 @@ class MessageManager {
1166
1166
  case "video": {
1167
1167
  const ttl_seconds = "selfDestruct" in media && media.selfDestruct !== undefined ? (0, _3_types_js_1.selfDestructOptionToInt)(media.selfDestruct) : undefined;
1168
1168
  const media_ = await this.#resolveInputMediaInner(media.video, media, _3_types_js_2.FileType.Video, [
1169
- { _: "documentAttributeVideo", supports_streaming: media?.supportsStreaming || undefined, w: media?.width ?? 0, h: media?.height ?? 0, duration: media?.duration ?? 0 },
1169
+ { _: "documentAttributeVideo", supports_streaming: media?.isStreamingSupported || undefined, w: media?.width ?? 0, h: media?.height ?? 0, duration: media?.duration ?? 0 },
1170
1170
  ]);
1171
1171
  media_.ttl_seconds = ttl_seconds;
1172
1172
  return media_;
@@ -1192,14 +1192,14 @@ class MessageManager {
1192
1192
  access_hash: messageMedia.photo.access_hash,
1193
1193
  file_reference: messageMedia.photo.file_reference,
1194
1194
  },
1195
- spoiler: "hasSpoiler" in media && media.hasSpoiler || undefined,
1195
+ spoiler: "isSpoiler" in media && media.isSpoiler || undefined,
1196
1196
  };
1197
1197
  }
1198
1198
  else if ("document" in messageMedia && _2_tl_js_1.Api.is("document", messageMedia.document)) {
1199
1199
  return {
1200
1200
  _: "inputMediaDocument",
1201
1201
  id: { _: "inputDocument", id: messageMedia.document.id, access_hash: messageMedia.document.access_hash, file_reference: messageMedia.document.file_reference },
1202
- spoiler: "hasSpoiler" in media && media.hasSpoiler || undefined,
1202
+ spoiler: "isSpoiler" in media && media.isSpoiler || undefined,
1203
1203
  };
1204
1204
  }
1205
1205
  else {
@@ -1224,7 +1224,7 @@ class MessageManager {
1224
1224
  }
1225
1225
  async #uploadPhoto(photo, params) {
1226
1226
  let media = null;
1227
- const spoiler = params?.hasSpoiler || undefined;
1227
+ const spoiler = params?.isSpoiler || undefined;
1228
1228
  const ttl_seconds = params && "selfDestruct" in params && params.selfDestruct !== undefined ? (0, _3_types_js_1.selfDestructOptionToInt)(params.selfDestruct) : undefined;
1229
1229
  let video;
1230
1230
  if (params?.video) {
@@ -1252,7 +1252,7 @@ class MessageManager {
1252
1252
  const uploadedMedia = await this.#c.invoke({
1253
1253
  _: "messages.uploadMedia",
1254
1254
  peer: { _: "inputPeerSelf" },
1255
- media: { _: "inputMediaUploadedDocument", file: result, attributes, mime_type: mimeType, spoiler: params?.hasSpoiler || undefined },
1255
+ media: { _: "inputMediaUploadedDocument", file: result, attributes, mime_type: mimeType, spoiler: params?.isSpoiler || undefined },
1256
1256
  });
1257
1257
  return _2_tl_js_1.Api.as("messageMediaDocument", uploadedMedia);
1258
1258
  }
@@ -1364,7 +1364,7 @@ class MessageManager {
1364
1364
  await this.#c.invoke({ _: "channels.deleteMessages", channel: (0, _0_utilities_js_1.toInputChannel)(peer), id: messageIds });
1365
1365
  }
1366
1366
  else {
1367
- await this.#c.invoke({ _: "messages.deleteMessages", id: messageIds, revoke: !params?.onlyForMe || undefined });
1367
+ await this.#c.invoke({ _: "messages.deleteMessages", id: messageIds, revoke: !params?.isOnlyForMe || undefined });
1368
1368
  }
1369
1369
  }
1370
1370
  async deleteScheduledMessages(chatId, messageIds) {
@@ -1743,12 +1743,12 @@ class MessageManager {
1743
1743
  prices: prices.map((v) => ({ _: "labeledPrice", label: v.label, amount: BigInt(v.amount) })),
1744
1744
  max_tip_amount: params?.maxTipAmount ? BigInt(params.maxTipAmount) : undefined,
1745
1745
  suggested_tip_amounts: params?.suggestedTipAmounts?.map(BigInt),
1746
- name_requested: params?.needName || undefined,
1747
- phone_requested: params?.needPhoneNumber || undefined,
1748
- email_requested: params?.needEmail || undefined,
1749
- shipping_address_requested: params?.needShippingAddress || undefined,
1750
- email_to_provider: params?.sendEmailToProvider || undefined,
1751
- phone_to_provider: params?.sendPhoneNumberToProvider || undefined,
1746
+ name_requested: params?.isNameNeeded || undefined,
1747
+ phone_requested: params?.isPhoneNumberNeeded || undefined,
1748
+ email_requested: params?.isEmailNeeded || undefined,
1749
+ shipping_address_requested: params?.isShippingAddressNeeded || undefined,
1750
+ email_to_provider: params?.isEmailSentToProvider || undefined,
1751
+ phone_to_provider: params?.isPhoneNumberSentToProvider || undefined,
1752
1752
  flexible: params?.isFlexible || undefined,
1753
1753
  };
1754
1754
  const message = await this.#sendMedia(chatId, {
@@ -1841,7 +1841,7 @@ class MessageManager {
1841
1841
  this.#c.storage.assertUser("startBot");
1842
1842
  const start_param = params?.deeplink?.trim() || "";
1843
1843
  if (params?.chatId !== undefined && !start_param) {
1844
- throw new _0_errors_js_1.InputError("deeplink cannot be unspecified while chatId is specified.");
1844
+ throw new _0_errors_js_1.InputError("deeplink must be specified when chatId is specified.");
1845
1845
  }
1846
1846
  if (!params?.deeplink) {
1847
1847
  return await this.sendMessage(botId, "/start");
@@ -2301,5 +2301,12 @@ class MessageManager {
2301
2301
  const result = await this.#c.invoke({ _: "messages.getOutboxReadDate", peer, msg_id });
2302
2302
  return result.date;
2303
2303
  }
2304
+ async getMessageViewers(chatId, messageId) {
2305
+ this.#c.storage.assertUser("getMessageViewers");
2306
+ const peer = await this.#c.getInputPeer(chatId);
2307
+ const msg_id = messageId;
2308
+ const result = await this.#c.invoke({ _: "messages.getMessageReadParticipants", peer, msg_id });
2309
+ return result.map(_3_types_js_1.constructMessageViewer);
2310
+ }
2304
2311
  }
2305
2312
  exports.MessageManager = MessageManager;
@@ -788,7 +788,7 @@ class SecretChatManager {
788
788
  const start = (action.start_seq_no - x) / 2;
789
789
  const end = (action.end_seq_no - x) / 2;
790
790
  if (start % 1 !== 0 || end % 1 !== 0 || start < 0 || end < start || end >= state.outSeqNo) {
791
- this.#L.debug("discarding secret chat", state.encryptedChat.id, "because an invalid resend rage was received");
791
+ this.#L.debug("discarding secret chat", state.encryptedChat.id, "because an invalid resend range was received");
792
792
  await this.#c.invoke({ _: "messages.discardEncryption", chat_id: state.encryptedChat.id });
793
793
  throw new TypeError("Received invalid secret chat resend range.");
794
794
  }
@@ -796,7 +796,7 @@ class SecretChatManager {
796
796
  for (let seqNo = start; seqNo <= end; ++seqNo) {
797
797
  const message = state.outgoingMessages.get(seqNo);
798
798
  if (!message) {
799
- this.#L.debug("discarding secret chat", state.encryptedChat.id, "because unable to resend message");
799
+ this.#L.debug("discarding secret chat", state.encryptedChat.id, "because the message could not be resent");
800
800
  await this.#c.invoke({ _: "messages.discardEncryption", chat_id: state.encryptedChat.id });
801
801
  throw new TypeError("Unable to resend secret chat message.");
802
802
  }
@@ -20,7 +20,7 @@
20
20
  import { Api } from "../2_tl.js";
21
21
  import { type AvailableReactions, type ChatP, type SlowModeDuration } from "../3_types.js";
22
22
  import { type FileSource, type ID, type ReportReason, type Update } from "../3_types.js";
23
- import type { AddChatMemberParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, DeclineJoinRequestsParams, EnableSignaturesParams, GetCreatedInviteLinksParams, GetJoinRequestsParams, PromoteChatMemberParams, ReportChatParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams } from "./0_params.js";
23
+ import type { AddChatMemberParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, DeclineJoinRequestsParams, EnableSignaturesParams, GetCreatedInviteLinksParams, GetJoinRequestsParams, MarkAllMentionsAsReadParams, PromoteChatMemberParams, ReportChatParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams } from "./0_params.js";
24
24
  import type { UpdateProcessor } from "./0_update_processor.js";
25
25
  import type { C as C_ } from "./1_types.js";
26
26
  import type { FileManager } from "./2_file_manager.js";
@@ -88,6 +88,7 @@ export declare class ChatManager implements UpdateProcessor<ChatManagerUpdate, t
88
88
  reportChat(chatId: ID, reason_: ReportReason, params?: ReportChatParams): Promise<void>;
89
89
  markChatAsUnread(chatId: ID): Promise<void>;
90
90
  markChatAsRead(chatId: ID): Promise<void>;
91
+ markAllMentionsAsRead(chatId: ID, params?: MarkAllMentionsAsReadParams): Promise<void>;
91
92
  }
92
93
  export {};
93
94
  //# sourceMappingURL=4_chat_manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"4_chat_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_chat_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,kBAAkB,EAAmE,KAAK,KAAK,EAAmK,KAAK,gBAAgB,EAA6B,MAAM,eAAe,CAAC;AACxV,OAAO,EAA8B,KAAK,UAAU,E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AE;IAMlD,qBAAqB,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM;IAkB9D,aAAa,CAAC,MAAM,EAAE,EAAE;IAKxB,cAAc,CAAC,MAAM,EAAE,EAAE;IAMzB,eAAe,CAAC,MAAM,EAAE,EAAE;IAa1B,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBvF,aAAa,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,mBAAmB;IAiBlE,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAmBxC,sBAAsB;IAMtB,kBAAkB,CAAC,MAAM,EAAE,EAAE;IAO7B,cAAc,CAAC,MAAM,EAAE,EAAE;IAOzB,cAAc,CAAC,MAAM,EAAE,EAAE;IAYzB,8BAA8B,CAAC,MAAM,EAAE,EAAE;IAKzC,+BAA+B,CAAC,MAAM,EAAE,EAAE;IAK1C,gBAAgB,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;IAOvC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,gBAAgB;IAavE,gBAAgB,CAAC,MAAM,EAAE,EAAE;IAK3B,cAAc,CAAC,MAAM,EAAE,EAAE;IAKzB,qBAAqB,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,2BAA2B;CAM7E"}
@@ -379,7 +379,7 @@ class ChatManager {
379
379
  const user_id = await this.#c.getInputUser(userId);
380
380
  const isSelf = _2_tl_js_1.Api.is("inputUserSelf", user_id);
381
381
  if (isSelf || _2_tl_js_1.Api.peerToChatId(user_id) === await this.#c.getSelfId()) {
382
- throw new _0_errors_js_1.InputError("A user ID except that of the current one was expected.");
382
+ throw new _0_errors_js_1.InputError("A user ID other than that of the current user was expected.");
383
383
  }
384
384
  const peer = await this.#c.getInputPeer(chatId);
385
385
  const ap = await this.#c.invoke({ _: "account.getPassword" });
@@ -522,5 +522,11 @@ class ChatManager {
522
522
  this.#c.storage.assertUser("markChatAsRead");
523
523
  await this.#setIsChatUnread(chatId, false);
524
524
  }
525
+ async markAllMentionsAsRead(chatId, params) {
526
+ this.#c.storage.assertUser("markAllMentionsAsRead");
527
+ const peer = await this.#c.getInputPeer(chatId);
528
+ const top_msg_id = params?.topicId;
529
+ await this.#c.invoke({ _: "messages.readMentions", peer, top_msg_id });
530
+ }
525
531
  }
526
532
  exports.ChatManager = ChatManager;
@@ -18,8 +18,8 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import { type Api } from "../2_tl.js";
21
- import type { AvailableReactions, BusinessConnection, CallbackQuery, Chat, ChatActionType, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ChosenInlineResult, ClaimedGifts, FailedInvitation, FileSource, GuestQuery, ID, InlineQuery, InlineQueryResult, InputChecklistItem, InputMedia, InputPollOption, InputRichText, InputStoryContent, InviteLink, JoinRequest, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageRichText, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, Poll, PriceTag, Reaction, RichText, SecretChat, SecretMessage, SlowModeDuration, Sticker, Story, Topic, Update, User, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
22
- import type { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessagesParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, ForwardMessagesParams, GetChatMembersParams, GetClaimedGiftsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetSavedMessagesParams, PinMessageParams, PromoteChatMemberParams, ReplyParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendSecretAnimationParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetReactionsParams, StartVideoChatParams, StopPollParams, UpdateChecklistParams } from "./0_params.js";
21
+ import type { AlbumStoryList, AvailableReactions, BusinessConnection, CallbackQuery, Chat, ChatActionType, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ChosenInlineResult, ClaimedGifts, FailedInvitation, FileSource, GuestQuery, ID, InlineQuery, InlineQueryResult, InputChecklistItem, InputGift, InputMedia, InputPollOption, InputRichText, InputStoryContent, InviteLink, JoinRequest, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageCounters, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLivePhoto, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageRichText, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, Poll, PollVoterList, PriceTag, Reaction, ReportReason, RichText, SecretChat, SecretMessage, SlowModeDuration, StarAmount, StarTransactionList, Sticker, Story, StoryAlbum, StoryReportResult, Topic, TranslatedText, Update, User, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
22
+ import type { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessagesParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, ForwardMessagesParams, GetChatMembersParams, GetClaimedGiftsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetPollVotersParams, GetSavedMessagesParams, GetStarTransactionsParams, PinMessageParams, PromoteChatMemberParams, ReplyParams, ReportChatParams, ReportStoryParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInvoiceParams, SendLivePhotoParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendSecretAnimationParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetReactionsParams, StartVideoChatParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UpdateChecklistParams } from "./0_params.js";
23
23
  import type { ClientGeneric } from "./1_client_generic.js";
24
24
  import { type FilterQuery, type WithChatType, type WithFilter } from "./3_filters.js";
25
25
  export type ContextCommands = string | RegExp | (string | RegExp)[] | {
@@ -73,16 +73,24 @@ export declare class Context {
73
73
  toJSON(): Update | {
74
74
  update: Api.Update;
75
75
  };
76
+ /** Context-aware alias for {@link Client.acceptSecretChat}. */
77
+ acceptSecretChat(): Promise<SecretChat>;
76
78
  /** Context-aware alias for {@link Client.addContact}. */
77
79
  addAsContact(firstName: string, params?: AddContactParams): Promise<void>;
78
80
  /** Context-aware alias for {@link Client.addChatMember}. */
79
81
  addMember(userId: ID, params?: AddChatMemberParams): Promise<FailedInvitation[]>;
80
82
  /** Context-aware alias for {@link Client.addChatMembers}. */
81
83
  addMembers(userIds: ID[]): Promise<FailedInvitation[]>;
84
+ /** Context-aware alias for {@link Client.addPollOption}. */
85
+ addPollOption(messageId: number, option: InputPollOption): Promise<void>;
82
86
  /** Context-aware alias for {@link Client.addReaction}. */
83
87
  addReaction(messageId: number, reaction: Reaction, params?: AddReactionParams): Promise<void>;
88
+ /** Context-aware alias for {@link Client.addStoriesToAlbum}. */
89
+ addStoriesToAlbum(albumId: number, storyIds: number[]): Promise<StoryAlbum>;
84
90
  /** Context-aware alias for {@link Client.addStoriesToHighlights}. */
85
91
  addStoriesToHighlights(storyIds: number[]): Promise<void>;
92
+ /** Context-aware alias for {@link Client.addStoryToAlbum}. */
93
+ addStoryToAlbum(albumId: number, storyId: number): Promise<StoryAlbum>;
86
94
  /** Context-aware alias for {@link Client.addStoryToHighlights}. */
87
95
  addStoryToHighlights(storyId: number): Promise<void>;
88
96
  /** Context-aware alias for {@link Client.addToChecklist}. */
@@ -119,20 +127,22 @@ export declare class Context {
119
127
  createInviteLink(params?: CreateInviteLinkParams): Promise<InviteLink>;
120
128
  /** Context-aware alias for {@link Client.createStory}. */
121
129
  createStory(content: InputStoryContent, params?: CreateStoryParams): Promise<Story>;
130
+ /** Context-aware alias for {@link Client.createStoryAlbum}. */
131
+ createStoryAlbum(name: string, storyIds: number[]): Promise<StoryAlbum>;
122
132
  /** Context-aware alias for {@link Client.createTopic}. */
123
133
  createTopic(title: string, params?: CreateTopicParams): Promise<Topic>;
124
134
  /** Context-aware alias for {@link Client.declineJoinRequest}. */
125
135
  declineJoinRequest(): Promise<void>;
126
136
  /** Context-aware alias for {@link Client.declineJoinRequests}. */
127
137
  declineJoinRequests(params?: DeclineJoinRequestsParams): Promise<void>;
128
- /** Context-aware alias for {@link Client.deleteChatPhoto}. */
129
- deleteChatPhoto(): Promise<void>;
130
138
  /** Context-aware alias for {@link Client.deleteMessage}. */
131
139
  delete(): Promise<void>;
132
140
  /** Context-aware alias for {@link Client.deleteChat}. */
133
141
  deleteChat(): Promise<void>;
134
142
  /** Context-aware alias for {@link Client.deleteChatMemberMessages}. */
135
143
  deleteChatMemberMessages(userId: ID): Promise<void>;
144
+ /** Context-aware alias for {@link Client.deleteChatPhoto}. */
145
+ deleteChatPhoto(): Promise<void>;
136
146
  /** Context-aware alias for {@link Client.deleteChatStickerSet}. */
137
147
  deleteChatStickerSet(): Promise<void>;
138
148
  /** Context-aware alias for {@link Client.deleteMessage}. */
@@ -151,6 +161,8 @@ export declare class Context {
151
161
  disableAntispam(): Promise<void>;
152
162
  /** Context-aware alias for {@link Client.disableBusinessBots}. */
153
163
  disableBusinessBots(): Promise<void>;
164
+ /** Context-aware alias for {@link Client.disableChatHistoryForNewMembers}. */
165
+ disableChatHistoryForNewMembers(): Promise<void>;
154
166
  /** Context-aware alias for {@link Client.disableJoinRequests}. */
155
167
  disableJoinRequests(): Promise<void>;
156
168
  /** Context-aware alias for {@link Client.disableSharing}. */
@@ -169,10 +181,10 @@ export declare class Context {
169
181
  editInlineMessageMedia(media: InputMedia, params?: EditInlineMessageMediaParams): Promise<void>;
170
182
  /** Context-aware alias for {@link Client.editInlineMessageReplyMarkup}. */
171
183
  editInlineMessageReplyMarkup(params?: EditMessageReplyMarkupParams): Promise<void>;
172
- /** Context-aware alias for {@link Client.editInlineMessageText}. */
173
- editInlineMessageText(text: string, params?: EditInlineMessageTextParams): Promise<void>;
174
184
  /** Context-aware alias for {@link Client.editInlineMessageRichText}. */
175
185
  editInlineMessageRichText(richText: InputRichText, params?: EditInlineMessageRichTextParams): Promise<void>;
186
+ /** Context-aware alias for {@link Client.editInlineMessageText}. */
187
+ editInlineMessageText(text: string, params?: EditInlineMessageTextParams): Promise<void>;
176
188
  /** Context-aware alias for {@link Client.editMessageCaption}. */
177
189
  editMessageCaption(messageId: number, params?: EditMessageCaptionParams): Promise<Message>;
178
190
  /** Context-aware alias for {@link Client.editMessageLiveLocation}. */
@@ -181,18 +193,18 @@ export declare class Context {
181
193
  editMessageMedia(messageId: number, media: InputMedia, params?: EditMessageMediaParams): Promise<Message>;
182
194
  /** Context-aware alias for {@link Client.editMessageReplyMarkup}. */
183
195
  editMessageReplyMarkup(messageId: number, params?: EditMessageReplyMarkupParams): Promise<Message>;
184
- /** Context-aware alias for {@link Client.editMessageText}. */
185
- editMessageText(messageId: number, text: string, params?: EditMessageTextParams): Promise<MessageText>;
186
- /** Context-aware alias for {@link Client.getRichText}. */
187
- getRichText(messageId: number): Promise<RichText | null>;
188
196
  /** Context-aware alias for {@link Client.editMessageRichText}. */
189
197
  editMessageRichText(messageId: number, richText: InputRichText, params?: EditMessageRichTextParams): Promise<MessageRichText>;
198
+ /** Context-aware alias for {@link Client.editMessageText}. */
199
+ editMessageText(messageId: number, text: string, params?: EditMessageTextParams): Promise<MessageText>;
190
200
  /** Context-aware alias for {@link Client.editTopic}. */
191
201
  editTopic(topicId: number, title: string, params?: EditTopicParams): Promise<Topic>;
192
202
  /** Context-aware alias for {@link Client.enableAntispam}. */
193
203
  enableAntispam(): Promise<void>;
194
204
  /** Context-aware alias for {@link Client.enableBusinessBots}. */
195
205
  enableBusinessBots(): Promise<void>;
206
+ /** Context-aware alias for {@link Client.enableChatHistoryForNewMembers}. */
207
+ enableChatHistoryForNewMembers(): Promise<void>;
196
208
  /** Context-aware alias for {@link Client.enableJoinRequests}. */
197
209
  enableJoinRequests(): Promise<void>;
198
210
  /** Context-aware alias for {@link Client.enableSharing}. */
@@ -201,6 +213,8 @@ export declare class Context {
201
213
  enableSignatures(params?: EnableSignaturesParams): Promise<void>;
202
214
  /** Context-aware alias for {@link Client.enableTopics}. */
203
215
  enableTopics(isShownAsTabs: boolean): Promise<void>;
216
+ /** Context-aware alias for {@link Client.acceptSecretChat}. */
217
+ endSecretChat(params?: EndSecretChatParams): Promise<SecretChat>;
204
218
  /** Context-aware alias for {@link Client.forwardMessage}. */
205
219
  forward(to: ID, params?: ForwardMessagesParams): Promise<Message>;
206
220
  /** Context-aware alias for {@link Client.forwardMessage}. */
@@ -231,32 +245,62 @@ export declare class Context {
231
245
  getJoinRequests(params?: GetJoinRequestsParams): Promise<JoinRequest[]>;
232
246
  /** Context-aware alias for {@link Client.getMessage}. */
233
247
  getMessage(messageId: number): Promise<Message | null>;
248
+ /** Context-aware alias for {@link Client.getMessageCounters}. */
249
+ getMessageCounters(messageId: number): Promise<MessageCounters>;
234
250
  /** Context-aware alias for {@link Client.getMessageReactions}. */
235
251
  getMessageReactions(messageId: number): Promise<MessageReactionList>;
252
+ /** Context-aware alias for {@link Client.getMessageReadDate}. */
253
+ getMessageReadDate(messageId: number): Promise<number>;
236
254
  /** Context-aware alias for {@link Client.getMessages}. */
237
255
  getMessages(messageIds: number[]): Promise<Message[]>;
256
+ /** Context-aware alias for {@link Client.getMessagesCounters}. */
257
+ getMessagesCounters(messageIds: number[]): Promise<MessageCounters[]>;
258
+ /** Context-aware alias for {@link Client.getOnlineCount}. */
259
+ getOnlineCount(): Promise<number>;
260
+ /** Context-aware alias for {@link Client.getPollVoters}. */
261
+ getPollVoters(messageId: number, params?: GetPollVotersParams): Promise<PollVoterList>;
262
+ /** Context-aware alias for {@link Client.getRichText}. */
263
+ getRichText(messageId: number): Promise<RichText | null>;
238
264
  /** Context-aware alias for {@link Client.getSavedMessages}. */
239
265
  getSavedMessages(params?: GetSavedMessagesParams): Promise<Message[]>;
266
+ /** Context-aware alias for {@link Client.getScheduledMessages}. */
267
+ getScheduledMessages(): Promise<Message[]>;
240
268
  /** Context-aware alias for {@link Client.getSimilarBots}. */
241
269
  getSimilarBots(): Promise<ChatPPrivate[]>;
242
270
  /** Context-aware alias for {@link Client.getSimilarChannels}. */
243
271
  getSimilarChannels(): Promise<ChatPChannel[]>;
272
+ /** Context-aware alias for {@link Client.getStarBalance}. */
273
+ getStarBalance(): Promise<StarAmount>;
274
+ /** Context-aware alias for {@link Client.getStarTransactions}. */
275
+ getStarTransactions(params?: GetStarTransactionsParams): Promise<StarTransactionList>;
244
276
  /** Context-aware alias for {@link Client.getStories}. */
245
277
  getStories(storyIds: number[]): Promise<Story[]>;
278
+ /** Context-aware alias for {@link Client.getStoriesInAlbum}. */
279
+ getStoriesInAlbum(albumId: number): Promise<AlbumStoryList>;
246
280
  /** Context-aware alias for {@link Client.getStory}. */
247
281
  getStory(storyId: number): Promise<Story | null>;
282
+ /** Context-aware alias for {@link Client.getStoryAlbums}. */
283
+ getStoryAlbums(): Promise<StoryAlbum[]>;
284
+ /** Context-aware alias for {@link Client.getTonBalance}. */
285
+ getTonBalance(): Promise<number>;
248
286
  /** Context-aware alias for {@link Client.sendGift}. */
249
287
  gift(giftId: string, params?: SendGiftParams): Promise<void>;
250
288
  /** Context-aware alias for {@link Client.hideGeneralTopic}. */
251
289
  hideGeneralTopic(): Promise<void>;
252
290
  /** Context-aware alias for {@link Client.hideMemberList}. */
253
291
  hideMemberList(): Promise<void>;
292
+ /** Context-aware alias for {@link Client.joinChat}. */
293
+ joinChat(): Promise<void>;
254
294
  /** Context-aware alias for {@link Client.kickChatMember}. */
255
295
  kickChatMember(memberId: ID): Promise<void>;
256
296
  /** Context-aware alias for {@link Client.kickChatMember}. */
257
297
  kickSender(): Promise<void>;
258
298
  /** Context-aware alias for {@link Client.leaveChat}. */
259
299
  leaveChat(): Promise<void>;
300
+ /** Context-aware alias for {@link Client.markChatAsRead}. */
301
+ markChatAsRead(): Promise<void>;
302
+ /** Context-aware alias for {@link Client.markChatAsUnread}. */
303
+ markChatAsUnread(): Promise<void>;
260
304
  /** Context-aware alias for {@link Client.openChat}. */
261
305
  open(): Promise<void>;
262
306
  /** Context-aware alias for {@link Client.pauseBusinessBotConnection}. */
@@ -277,52 +321,28 @@ export declare class Context {
277
321
  refundStarPayment(telegramPaymentChargeId: string): Promise<void>;
278
322
  /** Context-aware alias for {@link Client.deleteContact}. */
279
323
  removeAsContact(): Promise<void>;
324
+ /** Context-aware alias for {@link Client.removePollOption}. */
325
+ removePollOption(messageId: number, optionIndex: number): Promise<void>;
280
326
  /** Context-aware alias for {@link Client.removeReaction}. */
281
327
  removeReaction(messageId: number, reaction: Reaction): Promise<void>;
282
- /** Context-aware alias for {@link Client.removeUserReaction}. */
283
- removeUserReaction(messageId: number, userId: ID): Promise<void>;
284
- /** Context-aware alias for {@link Client.removeUserReactions}. */
285
- removeUserReactions(userId: ID): Promise<void>;
328
+ /** Context-aware alias for {@link Client.removeStoriesFromAlbum}. */
329
+ removeStoriesFromAlbum(albumId: number, storyIds: number[]): Promise<StoryAlbum>;
286
330
  /** Context-aware alias for {@link Client.removeStoriesFromHighlights}. */
287
331
  removeStoriesFromHighlights(storyIds: number[]): Promise<void>;
332
+ /** Context-aware alias for {@link Client.removeStoryFromAlbum}. */
333
+ removeStoryFromAlbum(albumId: number, storyId: number): Promise<StoryAlbum>;
288
334
  /** Context-aware alias for {@link Client.removeStoryFromHighlights}. */
289
335
  removeStoryFromHighlights(storyId: number): Promise<void>;
336
+ /** Context-aware alias for {@link Client.removeUserReaction}. */
337
+ removeUserReaction(messageId: number, userId: ID): Promise<void>;
338
+ /** Context-aware alias for {@link Client.removeUserReactions}. */
339
+ removeUserReactions(userId: ID): Promise<void>;
290
340
  /** Context-aware alias for {@link Client.reopenTopic}. */
291
341
  reopenTopic(topicId: number): Promise<void>;
292
- /** Context-aware alias for {@link Client.sendSecretMessage}. */
293
- replySecret(text: string, params?: Omit<SendSecretMessageParams, "replyToMessageId"> & ReplyParams): Promise<void>;
294
- /** Context-aware alias for {@link Client.sendSecretLocation}. */
295
- replySecretLocation(latitude: number, longitude: number, params?: Omit<SendSecretLocationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
296
- /** Context-aware alias for {@link Client.sendSecretVenue}. */
297
- replySecretVenue(latitude: number, longitude: number, title: string, address: string, params?: Omit<SendSecretVenueParams, "replyToMessageId"> & ReplyParams): Promise<void>;
298
- /** Context-aware alias for {@link Client.sendSecretContact}. */
299
- replySecretContact(firstName: string, phoneNumber: string, params?: Omit<SendSecretContactParams, "replyToMessageId"> & ReplyParams): Promise<void>;
300
- /** Context-aware alias for {@link Client.sendSecretDocument}. */
301
- replySecretDocument(document: FileSource, params?: Omit<SendSecretDocumentParams, "replyToMessageId"> & ReplyParams): Promise<void>;
302
- /** Context-aware alias for {@link Client.sendSecretPhoto}. */
303
- replySecretPhoto(photo: FileSource, params?: Omit<SendSecretPhotoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
304
- /** Context-aware alias for {@link Client.sendSecretVideo}. */
305
- replySecretVideo(video: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
306
- /** Context-aware alias for {@link Client.sendSecretVideoNote}. */
307
- replySecretVideoNote(videoNote: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
308
- /** Context-aware alias for {@link Client.sendSecretAnimation}. */
309
- replySecretAnimation(animation: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
310
- /** Context-aware alias for {@link Client.sendSecretAudio}. */
311
- replySecretAudio(audio: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
312
- /** Context-aware alias for {@link Client.sendSecretVoice}. */
313
- replySecretVoice(voice: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
314
- /** Context-aware alias for {@link Client.sendSecretSticker}. */
315
- replySecretSticker(sticker: Sticker, params?: Omit<SendSecretStickerParams, "replyToMessageId"> & ReplyParams): Promise<void>;
316
- /** Context-aware alias for {@link Client.acceptSecretChat}. */
317
- acceptSecretChat(): Promise<SecretChat>;
318
- /** Context-aware alias for {@link Client.acceptSecretChat}. */
319
- endSecretChat(params?: EndSecretChatParams): Promise<SecretChat>;
320
- /** Context-aware alias for {@link Client.requestSecretChat}. */
321
- requestSecretChat(): Promise<SecretChat>;
342
+ /** Context-aware alias for {@link Client.reorderStoriesInAlbum}. */
343
+ reorderStoriesInAlbum(albumId: number, storyIds: number[]): Promise<StoryAlbum>;
322
344
  /** Context-aware alias for {@link Client.sendMessage}. */
323
345
  reply(text: string, params?: Omit<SendMessageParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageText>;
324
- /** Context-aware alias for {@link Client.sendRichText}. */
325
- replyRichText(richText: InputRichText, params?: Omit<SendMessageParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageRichText>;
326
346
  /** Context-aware alias for {@link Client.sendAnimation}. */
327
347
  replyAnimation(animation: FileSource, params?: Omit<SendAnimationParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageAnimation>;
328
348
  /** Context-aware alias for {@link Client.sendAudio}. */
@@ -337,10 +357,10 @@ export declare class Context {
337
357
  replyDocument(document: FileSource, params?: Omit<SendDocumentParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageDocument>;
338
358
  /** Context-aware alias for {@link Client.sendMessageDraft}. */
339
359
  replyDraft(draftId: number, text: string, params?: Omit<SendMessageDraftParams, "messageThreadId"> & ReplyParams): Promise<void>;
340
- /** Context-aware alias for {@link Client.sendRichTextDraft}. */
341
- replyRichTextDraft(draftId: number, richText: InputRichText, params?: Omit<SendRichTextDraftParams, "messageThreadId"> & ReplyParams): Promise<void>;
342
360
  /** Context-aware alias for {@link Client.sendInvoice}. */
343
361
  replyInvoice(title: string, description: string, payload: string, currency: string, prices: PriceTag[], params?: Omit<SendInvoiceParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageInvoice>;
362
+ /** Context-aware alias for {@link Client.sendLivePhoto}. */
363
+ replyLivePhoto(photo: FileSource, video: FileSource, params?: Omit<SendLivePhotoParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageLivePhoto>;
344
364
  /** Context-aware alias for {@link Client.sendLocation}. */
345
365
  replyLocation(latitude: number, longitude: number, params?: Omit<SendLocationParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageLocation>;
346
366
  /** Context-aware alias for {@link Client.sendMediaGroup}. */
@@ -349,6 +369,34 @@ export declare class Context {
349
369
  replyPhoto(photo: FileSource, params?: Omit<SendPhotoParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessagePhoto>;
350
370
  /** Context-aware alias for {@link Client.sendPoll}. */
351
371
  replyPoll(question: string, options: InputPollOption[], params?: Omit<SendPollParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessagePoll>;
372
+ /** Context-aware alias for {@link Client.sendRichText}. */
373
+ replyRichText(richText: InputRichText, params?: Omit<SendMessageParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageRichText>;
374
+ /** Context-aware alias for {@link Client.sendRichTextDraft}. */
375
+ replyRichTextDraft(draftId: number, richText: InputRichText, params?: Omit<SendRichTextDraftParams, "messageThreadId"> & ReplyParams): Promise<void>;
376
+ /** Context-aware alias for {@link Client.sendSecretMessage}. */
377
+ replySecret(text: string, params?: Omit<SendSecretMessageParams, "replyToMessageId"> & ReplyParams): Promise<void>;
378
+ /** Context-aware alias for {@link Client.sendSecretAnimation}. */
379
+ replySecretAnimation(animation: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
380
+ /** Context-aware alias for {@link Client.sendSecretAudio}. */
381
+ replySecretAudio(audio: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
382
+ /** Context-aware alias for {@link Client.sendSecretContact}. */
383
+ replySecretContact(firstName: string, phoneNumber: string, params?: Omit<SendSecretContactParams, "replyToMessageId"> & ReplyParams): Promise<void>;
384
+ /** Context-aware alias for {@link Client.sendSecretDocument}. */
385
+ replySecretDocument(document: FileSource, params?: Omit<SendSecretDocumentParams, "replyToMessageId"> & ReplyParams): Promise<void>;
386
+ /** Context-aware alias for {@link Client.sendSecretLocation}. */
387
+ replySecretLocation(latitude: number, longitude: number, params?: Omit<SendSecretLocationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
388
+ /** Context-aware alias for {@link Client.sendSecretPhoto}. */
389
+ replySecretPhoto(photo: FileSource, params?: Omit<SendSecretPhotoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
390
+ /** Context-aware alias for {@link Client.sendSecretSticker}. */
391
+ replySecretSticker(sticker: Sticker, params?: Omit<SendSecretStickerParams, "replyToMessageId"> & ReplyParams): Promise<void>;
392
+ /** Context-aware alias for {@link Client.sendSecretVenue}. */
393
+ replySecretVenue(latitude: number, longitude: number, title: string, address: string, params?: Omit<SendSecretVenueParams, "replyToMessageId"> & ReplyParams): Promise<void>;
394
+ /** Context-aware alias for {@link Client.sendSecretVideo}. */
395
+ replySecretVideo(video: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
396
+ /** Context-aware alias for {@link Client.sendSecretVideoNote}. */
397
+ replySecretVideoNote(videoNote: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
398
+ /** Context-aware alias for {@link Client.sendSecretVoice}. */
399
+ replySecretVoice(voice: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
352
400
  /** Context-aware alias for {@link Client.sendSticker}. */
353
401
  replySticker(sticker: FileSource, params?: Omit<SendStickerParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageSticker>;
354
402
  /** Context-aware alias for {@link Client.sendVenue}. */
@@ -359,8 +407,18 @@ export declare class Context {
359
407
  replyVideoNote(videoNote: FileSource, params?: Omit<SendVideoNoteParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageVideoNote>;
360
408
  /** Context-aware alias for {@link Client.sendVoice}. */
361
409
  replyVoice(voice: FileSource, params?: Omit<SendVoiceParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageVoice>;
410
+ /** Context-aware alias for {@link Client.reportChat}. */
411
+ reportChat(reason: ReportReason, params?: ReportChatParams): Promise<void>;
412
+ /** Context-aware alias for {@link Client.reportStories}. */
413
+ reportStories(storyIds: number[], params?: ReportStoryParams): Promise<StoryReportResult>;
414
+ /** Context-aware alias for {@link Client.reportStory}. */
415
+ reportStory(storyId: number, params?: ReportStoryParams): Promise<StoryReportResult>;
416
+ /** Context-aware alias for {@link Client.requestSecretChat}. */
417
+ requestSecretChat(): Promise<SecretChat>;
362
418
  /** Context-aware alias for {@link Client.resumeBusinessBotConnection}. */
363
419
  resumeBusinessBotConnection(): Promise<void>;
420
+ /** Context-aware alias for {@link Client.retractVote}. */
421
+ retractVote(messageId: number): Promise<void>;
364
422
  /** Context-aware alias for {@link Client.scheduleVideoChat}. */
365
423
  scheduleVideoChat(startAt: number, params?: ScheduleVideoChatParams): Promise<VideoChatScheduled>;
366
424
  /** Context-aware alias for {@link Client.searchMessages}. */
@@ -371,6 +429,8 @@ export declare class Context {
371
429
  }): Promise<void>;
372
430
  /** Context-aware alias for {@link Client.sendScheduledMessage}. */
373
431
  sendScheduledMessage(messageId: number): Promise<Message>;
432
+ /** Context-aware alias for {@link Client.sendScheduledMessages}. */
433
+ sendScheduledMessages(messageIds: number[]): Promise<Message[]>;
374
434
  /** Context-aware alias for {@link Client.setAvailableReactions}. */
375
435
  setAvailableReactions(availableReactions: AvailableReactions): Promise<void>;
376
436
  /** Context-aware alias for {@link Client.setBoostsRequiredToCircumventRestrictions}. */
@@ -385,6 +445,8 @@ export declare class Context {
385
445
  setChatStickerSet(setName: string): Promise<void>;
386
446
  /** Context-aware alias for {@link Client.setChatTitle}. */
387
447
  setChatTitle(title: string): Promise<void>;
448
+ /** Context-aware alias for {@link Client.setDefaultSendAs}. */
449
+ setDefaultSendAs(sendAs: ID): Promise<void>;
388
450
  /** Context-aware alias for {@link Client.setDiscussionChat}. */
389
451
  setDiscussionChat(discussionChatId: ID): Promise<void>;
390
452
  /** Context-aware alias for {@link Client.setChatMemberTag}. */
@@ -397,6 +459,8 @@ export declare class Context {
397
459
  setSenderRights(params?: SetChatMemberRightsParams): Promise<void>;
398
460
  /** Context-aware alias for {@link Client.setSlowMode}. */
399
461
  setSlowMode(duration: SlowModeDuration): Promise<void>;
462
+ /** Context-aware alias for {@link Client.setStoryAlbumName}. */
463
+ setStoryAlbumName(albumId: number, name: string): Promise<StoryAlbum>;
400
464
  /** Context-aware alias for {@link Client.showGeneralTopic}. */
401
465
  showGeneralTopic(): Promise<void>;
402
466
  /** Context-aware alias for {@link Client.showMemberList}. */
@@ -405,10 +469,18 @@ export declare class Context {
405
469
  startVideoChat(params?: StartVideoChatParams): Promise<VideoChatActive>;
406
470
  /** Context-aware alias for {@link Client.stopPoll}. */
407
471
  stopPoll(messageId: number, params?: StopPollParams): Promise<Poll>;
472
+ /** Context-aware alias for {@link Client.summarizeText}. */
473
+ summarizeText(messageId: number, params?: SummarizeTextParams): Promise<TranslatedText>;
408
474
  /** Context-aware alias for {@link Client.transcribeVoice}. */
409
475
  transcribeVoice(messageId: number): Promise<VoiceTranscription>;
476
+ /** Context-aware alias for {@link Client.transferGift}. */
477
+ transferGift(gift: InputGift): Promise<void>;
410
478
  /** Context-aware alias for {@link Client.transferChatOwnership}. */
411
479
  transferOwnership(userId: ID, password: string): Promise<void>;
480
+ /** Context-aware alias for {@link Client.translateMessage}. */
481
+ translateMessage(toLanguage: string, messageId: number, params?: TranslateTextParams): Promise<TranslatedText>;
482
+ /** Context-aware alias for {@link Client.translateMessages}. */
483
+ translateMessages(toLanguage: string, messageIds: number[], params?: TranslateTextParams): Promise<TranslatedText[]>;
412
484
  /** Context-aware alias for {@link Client.unarchiveChat}. */
413
485
  unarchive(): Promise<void>;
414
486
  /** Context-aware alias for {@link Client.unbanChatMember}. */
@@ -429,6 +501,12 @@ export declare class Context {
429
501
  unpinTopic(topicId: number): Promise<void>;
430
502
  /** Context-aware alias for {@link Client.updateChecklist}. */
431
503
  updateChecklist(messageId: number, params?: UpdateChecklistParams): Promise<void>;
504
+ /** Context-aware alias for {@link Client.viewMessage}. */
505
+ viewMessage(messageId: number): Promise<void>;
506
+ /** Context-aware alias for {@link Client.viewMessages}. */
507
+ viewMessages(messageIds: number[]): Promise<void>;
508
+ /** Context-aware alias for {@link Client.vote}. */
509
+ vote(messageId: number, optionIndexes: number[]): Promise<void>;
432
510
  }
433
511
  export {};
434
512
  //# sourceMappingURL=4_context.d.ts.map