@mtkruto/node 0.113.0 → 0.115.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 (67) hide show
  1. package/esm/3_types.d.ts +1 -1
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +1 -1
  4. package/esm/client/0_params.d.ts +10 -0
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +63 -2
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_context.d.ts +384 -188
  9. package/esm/client/2_context.d.ts.map +1 -1
  10. package/esm/client/2_context.js +745 -402
  11. package/esm/client/3_message_manager.d.ts +2 -2
  12. package/esm/client/3_message_manager.d.ts.map +1 -1
  13. package/esm/client/3_message_manager.js +6 -2
  14. package/esm/client/4_checklist_manager.d.ts +38 -0
  15. package/esm/client/4_checklist_manager.d.ts.map +1 -0
  16. package/esm/client/4_checklist_manager.js +68 -0
  17. package/esm/client/4_gift_manager.d.ts +1 -0
  18. package/esm/client/4_gift_manager.d.ts.map +1 -1
  19. package/esm/client/4_gift_manager.js +6 -0
  20. package/esm/client/5_client.d.ts +63 -2
  21. package/esm/client/5_client.d.ts.map +1 -1
  22. package/esm/client/5_client.js +84 -2
  23. package/esm/client/5_client_dispatcher.d.ts +63 -2
  24. package/esm/client/5_client_dispatcher.d.ts.map +1 -1
  25. package/esm/client/5_client_dispatcher.js +80 -2
  26. package/esm/types/{0_working_hour_interval.d.ts → 0_working_hours_interval.d.ts} +2 -2
  27. package/esm/types/0_working_hours_interval.d.ts.map +1 -0
  28. package/esm/types/1_working_hours.d.ts +2 -2
  29. package/esm/types/1_working_hours.d.ts.map +1 -1
  30. package/esm/types/3_reply_quote.d.ts +1 -1
  31. package/esm/types/3_reply_quote.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/script/3_types.d.ts +1 -1
  34. package/script/3_types.d.ts.map +1 -1
  35. package/script/3_types.js +1 -1
  36. package/script/client/0_params.d.ts +10 -0
  37. package/script/client/0_params.d.ts.map +1 -1
  38. package/script/client/1_client_generic.d.ts +63 -2
  39. package/script/client/1_client_generic.d.ts.map +1 -1
  40. package/script/client/2_context.d.ts +384 -188
  41. package/script/client/2_context.d.ts.map +1 -1
  42. package/script/client/2_context.js +745 -402
  43. package/script/client/3_message_manager.d.ts +2 -2
  44. package/script/client/3_message_manager.d.ts.map +1 -1
  45. package/script/client/3_message_manager.js +6 -2
  46. package/script/client/4_checklist_manager.d.ts +38 -0
  47. package/script/client/4_checklist_manager.d.ts.map +1 -0
  48. package/script/client/4_checklist_manager.js +72 -0
  49. package/script/client/4_gift_manager.d.ts +1 -0
  50. package/script/client/4_gift_manager.d.ts.map +1 -1
  51. package/script/client/4_gift_manager.js +6 -0
  52. package/script/client/5_client.d.ts +63 -2
  53. package/script/client/5_client.d.ts.map +1 -1
  54. package/script/client/5_client.js +84 -2
  55. package/script/client/5_client_dispatcher.d.ts +63 -2
  56. package/script/client/5_client_dispatcher.d.ts.map +1 -1
  57. package/script/client/5_client_dispatcher.js +80 -2
  58. package/script/types/{0_working_hour_interval.d.ts → 0_working_hours_interval.d.ts} +2 -2
  59. package/script/types/0_working_hours_interval.d.ts.map +1 -0
  60. package/script/types/1_working_hours.d.ts +2 -2
  61. package/script/types/1_working_hours.d.ts.map +1 -1
  62. package/script/types/3_reply_quote.d.ts +1 -1
  63. package/script/types/3_reply_quote.d.ts.map +1 -1
  64. package/esm/types/0_working_hour_interval.d.ts.map +0 -1
  65. package/script/types/0_working_hour_interval.d.ts.map +0 -1
  66. /package/esm/types/{0_working_hour_interval.js → 0_working_hours_interval.js} +0 -0
  67. /package/script/types/{0_working_hour_interval.js → 0_working_hours_interval.js} +0 -0
@@ -149,283 +149,361 @@ class Context {
149
149
  }
150
150
  }
151
151
  /**
152
- * Context-aware alias for {@link Client.sendMessage}.
152
+ * Context-aware alias for {@link Client.addContact}.
153
153
  */
154
- async reply(text, params) {
155
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
156
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
157
- return await this.client.sendMessage(chatId, text, { ...params, ...replyTo, businessConnectionId });
154
+ async addAsContact(params) {
155
+ const chatId = this.#mustGetChatId();
156
+ return await this.client.addContact(chatId, params);
158
157
  }
159
158
  /**
160
- * Context-aware alias for {@link Client.sendMessageDraft}.
159
+ * Context-aware alias for {@link Client.addChatMember}.
161
160
  */
162
- async replyDraft(draftId, text, params) {
163
- const { chatId, messageId } = this.#mustGetMsg();
164
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
165
- return await this.client.sendMessageDraft(chatId, draftId, text, { ...params, ...replyTo });
161
+ async addMember(userId, params) {
162
+ const chatId = this.#mustGetChatId();
163
+ return await this.client.addChatMember(chatId, userId, params);
166
164
  }
167
165
  /**
168
- * Context-aware alias for {@link Client.sendPoll}.
166
+ * Context-aware alias for {@link Client.addChatMembers}.
169
167
  */
170
- async replyPoll(question, options, params) {
171
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
172
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
173
- return await this.client.sendPoll(chatId, question, options, { ...params, ...replyTo, businessConnectionId });
168
+ async addMembers(userIds) {
169
+ const chatId = this.#mustGetChatId();
170
+ return await this.client.addChatMembers(chatId, userIds);
174
171
  }
175
172
  /**
176
- * Context-aware alias for {@link Client.sendChecklist}.
173
+ * Context-aware alias for {@link Client.addReaction}.
177
174
  */
178
- async replyChecklist(title, items, params) {
179
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
180
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
181
- return await this.client.sendChecklist(chatId, title, items, { ...params, ...replyTo, businessConnectionId });
175
+ async addReaction(messageId, reaction, params) {
176
+ const chatId = this.#mustGetChatId();
177
+ return await this.client.addReaction(chatId, messageId, reaction, params);
182
178
  }
183
179
  /**
184
- * Context-aware alias for {@link Client.sendPhoto}.
180
+ * Context-aware alias for {@link Client.addStoriesToHighlights}.
185
181
  */
186
- async replyPhoto(photo, params) {
187
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
188
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
189
- return await this.client.sendPhoto(chatId, photo, { ...params, ...replyTo, businessConnectionId });
182
+ async addStoriesToHighlights(storyIds) {
183
+ const chatId = this.#mustGetChatId();
184
+ return await this.client.addStoriesToHighlights(chatId, storyIds);
190
185
  }
191
186
  /**
192
- * Context-aware alias for {@link Client.sendMediaGroup}.
187
+ * Context-aware alias for {@link Client.addStoryToHighlights}.
193
188
  */
194
- async replyMediaGroup(media, params) {
195
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
196
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
197
- return await this.client.sendMediaGroup(chatId, media, { ...params, ...replyTo, businessConnectionId });
189
+ async addStoryToHighlights(storyId) {
190
+ const chatId = this.#mustGetChatId();
191
+ return await this.client.addStoryToHighlights(chatId, storyId);
198
192
  }
199
193
  /**
200
- * Context-aware alias for {@link Client.sendInvoice}.
194
+ * Context-aware alias for {@link Client.addToChecklist}.
201
195
  */
202
- async replyInvoice(title, description, payload, currency, prices, params) {
203
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
204
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
205
- return await this.client.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, ...replyTo, businessConnectionId });
196
+ async addToChecklist(messageId, items) {
197
+ const chatId = this.#mustGetChatId();
198
+ return await this.client.addToChecklist(chatId, messageId, items);
206
199
  }
207
200
  /**
208
- * Context-aware alias for {@link Client.sendDocument}.
201
+ * Context-aware alias for {@link Client.answerCallbackQuery}.
209
202
  */
210
- async replyDocument(document, params) {
211
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
212
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
213
- return await this.client.sendDocument(chatId, document, { ...params, ...replyTo, businessConnectionId });
203
+ async answerCallbackQuery(params) {
204
+ if (!("callbackQuery" in this.update)) {
205
+ (0, _0_deps_js_1.unreachable)();
206
+ }
207
+ return await this.client.answerCallbackQuery(this.update.callbackQuery.id, params);
214
208
  }
215
209
  /**
216
- * Context-aware alias for {@link Client.sendSticker}.
210
+ * Context-aware alias for {@link Client.answerInlineQuery}.
217
211
  */
218
- async replySticker(sticker, params) {
219
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
220
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
221
- return await this.client.sendSticker(chatId, sticker, { ...params, ...replyTo, businessConnectionId });
212
+ async answerInlineQuery(results, params) {
213
+ if (!("inlineQuery" in this.update)) {
214
+ (0, _0_deps_js_1.unreachable)();
215
+ }
216
+ return await this.client.answerInlineQuery(this.update.inlineQuery.id, results, params);
222
217
  }
223
218
  /**
224
- * Context-aware alias for {@link Client.sendLocation}.
219
+ * Context-aware alias for {@link Client.answerPreCheckoutQuery}.
225
220
  */
226
- async replyLocation(latitude, longitude, params) {
227
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
228
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
229
- return await this.client.sendLocation(chatId, latitude, longitude, { ...params, ...replyTo, businessConnectionId });
221
+ async answerPreCheckoutQuery(ok, params) {
222
+ if (!("preCheckoutQuery" in this.update)) {
223
+ (0, _0_deps_js_1.unreachable)();
224
+ }
225
+ return await this.client.answerPreCheckoutQuery(this.update.preCheckoutQuery.id, ok, params);
230
226
  }
231
227
  /**
232
- * Context-aware alias for {@link Client.sendDice}.
228
+ * Context-aware alias for {@link Client.approveJoinRequest}.
233
229
  */
234
- async replyDice(params) {
235
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
236
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
237
- return await this.client.sendDice(chatId, { ...params, ...replyTo, businessConnectionId });
230
+ async approveJoinRequest() {
231
+ const { chatId, userId } = this.#mustGetMsg();
232
+ if (!userId) {
233
+ (0, _0_deps_js_1.unreachable)();
234
+ }
235
+ return await this.client.approveJoinRequest(chatId, userId);
238
236
  }
239
237
  /**
240
- * Context-aware alias for {@link Client.sendVenue}.
238
+ * Context-aware alias for {@link Client.approveJoinRequests}.
241
239
  */
242
- async replyVenue(latitude, longitude, title, address, params) {
243
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
244
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
245
- return await this.client.sendVenue(chatId, latitude, longitude, title, address, { ...params, ...replyTo, businessConnectionId });
240
+ async approveJoinRequests(params) {
241
+ const chatId = this.#mustGetChatId();
242
+ return await this.client.approveJoinRequests(chatId, params);
246
243
  }
247
244
  /**
248
- * Context-aware alias for {@link Client.sendContact}.
245
+ * Context-aware alias for {@link Client.archiveChat}.
249
246
  */
250
- async replyContact(firstName, number, params) {
251
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
252
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
253
- return await this.client.sendContact(chatId, firstName, number, { ...params, ...replyTo, businessConnectionId });
247
+ async archive() {
248
+ const chatId = this.#mustGetChatId();
249
+ return await this.client.archiveChat(chatId);
254
250
  }
255
251
  /**
256
- * Context-aware alias for {@link Client.sendVideo}.
252
+ * Context-aware alias for {@link Client.banChatMember}.
257
253
  */
258
- async replyVideo(video, params) {
259
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
260
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
261
- return await this.client.sendVideo(chatId, video, { ...params, ...replyTo, businessConnectionId });
254
+ async banChatMember(memberId, params) {
255
+ const chatId = this.#mustGetChatId();
256
+ return await this.client.banChatMember(chatId, memberId, params);
262
257
  }
263
258
  /**
264
- * Context-aware alias for {@link Client.sendAnimation}.
259
+ * Context-aware alias for {@link Client.banChatMember}.
265
260
  */
266
- async replyAnimation(animation, params) {
267
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
268
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
269
- return await this.client.sendAnimation(chatId, animation, { ...params, ...replyTo, businessConnectionId });
261
+ async banSender(params) {
262
+ const { chatId, senderId } = this.#mustGetMsg();
263
+ if (!senderId) {
264
+ (0, _0_deps_js_1.unreachable)();
265
+ }
266
+ return await this.client.banChatMember(chatId, senderId, params);
270
267
  }
271
268
  /**
272
- * Context-aware alias for {@link Client.sendVoice}.
269
+ * Context-aware alias for {@link Client.blockUser}.
273
270
  */
274
- async replyVoice(voice, params) {
275
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
276
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
277
- return await this.client.sendVoice(chatId, voice, { ...params, ...replyTo, businessConnectionId });
271
+ async blockUser() {
272
+ return await this.client.blockUser(this.#mustGetUserId());
278
273
  }
279
274
  /**
280
- * Context-aware alias for {@link Client.sendAudio}.
275
+ * Context-aware alias for {@link Client.checkChecklistItem}.
281
276
  */
282
- async replyAudio(audio, params) {
283
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
284
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
285
- return await this.client.sendAudio(chatId, audio, { ...params, ...replyTo, businessConnectionId });
277
+ async checkChecklistItem(messageId, item) {
278
+ const chatId = this.#mustGetChatId();
279
+ return await this.client.checkChecklistItem(chatId, messageId, item);
286
280
  }
287
281
  /**
288
- * Context-aware alias for {@link Client.sendVideoNote}.
282
+ * Context-aware alias for {@link Client.checkChecklistItems}.
289
283
  */
290
- async replyVideoNote(videoNote, params) {
291
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
292
- const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
293
- return await this.client.sendVideoNote(chatId, videoNote, { ...params, ...replyTo, businessConnectionId });
284
+ async checkChecklistItems(messageId, items) {
285
+ const chatId = this.#mustGetChatId();
286
+ return await this.client.checkChecklistItems(chatId, messageId, items);
294
287
  }
295
288
  /**
296
- * Context-aware alias for {@link Client.deleteMessage}.
289
+ * Context-aware alias for {@link Client.closeChat}.
297
290
  */
298
- async delete() {
299
- const { chatId, messageId } = this.#mustGetMsg();
300
- return await this.client.deleteMessage(chatId, messageId);
291
+ async close() {
292
+ const chatId = this.#mustGetChatId();
293
+ return await this.client.closeChat(chatId);
301
294
  }
302
295
  /**
303
- * Context-aware alias for {@link Client.forwardMessage}.
296
+ * Context-aware alias for {@link Client.closeTopic}.
304
297
  */
305
- async forward(to, params) {
306
- const { chatId, messageId } = this.#mustGetMsg();
307
- return await this.client.forwardMessage(chatId, to, messageId, params);
298
+ async closeTopic(topicId) {
299
+ const chatId = this.#mustGetChatId();
300
+ return await this.client.closeTopic(chatId, topicId);
308
301
  }
309
302
  /**
310
- * Context-aware alias for {@link Client.pinMessage}.
303
+ * Context-aware alias for {@link Client.createInviteLink}.
311
304
  */
312
- async pin(params) {
313
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
314
- return await this.client.pinMessage(chatId, messageId, { ...params, businessConnectionId });
305
+ async createInviteLink(params) {
306
+ const chatId = this.#mustGetChatId();
307
+ return await this.client.createInviteLink(chatId, params);
315
308
  }
316
309
  /**
317
- * Context-aware alias for {@link Client.unpinMessage}.
310
+ * Context-aware alias for {@link Client.createStory}.
318
311
  */
319
- async unpin() {
320
- const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
321
- return await this.client.unpinMessage(chatId, messageId, { businessConnectionId });
312
+ async createStory(content, params) {
313
+ const chatId = this.#mustGetChatId();
314
+ return await this.client.createStory(chatId, content, params);
322
315
  }
323
316
  /**
324
- * Context-aware alias for {@link Client.banChatMember}.
317
+ * Context-aware alias for {@link Client.createTopic}.
325
318
  */
326
- async banSender(params) {
327
- const { chatId, senderId } = this.#mustGetMsg();
328
- if (!senderId) {
329
- (0, _0_deps_js_1.unreachable)();
330
- }
331
- return await this.client.banChatMember(chatId, senderId, params);
319
+ async createTopic(title, params) {
320
+ const chatId = this.#mustGetChatId();
321
+ return await this.client.createTopic(chatId, title, params);
332
322
  }
333
323
  /**
334
- * Context-aware alias for {@link Client.kickChatMember}.
324
+ * Context-aware alias for {@link Client.declineJoinRequest}.
335
325
  */
336
- async kickSender() {
337
- const { chatId, senderId } = this.#mustGetMsg();
338
- if (!senderId) {
326
+ async declineJoinRequest() {
327
+ const { chatId, userId } = this.#mustGetMsg();
328
+ if (!userId) {
339
329
  (0, _0_deps_js_1.unreachable)();
340
330
  }
341
- return await this.client.kickChatMember(chatId, senderId);
331
+ return await this.client.declineJoinRequest(chatId, userId);
342
332
  }
343
333
  /**
344
- * Context-aware alias for {@link Client.setChatMemberRights}.
334
+ * Context-aware alias for {@link Client.declineJoinRequests}.
345
335
  */
346
- async setSenderRights(params) {
347
- const { chatId, senderId } = this.#mustGetMsg();
348
- if (!senderId) {
349
- (0, _0_deps_js_1.unreachable)();
350
- }
351
- return await this.client.setChatMemberRights(chatId, senderId, params);
336
+ async declineJoinRequests(params) {
337
+ const chatId = this.#mustGetChatId();
338
+ return await this.client.declineJoinRequests(chatId, params);
352
339
  }
353
340
  /**
354
- * Context-aware alias for {@link Client.getChatAdministrators}.
341
+ * Context-aware alias for {@link Client.deleteChatPhoto}.
355
342
  */
356
- async getChatAdministrators() {
343
+ async deletChatPhoto() {
357
344
  const chatId = this.#mustGetChatId();
358
- return await this.client.getChatAdministrators(chatId);
345
+ return await this.client.deleteChatPhoto(chatId);
359
346
  }
360
347
  /**
361
- * Context-aware alias for {@link Client.setReactions}.
348
+ * Context-aware alias for {@link Client.deleteMessage}.
362
349
  */
363
- async react(reactions, params) {
350
+ async delete() {
364
351
  const { chatId, messageId } = this.#mustGetMsg();
365
- return await this.client.setReactions(chatId, messageId, reactions, params);
352
+ return await this.client.deleteMessage(chatId, messageId);
366
353
  }
367
354
  /**
368
- * Context-aware alias for {@link Client.sendChatAction}.
355
+ * Context-aware alias for {@link Client.deleteChat}.
369
356
  */
370
- async sendChatAction(action, params) {
357
+ async deleteChat() {
371
358
  const chatId = this.#mustGetChatId();
372
- return await this.client.sendChatAction(chatId, action, params);
359
+ return await this.client.deleteChat(chatId);
373
360
  }
374
361
  /**
375
- * Context-aware alias for {@link Client.editInlineMessageText}.
362
+ * Context-aware alias for {@link Client.deleteChatMemberMessages}.
376
363
  */
377
- async editInlineMessageText(text, params) {
378
- const inlineMessageId = this.#mustGetInlineMsgId();
379
- return await this.client.editInlineMessageText(inlineMessageId, text, params);
364
+ async deleteChatMemberMessages(userId) {
365
+ const chatId = this.#mustGetChatId();
366
+ return await this.client.deleteChatMemberMessages(chatId, userId);
380
367
  }
381
368
  /**
382
- * Context-aware alias for {@link Client.editInlineMessageCaption}.
369
+ * Context-aware alias for {@link Client.deleteChatStickerSet}.
383
370
  */
384
- async editInlineMessageCaption(params) {
385
- const inlineMessageId = this.#mustGetInlineMsgId();
386
- return await this.client.editInlineMessageCaption(inlineMessageId, params);
371
+ async deleteChatStickerSet() {
372
+ const chatId = this.#mustGetChatId();
373
+ return await this.client.deleteChatStickerSet(chatId);
387
374
  }
388
375
  /**
389
- * Context-aware alias for {@link Client.editInlineMessageMedia}.
376
+ * Context-aware alias for {@link Client.deleteMessage}.
390
377
  */
391
- async editInlineMessageMedia(media, params) {
392
- const inlineMessageId = this.#mustGetInlineMsgId();
393
- return await this.client.editInlineMessageMedia(inlineMessageId, media, params);
378
+ async deleteMessage(messageId, params) {
379
+ const chatId = this.#mustGetChatId();
380
+ return await this.client.deleteMessage(chatId, messageId, params);
394
381
  }
395
382
  /**
396
- * Context-aware alias for {@link Client.editInlineMessageLiveLocation}.
383
+ * Context-aware alias for {@link Client.deleteMessages}.
397
384
  */
398
- async editInlineMessageLiveLocation(latitude, longitude, params) {
399
- const inlineMessageId = this.#mustGetInlineMsgId();
400
- return await this.client.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
385
+ async deleteMessages(messageIds, params) {
386
+ const chatId = this.#mustGetChatId();
387
+ return await this.client.deleteMessages(chatId, messageIds, params);
401
388
  }
402
389
  /**
403
- * Context-aware alias for {@link Client.editInlineMessageReplyMarkup}.
390
+ * Context-aware alias for {@link Client.deleteScheduledMessage}.
404
391
  */
405
- async editInlineMessageReplyMarkup(params) {
406
- const inlineMessageId = this.#mustGetInlineMsgId();
407
- return await this.client.editInlineMessageReplyMarkup(inlineMessageId, params);
392
+ async deleteScheduledMessage(messageId) {
393
+ const chatId = this.#mustGetChatId();
394
+ return await this.client.deleteScheduledMessage(chatId, messageId);
408
395
  }
409
396
  /**
410
- * Context-aware alias for {@link Client.editMessageText}.
397
+ * Context-aware alias for {@link Client.deleteScheduledMessages}.
411
398
  */
412
- async editMessageText(messageId, text, params) {
399
+ async deleteScheduledMessages(messageIds) {
413
400
  const chatId = this.#mustGetChatId();
414
- return await this.client.editMessageText(chatId, messageId, text, params);
401
+ return await this.client.deleteScheduledMessages(chatId, messageIds);
415
402
  }
416
403
  /**
417
- * Context-aware alias for {@link Client.editMessageCaption}.
404
+ * Context-aware alias for {@link Client.deleteStories}.
418
405
  */
419
- async editMessageCaption(messageId, params) {
406
+ async deleteStories(storyIds) {
420
407
  const chatId = this.#mustGetChatId();
421
- return await this.client.editMessageCaption(chatId, messageId, params);
408
+ return await this.client.deleteStories(chatId, storyIds);
422
409
  }
423
410
  /**
424
- * Context-aware alias for {@link Client.editMessageMedia}.
411
+ * Context-aware alias for {@link Client.deleteStory}.
425
412
  */
426
- async editMessageMedia(messageId, media, params) {
413
+ async deleteStory(storyId) {
427
414
  const chatId = this.#mustGetChatId();
428
- return await this.client.editMessageMedia(chatId, messageId, media, params);
415
+ return await this.client.deleteStory(chatId, storyId);
416
+ }
417
+ /**
418
+ * Context-aware alias for {@link Client.disableAntispam}.
419
+ */
420
+ async disableAntispam() {
421
+ const chatId = this.#mustGetChatId();
422
+ return await this.client.disableAntispam(chatId);
423
+ }
424
+ /**
425
+ * Context-aware alias for {@link Client.disableBusinessBots}.
426
+ */
427
+ async disableBusinessBots() {
428
+ const chatId = this.#mustGetChatId();
429
+ return await this.client.disableBusinessBots(chatId);
430
+ }
431
+ /**
432
+ * Context-aware alias for {@link Client.disableJoinRequests}.
433
+ */
434
+ async disableJoinRequests() {
435
+ const chatId = this.#mustGetChatId();
436
+ return await this.client.disableJoinRequests(chatId);
437
+ }
438
+ /**
439
+ * Context-aware alias for {@link Client.disableSharing}.
440
+ */
441
+ async disableSharing() {
442
+ const chatId = this.#mustGetChatId();
443
+ return await this.client.disableSharing(chatId);
444
+ }
445
+ /**
446
+ * Context-aware alias for {@link Client.disableSignatures}.
447
+ */
448
+ async disableSignatures() {
449
+ const chatId = this.#mustGetChatId();
450
+ return await this.client.disableSignatures(chatId);
451
+ }
452
+ /**
453
+ * Context-aware alias for {@link Client.disableSlowMode}.
454
+ */
455
+ async disableSlowMode() {
456
+ const chatId = this.#mustGetChatId();
457
+ return await this.client.disableSlowMode(chatId);
458
+ }
459
+ /**
460
+ * Context-aware alias for {@link Client.disableTopics}.
461
+ */
462
+ async disableTopics() {
463
+ const chatId = this.#mustGetChatId();
464
+ return await this.client.disableTopics(chatId);
465
+ }
466
+ /**
467
+ * Context-aware alias for {@link Client.editInlineMessageCaption}.
468
+ */
469
+ async editInlineMessageCaption(params) {
470
+ const inlineMessageId = this.#mustGetInlineMsgId();
471
+ return await this.client.editInlineMessageCaption(inlineMessageId, params);
472
+ }
473
+ /**
474
+ * Context-aware alias for {@link Client.editInlineMessageLiveLocation}.
475
+ */
476
+ async editInlineMessageLiveLocation(latitude, longitude, params) {
477
+ const inlineMessageId = this.#mustGetInlineMsgId();
478
+ return await this.client.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
479
+ }
480
+ /**
481
+ * Context-aware alias for {@link Client.editInlineMessageMedia}.
482
+ */
483
+ async editInlineMessageMedia(media, params) {
484
+ const inlineMessageId = this.#mustGetInlineMsgId();
485
+ return await this.client.editInlineMessageMedia(inlineMessageId, media, params);
486
+ }
487
+ /**
488
+ * Context-aware alias for {@link Client.editInlineMessageReplyMarkup}.
489
+ */
490
+ async editInlineMessageReplyMarkup(params) {
491
+ const inlineMessageId = this.#mustGetInlineMsgId();
492
+ return await this.client.editInlineMessageReplyMarkup(inlineMessageId, params);
493
+ }
494
+ /**
495
+ * Context-aware alias for {@link Client.editInlineMessageText}.
496
+ */
497
+ async editInlineMessageText(text, params) {
498
+ const inlineMessageId = this.#mustGetInlineMsgId();
499
+ return await this.client.editInlineMessageText(inlineMessageId, text, params);
500
+ }
501
+ /**
502
+ * Context-aware alias for {@link Client.editMessageCaption}.
503
+ */
504
+ async editMessageCaption(messageId, params) {
505
+ const chatId = this.#mustGetChatId();
506
+ return await this.client.editMessageCaption(chatId, messageId, params);
429
507
  }
430
508
  /**
431
509
  * Context-aware alias for {@link Client.editMessageLiveLocation}.
@@ -434,6 +512,13 @@ class Context {
434
512
  const chatId = this.#mustGetChatId();
435
513
  return await this.client.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
436
514
  }
515
+ /**
516
+ * Context-aware alias for {@link Client.editMessageMedia}.
517
+ */
518
+ async editMessageMedia(messageId, media, params) {
519
+ const chatId = this.#mustGetChatId();
520
+ return await this.client.editMessageMedia(chatId, messageId, media, params);
521
+ }
437
522
  /**
438
523
  * Context-aware alias for {@link Client.editMessageReplyMarkup}.
439
524
  */
@@ -442,22 +527,161 @@ class Context {
442
527
  return await this.client.editMessageReplyMarkup(chatId, messageId, params);
443
528
  }
444
529
  /**
445
- * Context-aware alias for {@link Client.answerCallbackQuery}.
530
+ * Context-aware alias for {@link Client.editMessageText}.
446
531
  */
447
- async answerCallbackQuery(params) {
448
- if (!("callbackQuery" in this.update)) {
449
- (0, _0_deps_js_1.unreachable)();
450
- }
451
- return await this.client.answerCallbackQuery(this.update.callbackQuery.id, params);
532
+ async editMessageText(messageId, text, params) {
533
+ const chatId = this.#mustGetChatId();
534
+ return await this.client.editMessageText(chatId, messageId, text, params);
452
535
  }
453
536
  /**
454
- * Context-aware alias for {@link Client.answerInlineQuery}.
537
+ * Context-aware alias for {@link Client.editTopic}.
455
538
  */
456
- async answerInlineQuery(results, params) {
457
- if (!("inlineQuery" in this.update)) {
539
+ async editTopic(topicId, title, params) {
540
+ const chatId = this.#mustGetChatId();
541
+ return await this.client.editTopic(chatId, topicId, title, params);
542
+ }
543
+ /**
544
+ * Context-aware alias for {@link Client.enableAntispam}.
545
+ */
546
+ async enableAntispam() {
547
+ const chatId = this.#mustGetChatId();
548
+ return await this.client.enableAntispam(chatId);
549
+ }
550
+ /**
551
+ * Context-aware alias for {@link Client.enableBusinessBots}.
552
+ */
553
+ async enableBusinessBots() {
554
+ const chatId = this.#mustGetChatId();
555
+ return await this.client.enableBusinessBots(chatId);
556
+ }
557
+ /**
558
+ * Context-aware alias for {@link Client.enableJoinRequests}.
559
+ */
560
+ async enableJoinRequests() {
561
+ const chatId = this.#mustGetChatId();
562
+ return await this.client.enableJoinRequests(chatId);
563
+ }
564
+ /**
565
+ * Context-aware alias for {@link Client.enableSharing}.
566
+ */
567
+ async enableSharing() {
568
+ const chatId = this.#mustGetChatId();
569
+ return await this.client.enableSharing(chatId);
570
+ }
571
+ /**
572
+ * Context-aware alias for {@link Client.enableSignatures}.
573
+ */
574
+ async enableSignatures(params) {
575
+ const chatId = this.#mustGetChatId();
576
+ return await this.client.enableSignatures(chatId, params);
577
+ }
578
+ /**
579
+ * Context-aware alias for {@link Client.enableTopics}.
580
+ */
581
+ async enableTopics(isShownAsTabs) {
582
+ const chatId = this.#mustGetChatId();
583
+ return await this.client.enableTopics(chatId, isShownAsTabs);
584
+ }
585
+ /**
586
+ * Context-aware alias for {@link Client.forwardMessage}.
587
+ */
588
+ async forward(to, params) {
589
+ const { chatId, messageId } = this.#mustGetMsg();
590
+ return await this.client.forwardMessage(chatId, to, messageId, params);
591
+ }
592
+ /**
593
+ * Context-aware alias for {@link Client.forwardMessage}.
594
+ */
595
+ async forwardMessage(to, messageId, params) {
596
+ const chatId = this.#mustGetChatId();
597
+ return await this.client.forwardMessage(chatId, to, messageId, params);
598
+ }
599
+ /**
600
+ * Context-aware alias for {@link Client.forwardMessages}.
601
+ */
602
+ async forwardMessages(to, messageIds, params) {
603
+ const chatId = this.#mustGetChatId();
604
+ return await this.client.forwardMessages(chatId, to, messageIds, params);
605
+ }
606
+ /**
607
+ * Context-aware alias for {@link Client.getBusinessConnection}.
608
+ */
609
+ async getBusinessConnection() {
610
+ const { businessConnectionId } = this.#mustGetMsg();
611
+ if (!businessConnectionId) {
458
612
  (0, _0_deps_js_1.unreachable)();
459
613
  }
460
- return await this.client.answerInlineQuery(this.update.inlineQuery.id, results, params);
614
+ return await this.client.getBusinessConnection(businessConnectionId);
615
+ }
616
+ /**
617
+ * Context-aware alias for {@link Client.getChat}.
618
+ */
619
+ async getChat() {
620
+ const chatId = this.#mustGetChatId();
621
+ return await this.client.getChat(chatId);
622
+ }
623
+ /**
624
+ * Context-aware alias for {@link Client.getChatAdministrators}.
625
+ */
626
+ async getChatAdministrators() {
627
+ const chatId = this.#mustGetChatId();
628
+ return await this.client.getChatAdministrators(chatId);
629
+ }
630
+ /**
631
+ * Context-aware alias for {@link Client.getChatMember}.
632
+ */
633
+ async getChatMember(userId) {
634
+ const chatId = this.#mustGetChatId();
635
+ return await this.client.getChatMember(chatId, userId);
636
+ }
637
+ /**
638
+ * Context-aware alias for {@link Client.getChatMembers}.
639
+ */
640
+ async getChatMembers(params) {
641
+ const chatId = this.#mustGetChatId();
642
+ return await this.client.getChatMembers(chatId, params);
643
+ }
644
+ /**
645
+ * Context-aware alias for {@link Client.getChatSettings}.
646
+ */
647
+ async getChatSettings() {
648
+ const chatId = this.#mustGetChatId();
649
+ return await this.client.getChatSettings(chatId);
650
+ }
651
+ /**
652
+ * Context-aware alias for {@link Client.getClaimedGifts}.
653
+ */
654
+ async getClaimedGifts(params) {
655
+ const chatId = this.#mustGetChatId();
656
+ return await this.client.getClaimedGifts(chatId, params);
657
+ }
658
+ /**
659
+ * Context-aware alias for {@link Client.getChatSettings}.
660
+ */
661
+ async getCommonChats() {
662
+ const chatId = this.#mustGetChatId();
663
+ return await this.client.getCommonChats(chatId);
664
+ }
665
+ /**
666
+ * Context-aware alias for {@link Client.getCreatedInviteLinks}.
667
+ */
668
+ async getCreatedInviteLinks(params) {
669
+ const chatId = this.#mustGetChatId();
670
+ return await this.client.getCreatedInviteLinks(chatId, params);
671
+ }
672
+ /**
673
+ * Context-aware alias for {@link Client.getHistory}.
674
+ */
675
+ async getHistory(params) {
676
+ const chatId = this.#mustGetChatId();
677
+ return await this.client.getHistory(chatId, params);
678
+ }
679
+ /**
680
+ * Context-aware alias for {@link Client.getJoinRequests}.
681
+ */
682
+ async getJoinRequests(params) {
683
+ const chatId = this.#mustGetChatId();
684
+ return await this.client.getJoinRequests(chatId, params);
461
685
  }
462
686
  /**
463
687
  * Context-aware alias for {@link Client.getMessage}.
@@ -466,6 +690,13 @@ class Context {
466
690
  const chatId = this.#mustGetChatId();
467
691
  return await this.client.getMessage(chatId, messageId);
468
692
  }
693
+ /**
694
+ * Context-aware alias for {@link Client.getMessageReactions}.
695
+ */
696
+ async getMessageReactions(messageId) {
697
+ const chatId = this.#mustGetChatId();
698
+ return await this.client.getMessageReactions(chatId, messageId);
699
+ }
469
700
  /**
470
701
  * Context-aware alias for {@link Client.getMessages}.
471
702
  */
@@ -474,80 +705,132 @@ class Context {
474
705
  return await this.client.getMessages(chatId, messageIds);
475
706
  }
476
707
  /**
477
- * Context-aware alias for {@link Client.forwardMessage}.
708
+ * Context-aware alias for {@link Client.getSavedMessages}.
478
709
  */
479
- async forwardMessage(to, messageId, params) {
710
+ async getSavedMessages(params) {
480
711
  const chatId = this.#mustGetChatId();
481
- return await this.client.forwardMessage(chatId, to, messageId, params);
712
+ return await this.client.getSavedMessages(chatId, params);
482
713
  }
483
714
  /**
484
- * Context-aware alias for {@link Client.forwardMessages}.
715
+ * Context-aware alias for {@link Client.getSimilarBots}.
485
716
  */
486
- async forwardMessages(to, messageIds, params) {
717
+ async getSimilarBots() {
487
718
  const chatId = this.#mustGetChatId();
488
- return await this.client.forwardMessages(chatId, to, messageIds, params);
719
+ return await this.client.getSimilarBots(chatId);
489
720
  }
490
721
  /**
491
- * Context-aware alias for {@link Client.deleteMessage}.
722
+ * Context-aware alias for {@link Client.getSimilarChannels}.
492
723
  */
493
- async deleteMessage(messageId, params) {
724
+ async getSimilarChannels() {
494
725
  const chatId = this.#mustGetChatId();
495
- return await this.client.deleteMessage(chatId, messageId, params);
726
+ return await this.client.getSimilarChannels(chatId);
496
727
  }
497
728
  /**
498
- * Context-aware alias for {@link Client.deleteMessages}.
729
+ * Context-aware alias for {@link Client.getStories}.
499
730
  */
500
- async deleteMessages(messageIds, params) {
731
+ async getStories(storyIds) {
501
732
  const chatId = this.#mustGetChatId();
502
- return await this.client.deleteMessages(chatId, messageIds, params);
733
+ return await this.client.getStories(chatId, storyIds);
503
734
  }
504
735
  /**
505
- * Context-aware alias for {@link Client.pinMessage}.
736
+ * Context-aware alias for {@link Client.getStory}.
506
737
  */
507
- async pinMessage(messageId, params) {
738
+ async getStory(storyId) {
508
739
  const chatId = this.#mustGetChatId();
509
- return await this.client.pinMessage(chatId, messageId, params);
740
+ return await this.client.getStory(chatId, storyId);
510
741
  }
511
742
  /**
512
- * Context-aware alias for {@link Client.unpinMessage}.
743
+ * Context-aware alias for {@link Client.sendGift}.
513
744
  */
514
- async unpinMessage(messageId) {
745
+ async gift(giftId, params) {
515
746
  const chatId = this.#mustGetChatId();
516
- return await this.client.unpinMessage(chatId, messageId);
747
+ return await this.client.sendGift(chatId, giftId, params);
517
748
  }
518
749
  /**
519
- * Context-aware alias for {@link Client.unpinMessages}.
750
+ * Context-aware alias for {@link Client.hideGeneralTopic}.
520
751
  */
521
- async unpinMessages() {
752
+ async hideGeneralTopic() {
522
753
  const chatId = this.#mustGetChatId();
523
- return await this.client.unpinMessages(chatId);
754
+ return await this.client.hideGeneralTopic(chatId);
524
755
  }
525
756
  /**
526
- * Context-aware alias for {@link Client.setAvailableReactions}.
757
+ * Context-aware alias for {@link Client.hideMemberList}.
527
758
  */
528
- async setAvailableReactions(availableReactions) {
759
+ async hideMemberList() {
529
760
  const chatId = this.#mustGetChatId();
530
- return await this.client.setAvailableReactions(chatId, availableReactions);
761
+ return await this.client.hideMemberList(chatId);
531
762
  }
532
763
  /**
533
- * Context-aware alias for {@link Client.addReaction}.
764
+ * Context-aware alias for {@link Client.kickChatMember}.
534
765
  */
535
- async addReaction(messageId, reaction, params) {
766
+ async kickChatMember(memberId) {
536
767
  const chatId = this.#mustGetChatId();
537
- return await this.client.addReaction(chatId, messageId, reaction, params);
768
+ return await this.client.kickChatMember(chatId, memberId);
538
769
  }
539
770
  /**
540
- * Context-aware alias for {@link Client.removeReaction}.
771
+ * Context-aware alias for {@link Client.kickChatMember}.
541
772
  */
542
- async removeReaction(messageId, reaction) {
773
+ async kickSender() {
774
+ const { chatId, senderId } = this.#mustGetMsg();
775
+ if (!senderId) {
776
+ (0, _0_deps_js_1.unreachable)();
777
+ }
778
+ return await this.client.kickChatMember(chatId, senderId);
779
+ }
780
+ /**
781
+ * Context-aware alias for {@link Client.leaveChat}.
782
+ */
783
+ async leaveChat() {
543
784
  const chatId = this.#mustGetChatId();
544
- return await this.client.removeReaction(chatId, messageId, reaction);
785
+ return await this.client.leaveChat(chatId);
545
786
  }
546
787
  /**
547
- * Context-aware alias for {@link Client.setReactions}.
788
+ * Context-aware alias for {@link Client.openChat}.
548
789
  */
549
- async setReactions(messageId, reactions, params) {
790
+ async open() {
791
+ const chatId = this.#mustGetChatId();
792
+ return await this.client.openChat(chatId);
793
+ }
794
+ /**
795
+ * Context-aware alias for {@link Client.pauseBusinessBotConnection}.
796
+ */
797
+ async pauseBusinessBotConnection() {
798
+ const chatId = this.#mustGetChatId();
799
+ return await this.client.pauseBusinessBotConnection(chatId);
800
+ }
801
+ /**
802
+ * Context-aware alias for {@link Client.pinMessage}.
803
+ */
804
+ async pin(params) {
805
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
806
+ return await this.client.pinMessage(chatId, messageId, { ...params, businessConnectionId });
807
+ }
808
+ /**
809
+ * Context-aware alias for {@link Client.pinMessage}.
810
+ */
811
+ async pinMessage(messageId, params) {
812
+ const chatId = this.#mustGetChatId();
813
+ return await this.client.pinMessage(chatId, messageId, params);
814
+ }
815
+ /**
816
+ * Context-aware alias for {@link Client.pinTopic}.
817
+ */
818
+ async pinTopic(topicId) {
550
819
  const chatId = this.#mustGetChatId();
820
+ return await this.client.pinTopic(chatId, topicId);
821
+ }
822
+ /**
823
+ * Context-aware alias for {@link Client.promoteChatMember}.
824
+ */
825
+ async promoteChatMember(userId, params) {
826
+ const chatId = this.#mustGetChatId();
827
+ return await this.client.promoteChatMember(chatId, userId, params);
828
+ }
829
+ /**
830
+ * Context-aware alias for {@link Client.setReactions}.
831
+ */
832
+ async react(reactions, params) {
833
+ const { chatId, messageId } = this.#mustGetMsg();
551
834
  return await this.client.setReactions(chatId, messageId, reactions, params);
552
835
  }
553
836
  /**
@@ -558,60 +841,204 @@ class Context {
558
841
  return await this.client.readMessages(chatId, messageId);
559
842
  }
560
843
  /**
561
- * Context-aware alias for {@link Client.setChatPhoto}.
844
+ * Context-aware alias for {@link Client.refundStarPayment}.
562
845
  */
563
- async setChatPhoto(photo, params) {
846
+ async refundStarPayment(telegramPaymentChargeId) {
564
847
  const chatId = this.#mustGetChatId();
565
- return await this.client.setChatPhoto(chatId, photo, params);
848
+ return await this.client.refundStarPayment(chatId, telegramPaymentChargeId);
566
849
  }
567
850
  /**
568
- * Context-aware alias for {@link Client.deleteChatPhoto}.
851
+ * Context-aware alias for {@link Client.deleteContact}.
569
852
  */
570
- async deletChatPhoto() {
853
+ async removeAsContact() {
571
854
  const chatId = this.#mustGetChatId();
572
- return await this.client.deleteChatPhoto(chatId);
855
+ return await this.client.deleteContact(chatId);
573
856
  }
574
857
  /**
575
- * Context-aware alias for {@link Client.banChatMember}.
858
+ * Context-aware alias for {@link Client.removeReaction}.
576
859
  */
577
- async banChatMember(memberId, params) {
860
+ async removeReaction(messageId, reaction) {
578
861
  const chatId = this.#mustGetChatId();
579
- return await this.client.banChatMember(chatId, memberId, params);
862
+ return await this.client.removeReaction(chatId, messageId, reaction);
580
863
  }
581
864
  /**
582
- * Context-aware alias for {@link Client.unbanChatMember}.
865
+ * Context-aware alias for {@link Client.removeStoriesFromHighlights}.
583
866
  */
584
- async unbanChatMember(memberId) {
867
+ async removeStoriesFromHighlights(storyIds) {
585
868
  const chatId = this.#mustGetChatId();
586
- return await this.client.unbanChatMember(chatId, memberId);
869
+ return await this.client.removeStoriesFromHighlights(chatId, storyIds);
587
870
  }
588
871
  /**
589
- * Context-aware alias for {@link Client.kickChatMember}.
872
+ * Context-aware alias for {@link Client.removeStoryFromHighlights}.
590
873
  */
591
- async kickChatMember(memberId) {
874
+ async removeStoryFromHighlights(storyId) {
592
875
  const chatId = this.#mustGetChatId();
593
- return await this.client.kickChatMember(chatId, memberId);
876
+ return await this.client.removeStoryFromHighlights(chatId, storyId);
877
+ }
878
+ /**
879
+ * Context-aware alias for {@link Client.reopenTopic}.
880
+ */
881
+ async reopenTopic(topicId) {
882
+ const chatId = this.#mustGetChatId();
883
+ return await this.client.reopenTopic(chatId, topicId);
884
+ }
885
+ /**
886
+ * Context-aware alias for {@link Client.sendMessage}.
887
+ */
888
+ async reply(text, params) {
889
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
890
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
891
+ return await this.client.sendMessage(chatId, text, { ...params, ...replyTo, businessConnectionId });
892
+ }
893
+ /**
894
+ * Context-aware alias for {@link Client.sendAnimation}.
895
+ */
896
+ async replyAnimation(animation, params) {
897
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
898
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
899
+ return await this.client.sendAnimation(chatId, animation, { ...params, ...replyTo, businessConnectionId });
900
+ }
901
+ /**
902
+ * Context-aware alias for {@link Client.sendAudio}.
903
+ */
904
+ async replyAudio(audio, params) {
905
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
906
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
907
+ return await this.client.sendAudio(chatId, audio, { ...params, ...replyTo, businessConnectionId });
908
+ }
909
+ /**
910
+ * Context-aware alias for {@link Client.sendChecklist}.
911
+ */
912
+ async replyChecklist(title, items, params) {
913
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
914
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
915
+ return await this.client.sendChecklist(chatId, title, items, { ...params, ...replyTo, businessConnectionId });
916
+ }
917
+ /**
918
+ * Context-aware alias for {@link Client.sendContact}.
919
+ */
920
+ async replyContact(firstName, number, params) {
921
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
922
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
923
+ return await this.client.sendContact(chatId, firstName, number, { ...params, ...replyTo, businessConnectionId });
924
+ }
925
+ /**
926
+ * Context-aware alias for {@link Client.sendDice}.
927
+ */
928
+ async replyDice(params) {
929
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
930
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
931
+ return await this.client.sendDice(chatId, { ...params, ...replyTo, businessConnectionId });
932
+ }
933
+ /**
934
+ * Context-aware alias for {@link Client.sendDocument}.
935
+ */
936
+ async replyDocument(document, params) {
937
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
938
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
939
+ return await this.client.sendDocument(chatId, document, { ...params, ...replyTo, businessConnectionId });
940
+ }
941
+ /**
942
+ * Context-aware alias for {@link Client.sendMessageDraft}.
943
+ */
944
+ async replyDraft(draftId, text, params) {
945
+ const { chatId, messageId } = this.#mustGetMsg();
946
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
947
+ return await this.client.sendMessageDraft(chatId, draftId, text, { ...params, ...replyTo });
948
+ }
949
+ /**
950
+ * Context-aware alias for {@link Client.sendInvoice}.
951
+ */
952
+ async replyInvoice(title, description, payload, currency, prices, params) {
953
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
954
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
955
+ return await this.client.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, ...replyTo, businessConnectionId });
956
+ }
957
+ /**
958
+ * Context-aware alias for {@link Client.sendLocation}.
959
+ */
960
+ async replyLocation(latitude, longitude, params) {
961
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
962
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
963
+ return await this.client.sendLocation(chatId, latitude, longitude, { ...params, ...replyTo, businessConnectionId });
964
+ }
965
+ /**
966
+ * Context-aware alias for {@link Client.sendMediaGroup}.
967
+ */
968
+ async replyMediaGroup(media, params) {
969
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
970
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
971
+ return await this.client.sendMediaGroup(chatId, media, { ...params, ...replyTo, businessConnectionId });
972
+ }
973
+ /**
974
+ * Context-aware alias for {@link Client.sendPhoto}.
975
+ */
976
+ async replyPhoto(photo, params) {
977
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
978
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
979
+ return await this.client.sendPhoto(chatId, photo, { ...params, ...replyTo, businessConnectionId });
980
+ }
981
+ /**
982
+ * Context-aware alias for {@link Client.sendPoll}.
983
+ */
984
+ async replyPoll(question, options, params) {
985
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
986
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
987
+ return await this.client.sendPoll(chatId, question, options, { ...params, ...replyTo, businessConnectionId });
988
+ }
989
+ /**
990
+ * Context-aware alias for {@link Client.sendSticker}.
991
+ */
992
+ async replySticker(sticker, params) {
993
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
994
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
995
+ return await this.client.sendSticker(chatId, sticker, { ...params, ...replyTo, businessConnectionId });
996
+ }
997
+ /**
998
+ * Context-aware alias for {@link Client.sendVenue}.
999
+ */
1000
+ async replyVenue(latitude, longitude, title, address, params) {
1001
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1002
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1003
+ return await this.client.sendVenue(chatId, latitude, longitude, title, address, { ...params, ...replyTo, businessConnectionId });
1004
+ }
1005
+ /**
1006
+ * Context-aware alias for {@link Client.sendVideo}.
1007
+ */
1008
+ async replyVideo(video, params) {
1009
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1010
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1011
+ return await this.client.sendVideo(chatId, video, { ...params, ...replyTo, businessConnectionId });
1012
+ }
1013
+ /**
1014
+ * Context-aware alias for {@link Client.sendVideoNote}.
1015
+ */
1016
+ async replyVideoNote(videoNote, params) {
1017
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1018
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1019
+ return await this.client.sendVideoNote(chatId, videoNote, { ...params, ...replyTo, businessConnectionId });
594
1020
  }
595
1021
  /**
596
- * Context-aware alias for {@link Client.setChatMemberRights}.
1022
+ * Context-aware alias for {@link Client.sendVoice}.
597
1023
  */
598
- async setChatMemberRights(memberId, params) {
599
- const chatId = this.#mustGetChatId();
600
- return await this.client.setChatMemberRights(chatId, memberId, params);
1024
+ async replyVoice(voice, params) {
1025
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1026
+ const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1027
+ return await this.client.sendVoice(chatId, voice, { ...params, ...replyTo, businessConnectionId });
601
1028
  }
602
1029
  /**
603
- * Context-aware alias for {@link Client.promoteChatMember}.
1030
+ * Context-aware alias for {@link Client.resumeBusinessBotConnection}.
604
1031
  */
605
- async promoteChatMember(userId, params) {
1032
+ async resumeBusinessBotConnection() {
606
1033
  const chatId = this.#mustGetChatId();
607
- return await this.client.promoteChatMember(chatId, userId, params);
1034
+ return await this.client.resumeBusinessBotConnection(chatId);
608
1035
  }
609
1036
  /**
610
- * Context-aware alias for {@link Client.deleteChatMemberMessages}.
1037
+ * Context-aware alias for {@link Client.scheduleVideoChat}.
611
1038
  */
612
- async deleteChatMemberMessages(userId) {
1039
+ async scheduleVideoChat(startAt, params) {
613
1040
  const chatId = this.#mustGetChatId();
614
- return await this.client.deleteChatMemberMessages(chatId, userId);
1041
+ return await this.client.scheduleVideoChat(chatId, startAt, params);
615
1042
  }
616
1043
  /**
617
1044
  * Context-aware alias for {@link Client.searchMessages}.
@@ -623,58 +1050,53 @@ class Context {
623
1050
  return await this.client.searchMessages(params);
624
1051
  }
625
1052
  /**
626
- * Context-aware alias for {@link Client.setBoostsRequiredToCircumventRestrictions}.
1053
+ * Context-aware alias for {@link Client.sendChatAction}.
627
1054
  */
628
- async setBoostsRequiredToCircumventRestrictions(boosts) {
1055
+ async sendChatAction(action, params) {
629
1056
  const chatId = this.#mustGetChatId();
630
- return await this.client.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
1057
+ return await this.client.sendChatAction(chatId, action, params);
631
1058
  }
632
1059
  /**
633
- * Context-aware alias for {@link Client.createInviteLink}.
1060
+ * Context-aware alias for {@link Client.sendScheduledMessage}.
634
1061
  */
635
- async createInviteLink(params) {
1062
+ async sendScheduledMessage(messageId) {
636
1063
  const chatId = this.#mustGetChatId();
637
- return await this.client.createInviteLink(chatId, params);
1064
+ return await this.client.sendScheduledMessage(chatId, messageId);
638
1065
  }
639
1066
  /**
640
- * Context-aware alias for {@link Client.getCreatedInviteLinks}.
1067
+ * Context-aware alias for {@link Client.setAvailableReactions}.
641
1068
  */
642
- async getCreatedInviteLinks(params) {
1069
+ async setAvailableReactions(availableReactions) {
643
1070
  const chatId = this.#mustGetChatId();
644
- return await this.client.getCreatedInviteLinks(chatId, params);
1071
+ return await this.client.setAvailableReactions(chatId, availableReactions);
645
1072
  }
646
1073
  /**
647
- * Context-aware alias for {@link Client.leaveChat}.
1074
+ * Context-aware alias for {@link Client.setBoostsRequiredToCircumventRestrictions}.
648
1075
  */
649
- async leaveChat() {
1076
+ async setBoostsRequiredToCircumventRestrictions(boosts) {
650
1077
  const chatId = this.#mustGetChatId();
651
- return await this.client.leaveChat(chatId);
652
- }
653
- /**
654
- * Context-aware alias for {@link Client.blockUser}.
655
- */
656
- async blockUser() {
657
- return await this.client.blockUser(this.#mustGetUserId());
1078
+ return await this.client.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
658
1079
  }
659
1080
  /**
660
- * Context-aware alias for {@link Client.unblockUser}.
1081
+ * Context-aware alias for {@link Client.setChatDescription}.
661
1082
  */
662
- async unblockUser() {
663
- return await this.client.unblockUser(this.#mustGetUserId());
1083
+ async setChatDescription(description) {
1084
+ const chatId = this.#mustGetChatId();
1085
+ return await this.client.setChatDescription(chatId, description);
664
1086
  }
665
1087
  /**
666
- * Context-aware alias for {@link Client.getChatMember}.
1088
+ * Context-aware alias for {@link Client.setChatMemberRights}.
667
1089
  */
668
- async getChatMember(userId) {
1090
+ async setChatMemberRights(memberId, params) {
669
1091
  const chatId = this.#mustGetChatId();
670
- return await this.client.getChatMember(chatId, userId);
1092
+ return await this.client.setChatMemberRights(chatId, memberId, params);
671
1093
  }
672
1094
  /**
673
- * Context-aware alias for {@link Client.getChatMembers}.
1095
+ * Context-aware alias for {@link Client.setChatPhoto}.
674
1096
  */
675
- async getChatMembers(params) {
1097
+ async setChatPhoto(photo, params) {
676
1098
  const chatId = this.#mustGetChatId();
677
- return await this.client.getChatMembers(chatId, params);
1099
+ return await this.client.setChatPhoto(chatId, photo, params);
678
1100
  }
679
1101
  /**
680
1102
  * Context-aware alias for {@link Client.setChatStickerSet}.
@@ -684,50 +1106,18 @@ class Context {
684
1106
  return await this.client.setChatStickerSet(chatId, setName);
685
1107
  }
686
1108
  /**
687
- * Context-aware alias for {@link Client.deleteChatStickerSet}.
1109
+ * Context-aware alias for {@link Client.setChatTitle}.
688
1110
  */
689
- async deleteChatStickerSet() {
1111
+ async setChatTitle(title) {
690
1112
  const chatId = this.#mustGetChatId();
691
- return await this.client.deleteChatStickerSet(chatId);
692
- }
693
- /**
694
- * Context-aware alias for {@link Client.getBusinessConnection}.
695
- */
696
- async getBusinessConnection() {
697
- const { businessConnectionId } = this.#mustGetMsg();
698
- if (!businessConnectionId) {
699
- (0, _0_deps_js_1.unreachable)();
700
- }
701
- return await this.client.getBusinessConnection(businessConnectionId);
702
- }
703
- /**
704
- * Context-aware alias for {@link Client.answerPreCheckoutQuery}.
705
- */
706
- async answerPreCheckoutQuery(ok, params) {
707
- if (!("preCheckoutQuery" in this.update)) {
708
- (0, _0_deps_js_1.unreachable)();
709
- }
710
- return await this.client.answerPreCheckoutQuery(this.update.preCheckoutQuery.id, ok, params);
711
- }
712
- /**
713
- * Context-aware alias for {@link Client.approveJoinRequest}.
714
- */
715
- async approveJoinRequest() {
716
- const { chatId, userId } = this.#mustGetMsg();
717
- if (!userId) {
718
- (0, _0_deps_js_1.unreachable)();
719
- }
720
- return await this.client.approveJoinRequest(chatId, userId);
1113
+ return await this.client.setChatTitle(chatId, title);
721
1114
  }
722
1115
  /**
723
- * Context-aware alias for {@link Client.declineJoinRequest}.
1116
+ * Context-aware alias for {@link Client.setDiscussionChat}.
724
1117
  */
725
- async declineJoinRequest() {
726
- const { chatId, userId } = this.#mustGetMsg();
727
- if (!userId) {
728
- (0, _0_deps_js_1.unreachable)();
729
- }
730
- return await this.client.declineJoinRequest(chatId, userId);
1118
+ async setDiscussionChat(discussionChatId) {
1119
+ const chatId = this.#mustGetChatId();
1120
+ return await this.client.setDiscussionChat(chatId, discussionChatId);
731
1121
  }
732
1122
  /**
733
1123
  * Context-aware alias for {@link Client.setChatMemberTag}.
@@ -740,39 +1130,28 @@ class Context {
740
1130
  return await this.client.setChatMemberTag(chatId, userId, params);
741
1131
  }
742
1132
  /**
743
- * Context-aware alias for {@link Client.enableSharing}.
744
- */
745
- async enableSharing() {
746
- const chatId = this.#mustGetChatId();
747
- return await this.client.enableSharing(chatId);
748
- }
749
- /**
750
- * Context-aware alias for {@link Client.disableSharing}.
751
- */
752
- async disableSharing() {
753
- const chatId = this.#mustGetChatId();
754
- return await this.client.disableSharing(chatId);
755
- }
756
- /**
757
- * Context-aware alias for {@link Client.pauseBusinessBotConnection}.
1133
+ * Context-aware alias for {@link Client.setMessageTtl}.
758
1134
  */
759
- async pauseBusinessBotConnection() {
1135
+ async setMessageTtl(messageTtl) {
760
1136
  const chatId = this.#mustGetChatId();
761
- return await this.client.pauseBusinessBotConnection(chatId);
1137
+ return await this.client.setMessageTtl(chatId, messageTtl);
762
1138
  }
763
1139
  /**
764
- * Context-aware alias for {@link Client.resumeBusinessBotConnection}.
1140
+ * Context-aware alias for {@link Client.setReactions}.
765
1141
  */
766
- async resumeBusinessBotConnection() {
1142
+ async setReactions(messageId, reactions, params) {
767
1143
  const chatId = this.#mustGetChatId();
768
- return await this.client.resumeBusinessBotConnection(chatId);
1144
+ return await this.client.setReactions(chatId, messageId, reactions, params);
769
1145
  }
770
1146
  /**
771
- * Context-aware alias for {@link Client.disableSlowMode}.
1147
+ * Context-aware alias for {@link Client.setChatMemberRights}.
772
1148
  */
773
- async disableSlowMode() {
774
- const chatId = this.#mustGetChatId();
775
- return await this.client.disableSlowMode(chatId);
1149
+ async setSenderRights(params) {
1150
+ const { chatId, senderId } = this.#mustGetMsg();
1151
+ if (!senderId) {
1152
+ (0, _0_deps_js_1.unreachable)();
1153
+ }
1154
+ return await this.client.setChatMemberRights(chatId, senderId, params);
776
1155
  }
777
1156
  /**
778
1157
  * Context-aware alias for {@link Client.setSlowMode}.
@@ -782,25 +1161,11 @@ class Context {
782
1161
  return await this.client.setSlowMode(chatId, duration);
783
1162
  }
784
1163
  /**
785
- * Context-aware alias for {@link Client.setChatTitle}.
786
- */
787
- async setChatTitle(title) {
788
- const chatId = this.#mustGetChatId();
789
- return await this.client.setChatTitle(chatId, title);
790
- }
791
- /**
792
- * Context-aware alias for {@link Client.setChatDescription}.
793
- */
794
- async setChatDescription(description) {
795
- const chatId = this.#mustGetChatId();
796
- return await this.client.setChatDescription(chatId, description);
797
- }
798
- /**
799
- * Context-aware alias for {@link Client.hideMemberList}.
1164
+ * Context-aware alias for {@link Client.showGeneralTopic}.
800
1165
  */
801
- async hideMemberList() {
1166
+ async showGeneralTopic() {
802
1167
  const chatId = this.#mustGetChatId();
803
- return await this.client.hideMemberList(chatId);
1168
+ return await this.client.showGeneralTopic(chatId);
804
1169
  }
805
1170
  /**
806
1171
  * Context-aware alias for {@link Client.showMemberList}.
@@ -810,123 +1175,101 @@ class Context {
810
1175
  return await this.client.showMemberList(chatId);
811
1176
  }
812
1177
  /**
813
- * Context-aware alias for {@link Client.enableTopics}.
814
- */
815
- async enableTopics(isShownAsTabs) {
816
- const chatId = this.#mustGetChatId();
817
- return await this.client.enableTopics(chatId, isShownAsTabs);
818
- }
819
- /**
820
- * Context-aware alias for {@link Client.disableTopics}.
821
- */
822
- async disableTopics() {
823
- const chatId = this.#mustGetChatId();
824
- return await this.client.disableTopics(chatId);
825
- }
826
- /**
827
- * Context-aware alias for {@link Client.enableAntispam}.
1178
+ * Context-aware alias for {@link Client.startVideoChat}.
828
1179
  */
829
- async enableAntispam() {
830
- const chatId = this.#mustGetChatId();
831
- return await this.client.enableAntispam(chatId);
832
- }
833
- /**
834
- * Context-aware alias for {@link Client.disableAntispam}.
835
- */
836
- async disableAntispam() {
1180
+ async startVideoChat(params) {
837
1181
  const chatId = this.#mustGetChatId();
838
- return await this.client.disableAntispam(chatId);
1182
+ return await this.client.startVideoChat(chatId, params);
839
1183
  }
840
1184
  /**
841
- * Context-aware alias for {@link Client.enableSignatures}.
1185
+ * Context-aware alias for {@link Client.stopPoll}.
842
1186
  */
843
- async enableSignatures(params) {
1187
+ async stopPoll(messageId, params) {
844
1188
  const chatId = this.#mustGetChatId();
845
- return await this.client.enableSignatures(chatId, params);
1189
+ return await this.client.stopPoll(chatId, messageId, params);
846
1190
  }
847
1191
  /**
848
- * Context-aware alias for {@link Client.disableSignatures}.
1192
+ * Context-aware alias for {@link Client.transcribeVoice}.
849
1193
  */
850
- async disableSignatures() {
1194
+ async transcribeVoice(messageId) {
851
1195
  const chatId = this.#mustGetChatId();
852
- return await this.client.disableSignatures(chatId);
1196
+ return await this.client.transcribeVoice(chatId, messageId);
853
1197
  }
854
1198
  /**
855
- * Context-aware alias for {@link Client.deleteChat}.
1199
+ * Context-aware alias for {@link Client.transferChatOwnership}.
856
1200
  */
857
- async deleteChat() {
1201
+ async transferOwnership(userId, password) {
858
1202
  const chatId = this.#mustGetChatId();
859
- return await this.client.deleteChat(chatId);
1203
+ return await this.client.transferChatOwnership(chatId, userId, password);
860
1204
  }
861
1205
  /**
862
- * Context-aware alias for {@link Client.setDiscussionChat}.
1206
+ * Context-aware alias for {@link Client.unarchiveChat}.
863
1207
  */
864
- async setDiscussionChat(discussionChatId) {
1208
+ async unarchive() {
865
1209
  const chatId = this.#mustGetChatId();
866
- return await this.client.setDiscussionChat(chatId, discussionChatId);
1210
+ return await this.client.unarchiveChat(chatId);
867
1211
  }
868
1212
  /**
869
- * Context-aware alias for {@link Client.transferChatOwnership}.
1213
+ * Context-aware alias for {@link Client.unbanChatMember}.
870
1214
  */
871
- async transferOwnership(userId, password) {
1215
+ async unbanChatMember(memberId) {
872
1216
  const chatId = this.#mustGetChatId();
873
- return await this.client.transferChatOwnership(chatId, userId, password);
1217
+ return await this.client.unbanChatMember(chatId, memberId);
874
1218
  }
875
1219
  /**
876
- * Context-aware alias for {@link Client.createTopic}.
1220
+ * Context-aware alias for {@link Client.unblockUser}.
877
1221
  */
878
- async createTopic(title, params) {
879
- const chatId = this.#mustGetChatId();
880
- return await this.client.createTopic(chatId, title, params);
1222
+ async unblockUser() {
1223
+ return await this.client.unblockUser(this.#mustGetUserId());
881
1224
  }
882
1225
  /**
883
- * Context-aware alias for {@link Client.editTopic}.
1226
+ * Context-aware alias for {@link Client.uncheckChecklistItem}.
884
1227
  */
885
- async editTopic(topicId, title, params) {
1228
+ async uncheckChecklistItem(messageId, item) {
886
1229
  const chatId = this.#mustGetChatId();
887
- return await this.client.editTopic(chatId, topicId, title, params);
1230
+ return await this.client.uncheckChecklistItem(chatId, messageId, item);
888
1231
  }
889
1232
  /**
890
- * Context-aware alias for {@link Client.hideGeneralTopic}.
1233
+ * Context-aware alias for {@link Client.uncheckChecklistItems}.
891
1234
  */
892
- async hideGeneralTopic() {
1235
+ async uncheckChecklistItems(messageId, items) {
893
1236
  const chatId = this.#mustGetChatId();
894
- return await this.client.hideGeneralTopic(chatId);
1237
+ return await this.client.uncheckChecklistItems(chatId, messageId, items);
895
1238
  }
896
1239
  /**
897
- * Context-aware alias for {@link Client.showGeneralTopic}.
1240
+ * Context-aware alias for {@link Client.unpinMessage}.
898
1241
  */
899
- async showGeneralTopic() {
900
- const chatId = this.#mustGetChatId();
901
- return await this.client.showGeneralTopic(chatId);
1242
+ async unpin() {
1243
+ const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1244
+ return await this.client.unpinMessage(chatId, messageId, { businessConnectionId });
902
1245
  }
903
1246
  /**
904
- * Context-aware alias for {@link Client.closeTopic}.
1247
+ * Context-aware alias for {@link Client.unpinMessage}.
905
1248
  */
906
- async closeTopic(topicId) {
1249
+ async unpinMessage(messageId) {
907
1250
  const chatId = this.#mustGetChatId();
908
- return await this.client.closeTopic(chatId, topicId);
1251
+ return await this.client.unpinMessage(chatId, messageId);
909
1252
  }
910
1253
  /**
911
- * Context-aware alias for {@link Client.reopenTopic}.
1254
+ * Context-aware alias for {@link Client.unpinMessages}.
912
1255
  */
913
- async reopenTopic(topicId) {
1256
+ async unpinMessages() {
914
1257
  const chatId = this.#mustGetChatId();
915
- return await this.client.reopenTopic(chatId, topicId);
1258
+ return await this.client.unpinMessages(chatId);
916
1259
  }
917
1260
  /**
918
- * Context-aware alias for {@link Client.pinTopic}.
1261
+ * Context-aware alias for {@link Client.unpinTopic}.
919
1262
  */
920
- async pinTopic(topicId) {
1263
+ async unpinTopic(topicId) {
921
1264
  const chatId = this.#mustGetChatId();
922
- return await this.client.pinTopic(chatId, topicId);
1265
+ return await this.client.unpinTopic(chatId, topicId);
923
1266
  }
924
1267
  /**
925
- * Context-aware alias for {@link Client.unpinTopic}.
1268
+ * Context-aware alias for {@link Client.updateChecklist}.
926
1269
  */
927
- async unpinTopic(topicId) {
1270
+ async updateChecklist(messageId, params) {
928
1271
  const chatId = this.#mustGetChatId();
929
- return await this.client.unpinTopic(chatId, topicId);
1272
+ return await this.client.updateChecklist(chatId, messageId, params);
930
1273
  }
931
1274
  }
932
1275
  exports.Context = Context;