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