@mtkruto/node 0.180.1 → 0.191.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 (157) hide show
  1. package/esm/3_types.d.ts +6 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +6 -0
  4. package/esm/client/0_params.d.ts +42 -30
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +1158 -1056
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  9. package/esm/client/2_client_encrypted.js +19 -12
  10. package/esm/client/2_file_manager.js +1 -1
  11. package/esm/client/3_account_manager.d.ts +6 -0
  12. package/esm/client/3_account_manager.d.ts.map +1 -1
  13. package/esm/client/3_account_manager.js +30 -1
  14. package/esm/client/3_message_manager.d.ts +3 -1
  15. package/esm/client/3_message_manager.d.ts.map +1 -1
  16. package/esm/client/3_message_manager.js +33 -19
  17. package/esm/client/3_secret_chat_manager.d.ts +3 -1
  18. package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
  19. package/esm/client/3_secret_chat_manager.js +77 -3
  20. package/esm/client/4_chat_manager.d.ts +2 -1
  21. package/esm/client/4_chat_manager.d.ts.map +1 -1
  22. package/esm/client/4_chat_manager.js +7 -1
  23. package/esm/client/4_context.d.ts +132 -48
  24. package/esm/client/4_context.d.ts.map +1 -1
  25. package/esm/client/4_context.js +336 -125
  26. package/esm/client/4_poll_manager.d.ts +3 -1
  27. package/esm/client/4_poll_manager.d.ts.map +1 -1
  28. package/esm/client/4_poll_manager.js +16 -5
  29. package/esm/client/6_client.d.ts +1158 -1056
  30. package/esm/client/6_client.d.ts.map +1 -1
  31. package/esm/client/6_client.js +1514 -1386
  32. package/esm/client/6_client_dispatcher.d.ts +1158 -1056
  33. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  34. package/esm/client/6_client_dispatcher.js +1478 -1356
  35. package/esm/types/0_checklist_changed.d.ts +1 -1
  36. package/esm/types/0_checklist_changed.d.ts.map +1 -1
  37. package/esm/types/0_location.d.ts +2 -2
  38. package/esm/types/0_location.d.ts.map +1 -1
  39. package/esm/types/0_message_viewer.d.ts +29 -0
  40. package/esm/types/0_message_viewer.d.ts.map +1 -0
  41. package/esm/types/0_message_viewer.js +25 -0
  42. package/esm/types/0_secret_chat_action_type.d.ts +69 -0
  43. package/esm/types/0_secret_chat_action_type.d.ts.map +1 -0
  44. package/esm/types/0_secret_chat_action_type.js +46 -0
  45. package/esm/types/1_chat_p.d.ts +1 -5
  46. package/esm/types/1_chat_p.d.ts.map +1 -1
  47. package/esm/types/1_input_poll_media.d.ts +5 -5
  48. package/esm/types/1_input_poll_media.d.ts.map +1 -1
  49. package/esm/types/1_input_sticker.d.ts +1 -1
  50. package/esm/types/1_secret_chat_action.d.ts +30 -0
  51. package/esm/types/1_secret_chat_action.d.ts.map +1 -0
  52. package/esm/types/1_secret_chat_action.js +28 -0
  53. package/esm/types/1_sticker.d.ts +3 -3
  54. package/esm/types/1_sticker.d.ts.map +1 -1
  55. package/esm/types/1_video.d.ts +3 -3
  56. package/esm/types/1_video.d.ts.map +1 -1
  57. package/esm/types/1_video_note.d.ts +3 -3
  58. package/esm/types/1_video_note.d.ts.map +1 -1
  59. package/esm/types/2_poll_voter.d.ts +13 -0
  60. package/esm/types/2_poll_voter.d.ts.map +1 -0
  61. package/esm/types/2_poll_voter.js +18 -0
  62. package/esm/types/3_connected_website.d.ts +35 -0
  63. package/esm/types/3_connected_website.d.ts.map +1 -0
  64. package/esm/types/3_connected_website.js +39 -0
  65. package/esm/types/3_input_media.d.ts +5 -5
  66. package/esm/types/3_input_media.d.ts.map +1 -1
  67. package/esm/types/3_poll_voter_list.d.ts +31 -0
  68. package/esm/types/3_poll_voter_list.d.ts.map +1 -0
  69. package/esm/types/3_poll_voter_list.js +28 -0
  70. package/esm/types/4_reply_to.d.ts +2 -2
  71. package/esm/types/4_reply_to.d.ts.map +1 -1
  72. package/esm/types/6_message_content.d.ts +2 -2
  73. package/esm/types/6_message_content.d.ts.map +1 -1
  74. package/esm/types/9_message.d.ts +8 -1
  75. package/esm/types/9_message.d.ts.map +1 -1
  76. package/esm/types/9_message.js +3 -0
  77. package/esm/types/B_update.d.ts +25 -10
  78. package/esm/types/B_update.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/script/3_types.d.ts +6 -0
  81. package/script/3_types.d.ts.map +1 -1
  82. package/script/3_types.js +6 -0
  83. package/script/client/0_params.d.ts +42 -30
  84. package/script/client/0_params.d.ts.map +1 -1
  85. package/script/client/1_client_generic.d.ts +1158 -1056
  86. package/script/client/1_client_generic.d.ts.map +1 -1
  87. package/script/client/2_client_encrypted.d.ts.map +1 -1
  88. package/script/client/2_client_encrypted.js +19 -12
  89. package/script/client/2_file_manager.js +1 -1
  90. package/script/client/3_account_manager.d.ts +6 -0
  91. package/script/client/3_account_manager.d.ts.map +1 -1
  92. package/script/client/3_account_manager.js +29 -0
  93. package/script/client/3_message_manager.d.ts +3 -1
  94. package/script/client/3_message_manager.d.ts.map +1 -1
  95. package/script/client/3_message_manager.js +32 -18
  96. package/script/client/3_secret_chat_manager.d.ts +3 -1
  97. package/script/client/3_secret_chat_manager.d.ts.map +1 -1
  98. package/script/client/3_secret_chat_manager.js +76 -2
  99. package/script/client/4_chat_manager.d.ts +2 -1
  100. package/script/client/4_chat_manager.d.ts.map +1 -1
  101. package/script/client/4_chat_manager.js +7 -1
  102. package/script/client/4_context.d.ts +132 -48
  103. package/script/client/4_context.d.ts.map +1 -1
  104. package/script/client/4_context.js +336 -125
  105. package/script/client/4_poll_manager.d.ts +3 -1
  106. package/script/client/4_poll_manager.d.ts.map +1 -1
  107. package/script/client/4_poll_manager.js +15 -4
  108. package/script/client/6_client.d.ts +1158 -1056
  109. package/script/client/6_client.d.ts.map +1 -1
  110. package/script/client/6_client.js +1514 -1386
  111. package/script/client/6_client_dispatcher.d.ts +1158 -1056
  112. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  113. package/script/client/6_client_dispatcher.js +1478 -1356
  114. package/script/types/0_checklist_changed.d.ts +1 -1
  115. package/script/types/0_checklist_changed.d.ts.map +1 -1
  116. package/script/types/0_location.d.ts +2 -2
  117. package/script/types/0_location.d.ts.map +1 -1
  118. package/script/types/0_message_viewer.d.ts +29 -0
  119. package/script/types/0_message_viewer.d.ts.map +1 -0
  120. package/script/types/0_message_viewer.js +28 -0
  121. package/script/types/0_secret_chat_action_type.d.ts +69 -0
  122. package/script/types/0_secret_chat_action_type.d.ts.map +1 -0
  123. package/script/types/0_secret_chat_action_type.js +49 -0
  124. package/script/types/1_chat_p.d.ts +1 -5
  125. package/script/types/1_chat_p.d.ts.map +1 -1
  126. package/script/types/1_input_poll_media.d.ts +5 -5
  127. package/script/types/1_input_poll_media.d.ts.map +1 -1
  128. package/script/types/1_input_sticker.d.ts +1 -1
  129. package/script/types/1_secret_chat_action.d.ts +30 -0
  130. package/script/types/1_secret_chat_action.d.ts.map +1 -0
  131. package/script/types/1_secret_chat_action.js +31 -0
  132. package/script/types/1_sticker.d.ts +3 -3
  133. package/script/types/1_sticker.d.ts.map +1 -1
  134. package/script/types/1_video.d.ts +3 -3
  135. package/script/types/1_video.d.ts.map +1 -1
  136. package/script/types/1_video_note.d.ts +3 -3
  137. package/script/types/1_video_note.d.ts.map +1 -1
  138. package/script/types/2_poll_voter.d.ts +13 -0
  139. package/script/types/2_poll_voter.d.ts.map +1 -0
  140. package/script/types/2_poll_voter.js +21 -0
  141. package/script/types/3_connected_website.d.ts +35 -0
  142. package/script/types/3_connected_website.d.ts.map +1 -0
  143. package/script/types/3_connected_website.js +42 -0
  144. package/script/types/3_input_media.d.ts +5 -5
  145. package/script/types/3_input_media.d.ts.map +1 -1
  146. package/script/types/3_poll_voter_list.d.ts +31 -0
  147. package/script/types/3_poll_voter_list.d.ts.map +1 -0
  148. package/script/types/3_poll_voter_list.js +31 -0
  149. package/script/types/4_reply_to.d.ts +2 -2
  150. package/script/types/4_reply_to.d.ts.map +1 -1
  151. package/script/types/6_message_content.d.ts +2 -2
  152. package/script/types/6_message_content.d.ts.map +1 -1
  153. package/script/types/9_message.d.ts +8 -1
  154. package/script/types/9_message.d.ts.map +1 -1
  155. package/script/types/9_message.js +3 -0
  156. package/script/types/B_update.d.ts +25 -10
  157. package/script/types/B_update.d.ts.map +1 -1
@@ -277,33 +277,22 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
277
277
  // ========================= ACCOUNT ========================= //
278
278
  //
279
279
  /**
280
- * Get information on the currently authorized user.
281
- *
282
- * @method ac
283
- * @returns Information on the currently authorized user.
284
- */
285
- async getMe() {
286
- return await this.#dispatch("getMe");
287
- }
288
- /**
289
- * Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
280
+ * Add a bot to the attachments menu. User-only.
290
281
  *
291
282
  * @method ac
292
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
293
- * @param username The username to show.
283
+ * @param botId The identifier of the bot to add to the attachments menu.
294
284
  */
295
- async showUsername(id, username) {
296
- return await this.#dispatch("showUsername", id, username);
285
+ async addBotToAttachmentsMenu(botId, params) {
286
+ return await this.#dispatch("addBotToAttachmentsMenu", botId, params);
297
287
  }
298
288
  /**
299
- * Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
289
+ * Block a user. User-only.
300
290
  *
301
291
  * @method ac
302
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
303
- * @param username The username to hide.
292
+ * @param userId The identifier of the user to block.
304
293
  */
305
- async hideUsername(id, username) {
306
- return await this.#dispatch("hideUsername", id, username);
294
+ async blockUser(userId) {
295
+ return await this.#dispatch("blockUser", userId);
307
296
  }
308
297
  /**
309
298
  * Check the availability of a username. User-only.
@@ -316,678 +305,631 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
316
305
  return await this.#dispatch("checkUsername", username, params);
317
306
  }
318
307
  /**
319
- * Set the username of the current account. User-only.
308
+ * Delete the current account. User-only.
320
309
  *
321
310
  * @method ac
322
- * @param username The username to set.
311
+ * @param reason The reason of the deletion.
323
312
  */
324
- async setUsername(username) {
325
- return await this.#dispatch("setUsername", username);
313
+ async deleteAccount(reason, params) {
314
+ return await this.#dispatch("deleteAccount", reason, params);
326
315
  }
327
316
  /**
328
- * Remove the current account's username. User-only.
317
+ * Disable sponsored messages on the current user. User-only.
329
318
  *
330
319
  * @method ac
331
320
  */
332
- async removeUsername() {
333
- return await this.#dispatch("removeUsername");
321
+ async disableSponsoredMessages() {
322
+ return await this.#dispatch("disableSponsoredMessages");
334
323
  }
335
324
  /**
336
- * Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
325
+ * Disconnect a connected website. User-only.
337
326
  *
338
327
  * @method ac
339
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
340
- * @param order The new order to use.
341
- * @returns Whether the order was changed.
328
+ * @param id The identifier of a connected website.
342
329
  */
343
- async reorderUsernames(id, order) {
344
- return await this.#dispatch("reorderUsernames", id, order);
330
+ async disconnectConnectedWebsite(id) {
331
+ return await this.#dispatch("disconnectConnectedWebsite", id);
345
332
  }
346
333
  /**
347
- * Hide all usernames from a supergroup or a channel's profile. User-only.
334
+ * Disconnect all connected websites. User-only.
348
335
  *
349
336
  * @method ac
350
- * @param id A supergroup ID or a channel ID.
351
- * @returns Whether any username was hidden.
352
337
  */
353
- async hideUsernames(id) {
354
- return await this.#dispatch("hideUsernames", id);
338
+ async disconnectConnectedWebsites() {
339
+ return await this.#dispatch("disconnectConnectedWebsites");
355
340
  }
356
341
  /**
357
- * Get a business connection. Bot-only.
342
+ * Enable sponsored messages on the current user. User-only.
358
343
  *
359
344
  * @method ac
360
- * @param id The identifier of the business connection.
361
- * @cache
362
345
  */
363
- async getBusinessConnection(id) {
364
- return await this.#dispatch("getBusinessConnection", id);
346
+ async enableSponsoredMessages() {
347
+ return await this.#dispatch("enableSponsoredMessages");
365
348
  }
366
349
  /**
367
- * Set the current account's online status. User-only.
350
+ * Get the current account's TTL. User-only.
368
351
  *
369
352
  * @method ac
370
- * @param isOnline The new online status.
353
+ * @returns The current account's TTL in days.
371
354
  */
372
- async setIsOnline(isOnline) {
373
- return await this.#dispatch("setIsOnline", isOnline);
355
+ async getAccountTtl() {
356
+ return await this.#dispatch("getAccountTtl");
374
357
  }
375
358
  /**
376
- * Set the current account's emoji status. User-only.
359
+ * Get app support. User-only.
377
360
  *
378
361
  * @method ac
379
- * @param emojiStatus The emoji or gift to set as the new emoji status.
380
362
  */
381
- async setEmojiStatus(emojiStatus, params) {
382
- return await this.#dispatch("setEmojiStatus", emojiStatus, params);
363
+ async getAppSupport() {
364
+ return await this.#dispatch("getAppSupport");
383
365
  }
384
366
  /**
385
- * Remove the current account's emoji status. User-only.
367
+ * Get app support name. User-only.
386
368
  *
387
369
  * @method ac
388
370
  */
389
- async removeEmojiStatus() {
390
- return await this.#dispatch("removeEmojiStatus");
371
+ async getAppSupportName() {
372
+ return await this.#dispatch("getAppSupportName");
391
373
  }
392
374
  /**
393
- * Set the emoji status of a channel. User-only.
375
+ * Get the authorization sessions. User-only.
394
376
  *
395
377
  * @method ac
396
- * @param chatId The identifier of a channel.
397
- * @param emojiStatus The emoji or gift to set as the new emoji status.
398
378
  */
399
- async setChannelEmojiStatus(chatId, emojiStatus, params) {
400
- return await this.#dispatch("setChannelEmojiStatus", chatId, emojiStatus, params);
379
+ async getAuthorizationSessions() {
380
+ return await this.#dispatch("getAuthorizationSessions");
401
381
  }
402
382
  /**
403
- * Remove the emoji status of a channel. User-only.
383
+ * Get blocked users. User-only.
404
384
  *
405
385
  * @method ac
406
- * @param chatId The identifier of a channel.
407
386
  */
408
- async removeChannelEmojiStatus(chatId) {
409
- return await this.#dispatch("removeChannelEmojiStatus", chatId);
387
+ async getBlockedUsers(params) {
388
+ return await this.#dispatch("getBlockedUsers", params);
410
389
  }
411
390
  /**
412
- * Set the emoji status of a bot's user. Bot-only.
391
+ * Get a business connection. Bot-only.
413
392
  *
414
393
  * @method ac
415
- * @param userId The identifier of a user of the bot.
416
- * @param emojiStatus The emoji or gift to set as the new emoji status.
394
+ * @param id The identifier of the business connection.
395
+ * @cache
417
396
  */
418
- async setUserEmojiStatus(userId, emojiStatus, params) {
419
- return await this.#dispatch("setUserEmojiStatus", userId, emojiStatus, params);
397
+ async getBusinessConnection(id) {
398
+ return await this.#dispatch("getBusinessConnection", id);
420
399
  }
421
400
  /**
422
- * Remove the emoji status of a bot's user. Bot-only.
401
+ * Get connected websites. User-only.
423
402
  *
424
403
  * @method ac
425
- * @param userId The identifier of a user of the bot.
426
404
  */
427
- async removeUserEmojiStatus(userId) {
428
- return await this.#dispatch("removeUserEmojiStatus", userId);
405
+ async getConnectedWebsites() {
406
+ return await this.#dispatch("getConnectedWebsites");
429
407
  }
430
408
  /**
431
- * Update the profile of the current user. At least one parameter must be specified. User-only.
409
+ * Get countries. User-only.
432
410
  *
433
411
  * @method ac
434
412
  */
435
- async updateProfile(params) {
436
- return await this.#dispatch("updateProfile", params);
413
+ async getCountries(languageCode) {
414
+ return await this.#dispatch("getCountries", languageCode);
437
415
  }
438
416
  /**
439
- * Update the profile photo of the current user or a bot managed by the current user.
417
+ * Get the country code for the current user based on its IP address. User-only.
440
418
  *
441
419
  * @method ac
442
- * @param photo The photo to set as profile photo.
443
420
  */
444
- async updateProfilePhoto(photo, params) {
445
- return await this.#dispatch("updateProfilePhoto", photo, params);
421
+ async getCountryCode() {
422
+ return await this.#dispatch("getCountryCode");
446
423
  }
447
424
  /**
448
- * Update the profile video of the current user or a bot managed by the current user.
425
+ * Get information on the currently authorized user.
449
426
  *
450
427
  * @method ac
451
- * @param video The video to set as profile video.
428
+ * @returns Information on the currently authorized user.
452
429
  */
453
- async updateProfileVideo(video, params) {
454
- return await this.#dispatch("updateProfileVideo", video, params);
430
+ async getMe() {
431
+ return await this.#dispatch("getMe");
455
432
  }
456
433
  /**
457
- * Remove the profile video of the current user or a bot managed by the current user.
434
+ * Get owned bots. User-only.
458
435
  *
459
436
  * @method ac
460
437
  */
461
- async removeProfilePhoto(params) {
462
- return await this.#dispatch("removeProfilePhoto", params);
438
+ async getOwnedBots() {
439
+ return await this.#dispatch("getOwnedBots");
463
440
  }
464
441
  /**
465
- * Set the birthday of the current user. User-only.
442
+ * Get the profile photos of a user.
466
443
  *
467
444
  * @method ac
445
+ * @param userId The identifier of a user.
468
446
  */
469
- async setBirthday(params) {
470
- return await this.#dispatch("setBirthday", params);
447
+ async getProfilePhotos(userId, params) {
448
+ return await this.#dispatch("getProfilePhotos", userId, params);
471
449
  }
472
450
  /**
473
- * Set the personal channel of the current user. User-only.
451
+ * Get timezones. User-only.
474
452
  *
475
453
  * @method ac
476
454
  */
477
- async setPersonalChannel(params) {
478
- return await this.#dispatch("setPersonalChannel", params);
455
+ async getTimezones() {
456
+ return await this.#dispatch("getTimezones");
479
457
  }
480
458
  /**
481
- * Set the name color of the current user. User-only.
459
+ * Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
482
460
  *
483
461
  * @method ac
484
- * @param color The identifier of the color to set.
462
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
463
+ * @param username The username to hide.
485
464
  */
486
- async setNameColor(color, params) {
487
- return await this.#dispatch("setNameColor", color, params);
465
+ async hideUsername(id, username) {
466
+ return await this.#dispatch("hideUsername", id, username);
488
467
  }
489
468
  /**
490
- * Set the profile color of the current user. User-only.
469
+ * Hide all usernames from a supergroup or a channel's profile. User-only.
491
470
  *
492
471
  * @method ac
493
- * @param color The identifier of the color to set.
472
+ * @param id A supergroup ID or a channel ID.
473
+ * @returns Whether any username was hidden.
494
474
  */
495
- async setProfileColor(color, params) {
496
- return await this.#dispatch("setProfileColor", color, params);
475
+ async hideUsernames(id) {
476
+ return await this.#dispatch("hideUsernames", id);
497
477
  }
498
478
  /**
499
- * Set the location of the current user. User-only.
479
+ * Pause the business bot in a chat. User-only.
500
480
  *
501
481
  * @method ac
482
+ * @param chatId The identifier of a chat.
502
483
  */
503
- async setLocation(params) {
504
- return await this.#dispatch("setLocation", params);
484
+ async pauseBusinessBotConnection(chatId) {
485
+ return await this.#dispatch("pauseBusinessBotConnection", chatId);
505
486
  }
506
487
  /**
507
- * Set the working hours of the current user. User-only.
488
+ * Remove an authorization session. User-only.
508
489
  *
509
490
  * @method ac
491
+ * @param id The identifier of the authorization session to remove.
510
492
  */
511
- async setWorkingHours(params) {
512
- return await this.#dispatch("setWorkingHours", params);
493
+ async removeAuthorizationSession(id) {
494
+ return await this.#dispatch("removeAuthorizationSession", id);
513
495
  }
514
496
  /**
515
- * Enable sponsored messages on the current user. User-only.
497
+ * Remove all authorization sessions except for the current one. User-only.
516
498
  *
517
499
  * @method ac
518
500
  */
519
- async enableSponsoredMessages() {
520
- return await this.#dispatch("enableSponsoredMessages");
501
+ async removeAuthorizationSessions() {
502
+ return await this.#dispatch("removeAuthorizationSessions");
521
503
  }
522
504
  /**
523
- * Disable sponsored messages on the current user. User-only.
505
+ * Remove a bot from the attachments menu. User-only.
524
506
  *
525
507
  * @method ac
508
+ * @param botId The identifier of the bot to remove from the attachments menu.
526
509
  */
527
- async disableSponsoredMessages() {
528
- return await this.#dispatch("disableSponsoredMessages");
510
+ async removeBotFromAttachmentsMenu(botId) {
511
+ return await this.#dispatch("removeBotFromAttachmentsMenu", botId);
529
512
  }
530
513
  /**
531
- * Pause the business bot in a chat. User-only.
514
+ * Remove the emoji status of a channel. User-only.
532
515
  *
533
516
  * @method ac
534
- * @param chatId The identifier of a chat.
517
+ * @param chatId The identifier of a channel.
535
518
  */
536
- async pauseBusinessBotConnection(chatId) {
537
- return await this.#dispatch("pauseBusinessBotConnection", chatId);
519
+ async removeChannelEmojiStatus(chatId) {
520
+ return await this.#dispatch("removeChannelEmojiStatus", chatId);
538
521
  }
539
522
  /**
540
- * Resume the business bot in a chat. User-only.
523
+ * Remove the current account's emoji status. User-only.
541
524
  *
542
525
  * @method ac
543
- * @param chatId The identifier of a chat.
544
526
  */
545
- async resumeBusinessBotConnection(chatId) {
546
- return await this.#dispatch("resumeBusinessBotConnection", chatId);
527
+ async removeEmojiStatus() {
528
+ return await this.#dispatch("removeEmojiStatus");
547
529
  }
548
530
  /**
549
- * Resolve a username.
531
+ * Remove the profile video of the current user or a bot managed by the current user.
550
532
  *
551
533
  * @method ac
552
- * @param username The username to resolve.
553
534
  */
554
- async resolveUsername(username, params) {
555
- return await this.#dispatch("resolveUsername", username, params);
535
+ async removeProfilePhoto(params) {
536
+ return await this.#dispatch("removeProfilePhoto", params);
556
537
  }
557
538
  /**
558
- * Resolve a phone number. User-only.
539
+ * Remove the emoji status of a bot's user. Bot-only.
559
540
  *
560
541
  * @method ac
561
- * @param phoneNumber The phone number to resolve.
542
+ * @param userId The identifier of a user of the bot.
562
543
  */
563
- async resolvePhoneNumber(phoneNumber) {
564
- return await this.#dispatch("resolvePhoneNumber", phoneNumber);
544
+ async removeUserEmojiStatus(userId) {
545
+ return await this.#dispatch("removeUserEmojiStatus", userId);
565
546
  }
566
547
  /**
567
- * Set the list of close friends. User-only.
548
+ * Remove the current account's username. User-only.
568
549
  *
569
550
  * @method ac
570
- * @param userIds The identifiers of users to set as close friends.
571
551
  */
572
- async setCloseFriends(userIds) {
573
- return await this.#dispatch("setCloseFriends", userIds);
552
+ async removeUsername() {
553
+ return await this.#dispatch("removeUsername");
574
554
  }
575
555
  /**
576
- * Suggest a birthday. User-only.
556
+ * Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
577
557
  *
578
558
  * @method ac
579
- * @param userId The identifier of the user to suggest a birthday for.
580
- * @param birthday The birthday to suggest.
559
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
560
+ * @param order The new order to use.
561
+ * @returns Whether the order was changed.
581
562
  */
582
- async suggestBirthday(userId, birthday) {
583
- return await this.#dispatch("suggestBirthday", userId, birthday);
563
+ async reorderUsernames(id, order) {
564
+ return await this.#dispatch("reorderUsernames", id, order);
584
565
  }
585
566
  /**
586
- * Block a user. User-only.
567
+ * Resolve a phone number. User-only.
587
568
  *
588
569
  * @method ac
589
- * @param userId The identifier of the user to block.
570
+ * @param phoneNumber The phone number to resolve.
590
571
  */
591
- async blockUser(userId) {
592
- return await this.#dispatch("blockUser", userId);
572
+ async resolvePhoneNumber(phoneNumber) {
573
+ return await this.#dispatch("resolvePhoneNumber", phoneNumber);
593
574
  }
594
575
  /**
595
- * Unblock a user. User-only.
576
+ * Resolve a username.
596
577
  *
597
578
  * @method ac
598
- * @param userId The identifier of the user to unblock.
579
+ * @param username The username to resolve.
599
580
  */
600
- async unblockUser(userId) {
601
- return await this.#dispatch("unblockUser", userId);
581
+ async resolveUsername(username, params) {
582
+ return await this.#dispatch("resolveUsername", username, params);
602
583
  }
603
584
  /**
604
- * Get blocked users. User-only.
585
+ * Resume the business bot in a chat. User-only.
605
586
  *
606
587
  * @method ac
588
+ * @param chatId The identifier of a chat.
607
589
  */
608
- async getBlockedUsers(params) {
609
- return await this.#dispatch("getBlockedUsers", params);
590
+ async resumeBusinessBotConnection(chatId) {
591
+ return await this.#dispatch("resumeBusinessBotConnection", chatId);
610
592
  }
611
593
  /**
612
- * Add a bot to the attachments menu. User-only.
594
+ * Set the current account's TTL. User-only.
613
595
  *
614
596
  * @method ac
615
- * @param botId The identifier of the bot to add to the attachments menu.
597
+ * @param dayCount The current account's TTL in days.
616
598
  */
617
- async addBotToAttachmentsMenu(botId, params) {
618
- return await this.#dispatch("addBotToAttachmentsMenu", botId, params);
599
+ async setAccountTtl(dayCount) {
600
+ return await this.#dispatch("setAccountTtl", dayCount);
619
601
  }
620
602
  /**
621
- * Remove a bot from the attachments menu. User-only.
603
+ * Set the birthday of the current user. User-only.
622
604
  *
623
605
  * @method ac
624
- * @param botId The identifier of the bot to remove from the attachments menu.
625
606
  */
626
- async removeBotFromAttachmentsMenu(botId) {
627
- return await this.#dispatch("removeBotFromAttachmentsMenu", botId);
607
+ async setBirthday(params) {
608
+ return await this.#dispatch("setBirthday", params);
628
609
  }
629
610
  /**
630
- * Get app support. User-only.
611
+ * Set the emoji status of a channel. User-only.
631
612
  *
632
613
  * @method ac
614
+ * @param chatId The identifier of a channel.
615
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
633
616
  */
634
- async getAppSupport() {
635
- return await this.#dispatch("getAppSupport");
617
+ async setChannelEmojiStatus(chatId, emojiStatus, params) {
618
+ return await this.#dispatch("setChannelEmojiStatus", chatId, emojiStatus, params);
636
619
  }
637
620
  /**
638
- * Get app support name. User-only.
621
+ * Set the list of close friends. User-only.
639
622
  *
640
623
  * @method ac
624
+ * @param userIds The identifiers of users to set as close friends.
641
625
  */
642
- async getAppSupportName() {
643
- return await this.#dispatch("getAppSupportName");
626
+ async setCloseFriends(userIds) {
627
+ return await this.#dispatch("setCloseFriends", userIds);
644
628
  }
645
629
  /**
646
- * Get owned bots. User-only.
630
+ * Set the current account's emoji status. User-only.
647
631
  *
648
632
  * @method ac
633
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
649
634
  */
650
- async getOwnedBots() {
651
- return await this.#dispatch("getOwnedBots");
635
+ async setEmojiStatus(emojiStatus, params) {
636
+ return await this.#dispatch("setEmojiStatus", emojiStatus, params);
652
637
  }
653
638
  /**
654
- * Get timezones. User-only.
639
+ * Set the current account's online status. User-only.
655
640
  *
656
641
  * @method ac
642
+ * @param isOnline The new online status.
657
643
  */
658
- async getTimezones() {
659
- return await this.#dispatch("getTimezones");
644
+ async setIsOnline(isOnline) {
645
+ return await this.#dispatch("setIsOnline", isOnline);
660
646
  }
661
647
  /**
662
- * Get countries. User-only.
648
+ * Set the location of the current user. User-only.
663
649
  *
664
650
  * @method ac
665
651
  */
666
- async getCountries(languageCode) {
667
- return await this.#dispatch("getCountries", languageCode);
652
+ async setLocation(params) {
653
+ return await this.#dispatch("setLocation", params);
668
654
  }
669
655
  /**
670
- * Get the profile photos of a user.
656
+ * Set the name color of the current user. User-only.
671
657
  *
672
658
  * @method ac
673
- * @param userId The identifier of a user.
659
+ * @param color The identifier of the color to set.
674
660
  */
675
- async getProfilePhotos(userId, params) {
676
- return await this.#dispatch("getProfilePhotos", userId, params);
661
+ async setNameColor(color, params) {
662
+ return await this.#dispatch("setNameColor", color, params);
677
663
  }
678
664
  /**
679
- * Delete the current account. User-only.
665
+ * Set the personal channel of the current user. User-only.
680
666
  *
681
667
  * @method ac
682
- * @param reason The reason of the deletion.
683
668
  */
684
- async deleteAccount(reason, params) {
685
- return await this.#dispatch("deleteAccount", reason, params);
669
+ async setPersonalChannel(params) {
670
+ return await this.#dispatch("setPersonalChannel", params);
686
671
  }
687
672
  /**
688
- * Get the authorization sessions. User-only.
673
+ * Set the profile color of the current user. User-only.
689
674
  *
690
675
  * @method ac
676
+ * @param color The identifier of the color to set.
691
677
  */
692
- async getAuthorizationSessions() {
693
- return await this.#dispatch("getAuthorizationSessions");
678
+ async setProfileColor(color, params) {
679
+ return await this.#dispatch("setProfileColor", color, params);
694
680
  }
695
681
  /**
696
- * Remove an authorization session. User-only.
682
+ * Set the emoji status of a bot's user. Bot-only.
697
683
  *
698
684
  * @method ac
699
- * @param id The identifier of the authorization session to remove.
685
+ * @param userId The identifier of a user of the bot.
686
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
700
687
  */
701
- async removeAuthorizationSession(id) {
702
- return await this.#dispatch("removeAuthorizationSession", id);
688
+ async setUserEmojiStatus(userId, emojiStatus, params) {
689
+ return await this.#dispatch("setUserEmojiStatus", userId, emojiStatus, params);
703
690
  }
704
691
  /**
705
- * Remove all authorization sessions except for the current one. User-only.
692
+ * Set the username of the current account. User-only.
706
693
  *
707
694
  * @method ac
695
+ * @param username The username to set.
708
696
  */
709
- async removeAuthorizationSessions() {
710
- return await this.#dispatch("removeAuthorizationSessions");
697
+ async setUsername(username) {
698
+ return await this.#dispatch("setUsername", username);
711
699
  }
712
- //
713
- // ========================= MESSAGES ========================= //
714
- //
715
700
  /**
716
- * Send a text message.
701
+ * Set the working hours of the current user. User-only.
717
702
  *
718
- * @method ms
719
- * @param chatId The identifier of a chat to send the message to.
720
- * @param text The message's text.
721
- * @returns The sent text message.
703
+ * @method ac
722
704
  */
723
- async sendMessage(chatId, text, params) {
724
- return await this.#dispatch("sendMessage", chatId, text, params);
705
+ async setWorkingHours(params) {
706
+ return await this.#dispatch("setWorkingHours", params);
725
707
  }
726
708
  /**
727
- * Send a rich text message.
709
+ * Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
728
710
  *
729
- * @method ms
730
- * @param chatId The identifier of a chat to send the message to.
731
- * @param richText The message's rich text.
732
- * @returns The sent rich text message.
711
+ * @method ac
712
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
713
+ * @param username The username to show.
733
714
  */
734
- async sendRichText(chatId, richText, params) {
735
- return await this.#dispatch("sendRichText", chatId, richText, params);
715
+ async showUsername(id, username) {
716
+ return await this.#dispatch("showUsername", id, username);
736
717
  }
737
718
  /**
738
- * Stream a drafted text message. Bot-only.
719
+ * Suggest a birthday. User-only.
739
720
  *
740
- * @method ms
741
- * @param chatId The identifier of a chat to send the message to.
742
- * @param draftId The identifier of the draft.
743
- * @param text The message's text.
721
+ * @method ac
722
+ * @param userId The identifier of the user to suggest a birthday for.
723
+ * @param birthday The birthday to suggest.
744
724
  */
745
- async sendMessageDraft(chatId, draftId, text, params) {
746
- return await this.#dispatch("sendMessageDraft", chatId, draftId, text, params);
725
+ async suggestBirthday(userId, birthday) {
726
+ return await this.#dispatch("suggestBirthday", userId, birthday);
747
727
  }
748
728
  /**
749
- * Stream a drafted rich text message. Bot-only.
729
+ * Unblock a user. User-only.
750
730
  *
751
- * @method ms
752
- * @param chatId The identifier of a chat to send the message to.
753
- * @param draftId The identifier of the draft.
754
- * @param richText The message's rich text.
731
+ * @method ac
732
+ * @param userId The identifier of the user to unblock.
755
733
  */
756
- async sendRichTextDraft(chatId, draftId, richText, params) {
757
- return await this.#dispatch("sendRichTextDraft", chatId, draftId, richText, params);
734
+ async unblockUser(userId) {
735
+ return await this.#dispatch("unblockUser", userId);
758
736
  }
759
737
  /**
760
- * Send a photo.
738
+ * Update the profile of the current user. At least one parameter must be specified. User-only.
761
739
  *
762
- * @method ms
763
- * @param chatId The identifier of a chat to send the photo to.
764
- * @param photo The photo to send.
765
- * @returns The sent photo.
740
+ * @method ac
766
741
  */
767
- async sendPhoto(chatId, photo, params) {
768
- return await this.#dispatch("sendPhoto", chatId, photo, params);
742
+ async updateProfile(params) {
743
+ return await this.#dispatch("updateProfile", params);
769
744
  }
770
745
  /**
771
- * Send a live photo.
746
+ * Update the profile photo of the current user or a bot managed by the current user.
772
747
  *
773
- * @method ms
774
- * @param chatId The identifier of a chat to send the photo to.
775
- * @param photo The photo to send.
776
- * @param video The video version of the photo.
777
- * @returns The sent live photo.
748
+ * @method ac
749
+ * @param photo The photo to set as profile photo.
778
750
  */
779
- async sendLivePhoto(chatId, photo, video, params) {
780
- return await this.#dispatch("sendLivePhoto", chatId, photo, video, params);
751
+ async updateProfilePhoto(photo, params) {
752
+ return await this.#dispatch("updateProfilePhoto", photo, params);
781
753
  }
782
754
  /**
783
- * Send a document.
755
+ * Update the profile video of the current user or a bot managed by the current user.
784
756
  *
785
- * @method ms
786
- * @param chatId The identifier of a chat to send the document to.
787
- * @param document The document to send.
788
- * @returns The sent document.
757
+ * @method ac
758
+ * @param video The video to set as profile video.
789
759
  */
790
- async sendDocument(chatId, document, params) {
791
- return await this.#dispatch("sendDocument", chatId, document, params);
760
+ async updateProfileVideo(video, params) {
761
+ return await this.#dispatch("updateProfileVideo", video, params);
792
762
  }
763
+ //
764
+ // ========================= MESSAGES ========================= //
765
+ //
793
766
  /**
794
- * Send a sticker.
767
+ * Add a sticker to favorites. User-only.
795
768
  *
796
769
  * @method ms
797
- * @param chatId The identifier of a chat to send the sticker to.
798
- * @param sticker The sticker to send.
799
- * @returns The sent sticker.
770
+ * @param fileId The file identifier of the sticker.
800
771
  */
801
- async sendSticker(chatId, sticker, params) {
802
- return await this.#dispatch("sendSticker", chatId, sticker, params);
772
+ async addStickerToFavorites(fileId) {
773
+ return await this.#dispatch("addStickerToFavorites", fileId);
803
774
  }
804
775
  /**
805
- * Send a video.
776
+ * Add a sticker to recents. User-only.
806
777
  *
807
778
  * @method ms
808
- * @param chatId The identifier of a chat to send the video to.
809
- * @param video The video to send.
810
- * @returns The sent video.
779
+ * @param fileId The file identifier of the sticker.
811
780
  */
812
- async sendVideo(chatId, video, params) {
813
- return await this.#dispatch("sendVideo", chatId, video, params);
781
+ async addStickerToRecents(fileId) {
782
+ return await this.#dispatch("addStickerToRecents", fileId);
814
783
  }
815
784
  /**
816
- * Send an animation.
785
+ * Clear all message drafts. User-only.
817
786
  *
818
787
  * @method ms
819
- * @param chatId The identifier of a chat to send the animation to.
820
- * @param animation The animation to send.
821
- * @returns The sent animation.
822
788
  */
823
- async sendAnimation(chatId, animation, params) {
824
- return await this.#dispatch("sendAnimation", chatId, animation, params);
789
+ async clearDrafts() {
790
+ return await this.#dispatch("clearDrafts");
825
791
  }
826
792
  /**
827
- * Send a voice message.
793
+ * Clear recent stickers. User-only.
828
794
  *
829
795
  * @method ms
830
- * @param chatId The identifier of a chat to send the voice message to.
831
- * @param voice The voice to send.
832
- * @returns The sent voice message.
833
796
  */
834
- async sendVoice(chatId, voice, params) {
835
- return await this.#dispatch("sendVoice", chatId, voice, params);
797
+ async clearRecentStickers() {
798
+ return await this.#dispatch("clearRecentStickers");
836
799
  }
837
800
  /**
838
- * Send an audio file.
801
+ * Delete all messages sent by a specific member of a chat. User-only.
839
802
  *
840
803
  * @method ms
841
- * @param chatId The identifier of a chat to send the audio file to.
842
- * @param audio The audio to send.
843
- * @returns The sent audio file.
804
+ * @param chatId The identifier of a chat. Must be a supergroup.
805
+ * @param memberId The identifier of the member.
844
806
  */
845
- async sendAudio(chatId, audio, params) {
846
- return await this.#dispatch("sendAudio", chatId, audio, params);
807
+ async deleteChatMemberMessages(chatId, memberId) {
808
+ return await this.#dispatch("deleteChatMemberMessages", chatId, memberId);
847
809
  }
848
810
  /**
849
- * Send a media group.
811
+ * Delete a single message.
850
812
  *
851
813
  * @method ms
852
- * @param chatId The identifier of a chat to send the media group to.
853
- * @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
854
- * @returns The sent messages.
814
+ * @param chatId The identifier of the chat which the message belongs to.
815
+ * @param messageId The identifier of the message to delete.
855
816
  */
856
- async sendMediaGroup(chatId, media, params) {
857
- return await this.#dispatch("sendMediaGroup", chatId, media, params);
817
+ async deleteMessage(chatId, messageId, params) {
818
+ return await this.#dispatch("deleteMessage", chatId, messageId, params);
858
819
  }
859
820
  /**
860
- * Send a video note.
821
+ * Delete multiple messages.
861
822
  *
862
823
  * @method ms
863
- * @param chatId The identifier of a chat to send the video note to.
864
- * @param videoNote The video note to send.
865
- * @returns The sent video note.
824
+ * @param chatId The identifier of the chat which the message belongs to.
825
+ * @param messageIds The identifiers of the messages to delete.
866
826
  */
867
- async sendVideoNote(chatId, videoNote, params) {
868
- return await this.#dispatch("sendVideoNote", chatId, videoNote, params);
827
+ async deleteMessages(chatId, messageIds, params) {
828
+ return await this.#dispatch("deleteMessages", chatId, messageIds, params);
869
829
  }
870
830
  /**
871
- * Send a location.
831
+ * Delete a scheduled message.
872
832
  *
873
833
  * @method ms
874
- * @param chatId The identifier of a chat to send the location to.
875
- * @param latitude The location's latitude.
876
- * @param longitude The location's longitude.
877
- * @returns The sent location.
834
+ * @param chatId The identifier of a chat.
835
+ * @param messageId The identifier of the scheduled message to delete.
878
836
  */
879
- async sendLocation(chatId, latitude, longitude, params) {
880
- return await this.#dispatch("sendLocation", chatId, latitude, longitude, params);
837
+ async deleteScheduledMessage(chatId, messageId) {
838
+ return await this.#dispatch("deleteScheduledMessage", chatId, messageId);
881
839
  }
882
840
  /**
883
- * Send a contact.
841
+ * Delete multiple scheduled messages.
884
842
  *
885
843
  * @method ms
886
- * @param chatId The identifier of a chat to send the contact to.
887
- * @param firstName The contact's first name.
888
- * @param phoneNumber The contact's phone number.
889
- * @returns The sent contact.
844
+ * @param chatId The identifier of a chat.
845
+ * @param messageIds The identifiers of the scheduled messages to delete.
890
846
  */
891
- async sendContact(chatId, firstName, phoneNumber, params) {
892
- return await this.#dispatch("sendContact", chatId, firstName, phoneNumber, params);
847
+ async deleteScheduledMessages(chatId, messageIds) {
848
+ return await this.#dispatch("deleteScheduledMessages", chatId, messageIds);
893
849
  }
894
850
  /**
895
- * Send a dice.
851
+ * Edit an inline message's caption. Bot-only.
896
852
  *
897
853
  * @method ms
898
- * @param chatId The identifier of a chat to send the dice to.
899
- * @returns The sent dice.
854
+ * @param inlineMessageId The identifier of the inline message.
900
855
  */
901
- async sendDice(chatId, params) {
902
- return await this.#dispatch("sendDice", chatId, params);
856
+ async editInlineMessageCaption(inlineMessageId, params) {
857
+ return await this.#dispatch("editInlineMessageCaption", inlineMessageId, params);
903
858
  }
904
859
  /**
905
- * Send a venue.
860
+ * Edit an inline message's live location. Bot-only.
906
861
  *
907
862
  * @method ms
908
- * @param chatId The identifier of a chat to send the venue to.
909
- * @param latitude The latitude of the venue.
910
- * @param longitude The longitude of the venue.
911
- * @param title The title of the venue.
912
- * @param address The written address of the venue.
913
- * @returns The sent venue.
863
+ * @param inlineMessageId The identifier of the inline message.
864
+ * @param latitude The new latitude.
865
+ * @param longitude The new longitude.
866
+ * @returns The edited location message.
914
867
  */
915
- async sendVenue(chatId, latitude, longitude, title, address, params) {
916
- return await this.#dispatch("sendVenue", chatId, latitude, longitude, title, address, params);
868
+ async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
869
+ return await this.#dispatch("editInlineMessageLiveLocation", inlineMessageId, latitude, longitude, params);
917
870
  }
918
871
  /**
919
- * Send a poll.
872
+ * Edit an inline message's media.
920
873
  *
921
874
  * @method ms
922
- * @param chatId The identifier of a chat to send the poll to.
923
- * @param question The poll's question.
924
- * @param options The poll's options.
925
- * @returns The sent poll.
875
+ * @param inlineMessageId The identifier of the inline message.
876
+ * @param media The new media of the message.
926
877
  */
927
- async sendPoll(chatId, question, options, params) {
928
- return await this.#dispatch("sendPoll", chatId, question, options, params);
878
+ async editInlineMessageMedia(inlineMessageId, media, params) {
879
+ return await this.#dispatch("editInlineMessageMedia", inlineMessageId, media, params);
929
880
  }
930
881
  /**
931
- * Send a checklist.
882
+ * Edit an inline message's reply markup. Bot-only.
932
883
  *
933
884
  * @method ms
934
- * @param chatId The identifier of a chat to send the checklist to.
935
- * @param title The checklist's title.
936
- * @param items The checklist's items.
937
- * @returns The sent checklist.
885
+ * @param inlineMessageId The identifier of the inline message.
938
886
  */
939
- async sendChecklist(chatId, title, items, params) {
940
- return await this.#dispatch("sendChecklist", chatId, title, items, params);
887
+ async editInlineMessageReplyMarkup(inlineMessageId, params) {
888
+ return await this.#dispatch("editInlineMessageReplyMarkup", inlineMessageId, params);
941
889
  }
942
890
  /**
943
- * Send an invoice. Bot-only.
891
+ * Edit an inline message's rich text. Bot-only.
944
892
  *
945
893
  * @method ms
946
- * @param chatId The identifier of a chat to send the invoice to.
947
- * @param title The invoice's title.
948
- * @param description The invoice's description.
949
- * @param payload The invoice's payload.
950
- * @param currency The invoice's currency.
951
- * @param prices The invoice's price tags.
952
- * @returns The sent invoice.
894
+ * @param inlineMessageId The identifier of the inline message.
895
+ * @param richText The new rich text of the message.
953
896
  */
954
- async sendInvoice(chatId, title, description, payload, currency, prices, params) {
955
- return await this.#dispatch("sendInvoice", chatId, title, description, payload, currency, prices, params);
897
+ async editInlineMessageRichText(inlineMessageId, richText, params) {
898
+ return await this.#dispatch("editInlineMessageRichText", inlineMessageId, richText, params);
956
899
  }
957
900
  /**
958
- * Edit a message's text.
901
+ * Edit an inline message's text. Bot-only.
959
902
  *
960
903
  * @method ms
961
- * @param chatId The identifier of the chat which the message belongs to.
962
- * @param messageId The identifier of the message.
904
+ * @param inlineMessageId The identifier of the inline message.
963
905
  * @param text The new text of the message.
964
- * @returns The edited text message.
965
906
  */
966
- async editMessageText(chatId, messageId, text, params) {
967
- return await this.#dispatch("editMessageText", chatId, messageId, text, params);
907
+ async editInlineMessageText(inlineMessageId, text, params) {
908
+ return await this.#dispatch("editInlineMessageText", inlineMessageId, text, params);
968
909
  }
969
910
  /**
970
- * Edit a message's rich text.
911
+ * Edit a message's caption.
971
912
  *
972
913
  * @method ms
973
914
  * @param chatId The identifier of the chat which the message belongs to.
974
915
  * @param messageId The identifier of the message.
975
- * @param richText The new rich text of the message.
976
- * @returns The edited rich text message.
916
+ * @returns The edited message.
977
917
  */
978
- async editMessageRichText(chatId, messageId, richText, params) {
979
- return await this.#dispatch("editMessageRichText", chatId, messageId, richText, params);
918
+ async editMessageCaption(chatId, messageId, params) {
919
+ return await this.#dispatch("editMessageCaption", chatId, messageId, params);
980
920
  }
981
921
  /**
982
- * Edit a message's caption.
922
+ * Edit a message's live location.
983
923
  *
984
924
  * @method ms
985
925
  * @param chatId The identifier of the chat which the message belongs to.
986
926
  * @param messageId The identifier of the message.
987
- * @returns The edited message.
927
+ * @param latitude The new latitude.
928
+ * @param longitude The new longitude.
929
+ * @returns The edited location message.
988
930
  */
989
- async editMessageCaption(chatId, messageId, params) {
990
- return await this.#dispatch("editMessageCaption", chatId, messageId, params);
931
+ async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
932
+ return await this.#dispatch("editMessageLiveLocation", chatId, messageId, latitude, longitude, params);
991
933
  }
992
934
  /**
993
935
  * Edit a message's media.
@@ -1002,88 +944,125 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1002
944
  return await this.#dispatch("editMessageMedia", chatId, messageId, media, params);
1003
945
  }
1004
946
  /**
1005
- * Edit an inline message's media.
947
+ * Edit a message's reply markup.
1006
948
  *
1007
949
  * @method ms
1008
- * @param inlineMessageId The identifier of the inline message.
1009
- * @param media The new media of the message.
950
+ * @param chatId The identifier of the chat which the message belongs to.
951
+ * @param messageId The identifier of the message.
952
+ * @returns The edited message.
1010
953
  */
1011
- async editInlineMessageMedia(inlineMessageId, media, params) {
1012
- return await this.#dispatch("editInlineMessageMedia", inlineMessageId, media, params);
954
+ async editMessageReplyMarkup(chatId, messageId, params) {
955
+ return await this.#dispatch("editMessageReplyMarkup", chatId, messageId, params);
1013
956
  }
1014
957
  /**
1015
- * Edit an inline message's rich text. Bot-only.
958
+ * Edit a message's rich text.
1016
959
  *
1017
960
  * @method ms
1018
- * @param inlineMessageId The identifier of the inline message.
961
+ * @param chatId The identifier of the chat which the message belongs to.
962
+ * @param messageId The identifier of the message.
1019
963
  * @param richText The new rich text of the message.
964
+ * @returns The edited rich text message.
1020
965
  */
1021
- async editInlineMessageRichText(inlineMessageId, richText, params) {
1022
- return await this.#dispatch("editInlineMessageRichText", inlineMessageId, richText, params);
966
+ async editMessageRichText(chatId, messageId, richText, params) {
967
+ return await this.#dispatch("editMessageRichText", chatId, messageId, richText, params);
1023
968
  }
1024
969
  /**
1025
- * Edit an inline message's text. Bot-only.
970
+ * Edit a message's text.
1026
971
  *
1027
972
  * @method ms
1028
- * @param inlineMessageId The identifier of the inline message.
973
+ * @param chatId The identifier of the chat which the message belongs to.
974
+ * @param messageId The identifier of the message.
1029
975
  * @param text The new text of the message.
976
+ * @returns The edited text message.
1030
977
  */
1031
- async editInlineMessageText(inlineMessageId, text, params) {
1032
- return await this.#dispatch("editInlineMessageText", inlineMessageId, text, params);
978
+ async editMessageText(chatId, messageId, text, params) {
979
+ return await this.#dispatch("editMessageText", chatId, messageId, text, params);
1033
980
  }
1034
981
  /**
1035
- * Edit an inline message's caption. Bot-only.
982
+ * Forward a single message.
1036
983
  *
1037
984
  * @method ms
1038
- * @param inlineMessageId The identifier of the inline message.
985
+ * @param from The identifier of a chat to forward the message from.
986
+ * @param to The identifier of a chat to forward the message to.
987
+ * @param messageId The identifier of the message to forward.
988
+ * @returns The forwarded message.
1039
989
  */
1040
- async editInlineMessageCaption(inlineMessageId, params) {
1041
- return await this.#dispatch("editInlineMessageCaption", inlineMessageId, params);
990
+ async forwardMessage(from, to, messageId, params) {
991
+ return await this.#dispatch("forwardMessage", from, to, messageId, params);
1042
992
  }
1043
993
  /**
1044
- * Edit a message's reply markup.
994
+ * Forward multiple messages.
1045
995
  *
1046
996
  * @method ms
1047
- * @param chatId The identifier of the chat which the message belongs to.
1048
- * @param messageId The identifier of the message.
1049
- * @returns The edited message.
997
+ * @param from The identifier of a chat to forward the messages from.
998
+ * @param to The identifier of a chat to forward the messages to.
999
+ * @param messageIds The identifiers of the messages to forward.
1000
+ * @returns The forwarded messages.
1050
1001
  */
1051
- async editMessageReplyMarkup(chatId, messageId, params) {
1052
- return await this.#dispatch("editMessageReplyMarkup", chatId, messageId, params);
1002
+ async forwardMessages(from, to, messageIds, params) {
1003
+ return await this.#dispatch("forwardMessages", from, to, messageIds, params);
1053
1004
  }
1054
1005
  /**
1055
- * Edit an inline message's reply markup. Bot-only.
1006
+ * Get favorite stickers. User-only.
1056
1007
  *
1057
1008
  * @method ms
1058
- * @param inlineMessageId The identifier of the inline message.
1059
1009
  */
1060
- async editInlineMessageReplyMarkup(inlineMessageId, params) {
1061
- return await this.#dispatch("editInlineMessageReplyMarkup", inlineMessageId, params);
1010
+ async getFavoriteStickers() {
1011
+ return await this.#dispatch("getFavoriteStickers");
1062
1012
  }
1063
1013
  /**
1064
- * Edit a message's live location.
1014
+ * Get the link preview for a message that is about to be sent. User-only.
1065
1015
  *
1066
1016
  * @method ms
1067
- * @param chatId The identifier of the chat which the message belongs to.
1017
+ * @param text The message's text.
1018
+ */
1019
+ async getLinkPreview(text, params) {
1020
+ return await this.#dispatch("getLinkPreview", text, params);
1021
+ }
1022
+ /**
1023
+ * Retrieve a single message.
1024
+ *
1025
+ * @method ms
1026
+ * @param chatId The identifier of a chat.
1027
+ * @param messageId The identifier of the message to retrieve.
1028
+ * @example ```ts
1029
+ * const message = await client.getMessage("@MTKruto", 212);
1030
+ * ```
1031
+ * @returns The retrieved message.
1032
+ * @cache
1033
+ */
1034
+ async getMessage(chatId, messageId) {
1035
+ return await this.#dispatch("getMessage", chatId, messageId);
1036
+ }
1037
+ /**
1038
+ * Get the counters of a single message. User-only.
1039
+ *
1040
+ * @method ms
1041
+ * @param chatId The identifier of the chat including the message.
1068
1042
  * @param messageId The identifier of the message.
1069
- * @param latitude The new latitude.
1070
- * @param longitude The new longitude.
1071
- * @returns The edited location message.
1072
1043
  */
1073
- async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
1074
- return await this.#dispatch("editMessageLiveLocation", chatId, messageId, latitude, longitude, params);
1044
+ async getMessageCounters(chatId, messageId) {
1045
+ return await this.#dispatch("getMessageCounters", chatId, messageId);
1075
1046
  }
1076
1047
  /**
1077
- * Edit an inline message's live location. Bot-only.
1048
+ * Get a list of reactions made to a message. User-only.
1078
1049
  *
1079
1050
  * @method ms
1080
- * @param inlineMessageId The identifier of the inline message.
1081
- * @param latitude The new latitude.
1082
- * @param longitude The new longitude.
1083
- * @returns The edited location message.
1051
+ * @param chatId The identifier of a chat.
1052
+ * @param messageId The identifier of the message.
1053
+ */
1054
+ async getMessageReactions(chatId, messageId, params) {
1055
+ return await this.#dispatch("getMessageReactions", chatId, messageId, params);
1056
+ }
1057
+ /**
1058
+ * Get a message's read date. User-only.
1059
+ *
1060
+ * @method ms
1061
+ * @param chatId The identifier of a chat.
1062
+ * @param messageId The identifier of the message.
1084
1063
  */
1085
- async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
1086
- return await this.#dispatch("editInlineMessageLiveLocation", inlineMessageId, latitude, longitude, params);
1064
+ async getMessageReadDate(chatId, messageId) {
1065
+ return await this.#dispatch("getMessageReadDate", chatId, messageId);
1087
1066
  }
1088
1067
  /**
1089
1068
  * Retrieve multiple messages.
@@ -1101,102 +1080,97 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1101
1080
  return await this.#dispatch("getMessages", chatId, messageIds);
1102
1081
  }
1103
1082
  /**
1104
- * Retrieve a single message.
1083
+ * Get the counters of multiple messages. User-only.
1084
+ *
1085
+ * @method ms
1086
+ * @param chatId The identifier of the chat including the messages.
1087
+ * @param messageIds The identifiers of the messages.
1088
+ */
1089
+ async getMessagesCounters(chatId, messageIds) {
1090
+ return await this.#dispatch("getMessagesCounters", chatId, messageIds);
1091
+ }
1092
+ /**
1093
+ * Get a message's viewers. User-only.
1105
1094
  *
1106
1095
  * @method ms
1107
1096
  * @param chatId The identifier of a chat.
1108
- * @param messageId The identifier of the message to retrieve.
1109
- * @example ```ts
1110
- * const message = await client.getMessage("@MTKruto", 212);
1111
- * ```
1112
- * @returns The retrieved message.
1113
- * @cache
1097
+ * @param messageId The identifier of the message.
1098
+ * @returns The message's viewers.
1114
1099
  */
1115
- async getMessage(chatId, messageId) {
1116
- return await this.#dispatch("getMessage", chatId, messageId);
1100
+ async getMessageViewers(chatId, messageId) {
1101
+ return await this.#dispatch("getMessageViewers", chatId, messageId);
1117
1102
  }
1118
1103
  /**
1119
- * Retrieve a message using its link.
1104
+ * Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
1120
1105
  *
1121
1106
  * @method ms
1122
- * @param link A message link.
1123
- * @example ```ts
1124
- * const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
1125
- * ```
1126
- * @returns The message that was linked to.
1107
+ * @cache
1127
1108
  */
1128
- async resolveMessageLink(link) {
1129
- return await this.#dispatch("resolveMessageLink", link);
1109
+ async getProgressId() {
1110
+ return await this.#dispatch("getProgressId");
1130
1111
  }
1131
1112
  /**
1132
- * Delete multiple messages.
1113
+ * Get recent stickers. User-only.
1133
1114
  *
1134
1115
  * @method ms
1135
- * @param chatId The identifier of the chat which the message belongs to.
1136
- * @param messageIds The identifiers of the messages to delete.
1137
1116
  */
1138
- async deleteMessages(chatId, messageIds, params) {
1139
- return await this.#dispatch("deleteMessages", chatId, messageIds, params);
1117
+ async getRecentStickers() {
1118
+ return await this.#dispatch("getRecentStickers");
1140
1119
  }
1141
1120
  /**
1142
- * Delete a single message.
1121
+ * Get a message's full rich text. User-only.
1143
1122
  *
1144
1123
  * @method ms
1145
- * @param chatId The identifier of the chat which the message belongs to.
1146
- * @param messageId The identifier of the message to delete.
1124
+ * @param chatId The identifier of the chat including the message.
1125
+ * @param messageId The identifier of the message.
1147
1126
  */
1148
- async deleteMessage(chatId, messageId, params) {
1149
- return await this.#dispatch("deleteMessage", chatId, messageId, params);
1127
+ async getRichText(chatId, messageId) {
1128
+ return await this.#dispatch("getRichText", chatId, messageId);
1150
1129
  }
1151
1130
  /**
1152
- * Delete all messages sent by a specific member of a chat. User-only.
1131
+ * Get saved animations. User-only.
1153
1132
  *
1154
1133
  * @method ms
1155
- * @param chatId The identifier of a chat. Must be a supergroup.
1156
- * @param memberId The identifier of the member.
1157
1134
  */
1158
- async deleteChatMemberMessages(chatId, memberId) {
1159
- return await this.#dispatch("deleteChatMemberMessages", chatId, memberId);
1135
+ async getSavedAnimations() {
1136
+ return await this.#dispatch("getSavedAnimations");
1160
1137
  }
1161
1138
  /**
1162
- * Delete multiple scheduled messages.
1139
+ * Get a list of saved chats.
1163
1140
  *
1164
1141
  * @method ms
1165
- * @param chatId The identifier of a chat.
1166
- * @param messageIds The identifiers of the scheduled messages to delete.
1167
1142
  */
1168
- async deleteScheduledMessages(chatId, messageIds) {
1169
- return await this.#dispatch("deleteScheduledMessages", chatId, messageIds);
1143
+ async getSavedChats(params) {
1144
+ return await this.#dispatch("getSavedChats", params);
1170
1145
  }
1171
1146
  /**
1172
- * Delete a scheduled message.
1147
+ * Get messages saved from a specific chat.
1173
1148
  *
1174
1149
  * @method ms
1175
1150
  * @param chatId The identifier of a chat.
1176
- * @param messageId The identifier of the scheduled message to delete.
1177
1151
  */
1178
- async deleteScheduledMessage(chatId, messageId) {
1179
- return await this.#dispatch("deleteScheduledMessage", chatId, messageId);
1152
+ async getSavedMessages(chatId, params) {
1153
+ return await this.#dispatch("getSavedMessages", chatId, params);
1180
1154
  }
1181
1155
  /**
1182
- * Send multiple scheduled messages before their schedule.
1156
+ * Get the scheduled messages of a chat. User-only.
1183
1157
  *
1184
1158
  * @method ms
1185
- * @param chatId The identifier of a chat.
1186
- * @param messageIds The identifiers of the scheduled messages to send.
1159
+ * @param chatId The identifier of the chat including the scheduled messages.
1187
1160
  */
1188
- async sendScheduledMessages(chatId, messageIds) {
1189
- return await this.#dispatch("sendScheduledMessages", chatId, messageIds);
1161
+ async getScheduledMessages(chatId) {
1162
+ return await this.#dispatch("getScheduledMessages", chatId);
1190
1163
  }
1191
1164
  /**
1192
- * Send a scheduled message before its schedule.
1165
+ * Open a mini app. User-only.
1193
1166
  *
1194
1167
  * @method ms
1195
- * @param chatId The identifier of a chat.
1196
- * @param messageId The identifier of the scheduled message to send.
1168
+ * @param botId The identifier of a bot with the mini app.
1169
+ * @param chatId The identifier of the chat from which the mini app is opened.
1170
+ * @cache
1197
1171
  */
1198
- async sendScheduledMessage(chatId, messageId) {
1199
- return await this.#dispatch("sendScheduledMessage", chatId, messageId);
1172
+ async openMiniApp(botId, chatId, params) {
1173
+ return await this.#dispatch("openMiniApp", botId, chatId, params);
1200
1174
  }
1201
1175
  /**
1202
1176
  * Pin a message in a chat.
@@ -1209,58 +1183,84 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1209
1183
  return await this.#dispatch("pinMessage", chatId, messageId, params);
1210
1184
  }
1211
1185
  /**
1212
- * Unpin a pinned message.
1186
+ * Mark messages as read. User-only.
1213
1187
  *
1214
1188
  * @method ms
1215
- * @param chatId The identifier of a chat.
1216
- * @param messageId The identifier of the message.
1189
+ * @param chatId The identifier of the chat which the messages belong to.
1190
+ * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
1217
1191
  */
1218
- async unpinMessage(chatId, messageId, params) {
1219
- return await this.#dispatch("unpinMessage", chatId, messageId, params);
1192
+ async readMessages(chatId, untilMessageId) {
1193
+ return await this.#dispatch("readMessages", chatId, untilMessageId);
1220
1194
  }
1221
1195
  /**
1222
- * Unpin all pinned messages.
1196
+ * Remove a sticker from favorites. User-only.
1223
1197
  *
1224
1198
  * @method ms
1225
- * @param chatId The identifier of a chat.
1199
+ * @param fileId The file identifier of the sticker.
1226
1200
  */
1227
- async unpinMessages(chatId, params) {
1228
- return await this.#dispatch("unpinMessages", chatId, params);
1201
+ async removeStickerFromFavorites(fileId) {
1202
+ return await this.#dispatch("removeStickerFromFavorites", fileId);
1229
1203
  }
1230
1204
  /**
1231
- * Forward multiple messages.
1205
+ * Remove a sticker from recents. User-only.
1232
1206
  *
1233
1207
  * @method ms
1234
- * @param from The identifier of a chat to forward the messages from.
1235
- * @param to The identifier of a chat to forward the messages to.
1236
- * @param messageIds The identifiers of the messages to forward.
1237
- * @returns The forwarded messages.
1208
+ * @param fileId The file identifier of the sticker.
1238
1209
  */
1239
- async forwardMessages(from, to, messageIds, params) {
1240
- return await this.#dispatch("forwardMessages", from, to, messageIds, params);
1210
+ async removeStickerFromRecents(fileId) {
1211
+ return await this.#dispatch("removeStickerFromRecents", fileId);
1241
1212
  }
1242
1213
  /**
1243
- * Forward a single message.
1214
+ * Retrieve a message using its link.
1244
1215
  *
1245
1216
  * @method ms
1246
- * @param from The identifier of a chat to forward the message from.
1247
- * @param to The identifier of a chat to forward the message to.
1248
- * @param messageId The identifier of the message to forward.
1249
- * @returns The forwarded message.
1217
+ * @param link A message link.
1218
+ * @example ```ts
1219
+ * const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
1220
+ * ```
1221
+ * @returns The message that was linked to.
1250
1222
  */
1251
- async forwardMessage(from, to, messageId, params) {
1252
- return await this.#dispatch("forwardMessage", from, to, messageId, params);
1223
+ async resolveMessageLink(link) {
1224
+ return await this.#dispatch("resolveMessageLink", link);
1253
1225
  }
1254
1226
  /**
1255
- * Stop a poll.
1227
+ * Save an animation. User-only.
1256
1228
  *
1257
1229
  * @method ms
1258
- * @param chatId The chat that includes the poll.
1259
- * @param messageId The identifier of the poll's message.
1260
- * @returns The new state of the poll.
1230
+ * @param fileId The file identifier of the animation.
1261
1231
  */
1262
- async stopPoll(chatId, messageId, params) {
1263
- return await this.#dispatch("stopPoll", chatId, messageId, params);
1232
+ async saveAnimation(fileId) {
1233
+ return await this.#dispatch("saveAnimation", fileId);
1234
+ }
1235
+ /**
1236
+ * Search for messages. User-only.
1237
+ *
1238
+ * @method ms
1239
+ */
1240
+ async searchMessages(params) {
1241
+ return await this.#dispatch("searchMessages", params);
1242
+ }
1243
+ /**
1244
+ * Send an animation.
1245
+ *
1246
+ * @method ms
1247
+ * @param chatId The identifier of a chat to send the animation to.
1248
+ * @param animation The animation to send.
1249
+ * @returns The sent animation.
1250
+ */
1251
+ async sendAnimation(chatId, animation, params) {
1252
+ return await this.#dispatch("sendAnimation", chatId, animation, params);
1253
+ }
1254
+ /**
1255
+ * Send an audio file.
1256
+ *
1257
+ * @method ms
1258
+ * @param chatId The identifier of a chat to send the audio file to.
1259
+ * @param audio The audio to send.
1260
+ * @returns The sent audio file.
1261
+ */
1262
+ async sendAudio(chatId, audio, params) {
1263
+ return await this.#dispatch("sendAudio", chatId, audio, params);
1264
1264
  }
1265
1265
  /**
1266
1266
  * Send a chat action.
@@ -1273,304 +1273,366 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1273
1273
  return await this.#dispatch("sendChatAction", chatId, action, params);
1274
1274
  }
1275
1275
  /**
1276
- * Search for messages. User-only.
1276
+ * Send a checklist.
1277
1277
  *
1278
1278
  * @method ms
1279
+ * @param chatId The identifier of a chat to send the checklist to.
1280
+ * @param title The checklist's title.
1281
+ * @param items The checklist's items.
1282
+ * @returns The sent checklist.
1279
1283
  */
1280
- async searchMessages(params) {
1281
- return await this.#dispatch("searchMessages", params);
1284
+ async sendChecklist(chatId, title, items, params) {
1285
+ return await this.#dispatch("sendChecklist", chatId, title, items, params);
1282
1286
  }
1283
1287
  /**
1284
- * Mark messages as read. User-only.
1288
+ * Send a contact.
1285
1289
  *
1286
1290
  * @method ms
1287
- * @param chatId The identifier of the chat which the messages belong to.
1288
- * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
1291
+ * @param chatId The identifier of a chat to send the contact to.
1292
+ * @param firstName The contact's first name.
1293
+ * @param phoneNumber The contact's phone number.
1294
+ * @returns The sent contact.
1289
1295
  */
1290
- async readMessages(chatId, untilMessageId) {
1291
- return await this.#dispatch("readMessages", chatId, untilMessageId);
1296
+ async sendContact(chatId, firstName, phoneNumber, params) {
1297
+ return await this.#dispatch("sendContact", chatId, firstName, phoneNumber, params);
1292
1298
  }
1293
1299
  /**
1294
- * Start a bot. User-only.
1300
+ * Send a dice.
1295
1301
  *
1296
1302
  * @method ms
1297
- * @param botId The identifier of the bot to start.
1298
- * @returns The start message.
1303
+ * @param chatId The identifier of a chat to send the dice to.
1304
+ * @returns The sent dice.
1299
1305
  */
1300
- async startBot(botId, params) {
1301
- return await this.#dispatch("startBot", botId, params);
1306
+ async sendDice(chatId, params) {
1307
+ return await this.#dispatch("sendDice", chatId, params);
1302
1308
  }
1303
1309
  /**
1304
- * Transcribe a voice message. User-only.
1310
+ * Send a document.
1305
1311
  *
1306
1312
  * @method ms
1307
- * @param chatId The identifier of the chat which the message belongs to.
1308
- * @param messageId The identifier of the message.
1309
- * @cache
1313
+ * @param chatId The identifier of a chat to send the document to.
1314
+ * @param document The document to send.
1315
+ * @returns The sent document.
1310
1316
  */
1311
- async transcribeVoice(chatId, messageId) {
1312
- return await this.#dispatch("transcribeVoice", chatId, messageId);
1317
+ async sendDocument(chatId, document, params) {
1318
+ return await this.#dispatch("sendDocument", chatId, document, params);
1313
1319
  }
1314
- /*
1315
- * Get the link preview for a message that is about to be sent. User-only.
1320
+ /**
1321
+ * Send an invoice. Bot-only.
1316
1322
  *
1317
1323
  * @method ms
1318
- * @param text The message's text.
1324
+ * @param chatId The identifier of a chat to send the invoice to.
1325
+ * @param title The invoice's title.
1326
+ * @param description The invoice's description.
1327
+ * @param payload The invoice's payload.
1328
+ * @param currency The invoice's currency.
1329
+ * @param prices The invoice's price tags.
1330
+ * @returns The sent invoice.
1319
1331
  */
1320
- async getLinkPreview(text, params) {
1321
- return await this.#dispatch("getLinkPreview", text, params);
1332
+ async sendInvoice(chatId, title, description, payload, currency, prices, params) {
1333
+ return await this.#dispatch("sendInvoice", chatId, title, description, payload, currency, prices, params);
1334
+ }
1335
+ /**
1336
+ * Send a live photo.
1337
+ *
1338
+ * @method ms
1339
+ * @param chatId The identifier of a chat to send the photo to.
1340
+ * @param photo The photo to send.
1341
+ * @param video The video version of the photo.
1342
+ * @returns The sent live photo.
1343
+ */
1344
+ async sendLivePhoto(chatId, photo, video, params) {
1345
+ return await this.#dispatch("sendLivePhoto", chatId, photo, video, params);
1322
1346
  }
1323
1347
  /**
1324
- * Open a mini app. User-only.
1348
+ * Send a location.
1325
1349
  *
1326
1350
  * @method ms
1327
- * @param botId The identifier of a bot with the mini app.
1328
- * @param chatId The identifier of the chat from which the mini app is opened.
1329
- * @cache
1351
+ * @param chatId The identifier of a chat to send the location to.
1352
+ * @param latitude The location's latitude.
1353
+ * @param longitude The location's longitude.
1354
+ * @returns The sent location.
1330
1355
  */
1331
- async openMiniApp(botId, chatId, params) {
1332
- return await this.#dispatch("openMiniApp", botId, chatId, params);
1356
+ async sendLocation(chatId, latitude, longitude, params) {
1357
+ return await this.#dispatch("sendLocation", chatId, latitude, longitude, params);
1333
1358
  }
1334
1359
  /**
1335
- * Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
1360
+ * Send a media group.
1336
1361
  *
1337
1362
  * @method ms
1338
- * @cache
1363
+ * @param chatId The identifier of a chat to send the media group to.
1364
+ * @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
1365
+ * @returns The sent messages.
1339
1366
  */
1340
- async getProgressId() {
1341
- return await this.#dispatch("getProgressId");
1367
+ async sendMediaGroup(chatId, media, params) {
1368
+ return await this.#dispatch("sendMediaGroup", chatId, media, params);
1342
1369
  }
1343
1370
  /**
1344
- * Get messages saved from a specific chat.
1371
+ * Send a text message.
1345
1372
  *
1346
1373
  * @method ms
1347
- * @param chatId The identifier of a chat.
1374
+ * @param chatId The identifier of a chat to send the message to.
1375
+ * @param text The message's text.
1376
+ * @returns The sent text message.
1348
1377
  */
1349
- async getSavedMessages(chatId, params) {
1350
- return await this.#dispatch("getSavedMessages", chatId, params);
1378
+ async sendMessage(chatId, text, params) {
1379
+ return await this.#dispatch("sendMessage", chatId, text, params);
1351
1380
  }
1352
1381
  /**
1353
- * Get a list of saved chats.
1382
+ * Stream a drafted text message. Bot-only.
1354
1383
  *
1355
1384
  * @method ms
1385
+ * @param chatId The identifier of a chat to send the message to.
1386
+ * @param draftId The identifier of the draft.
1387
+ * @param text The message's text.
1356
1388
  */
1357
- async getSavedChats(params) {
1358
- return await this.#dispatch("getSavedChats", params);
1389
+ async sendMessageDraft(chatId, draftId, text, params) {
1390
+ return await this.#dispatch("sendMessageDraft", chatId, draftId, text, params);
1359
1391
  }
1360
1392
  /**
1361
- * Get a list of reactions made to a message. User-only.
1393
+ * Send a photo.
1362
1394
  *
1363
1395
  * @method ms
1364
- * @param chatId The identifier of a chat.
1365
- * @param messageId The identifier of the message.
1396
+ * @param chatId The identifier of a chat to send the photo to.
1397
+ * @param photo The photo to send.
1398
+ * @returns The sent photo.
1366
1399
  */
1367
- async getMessageReactions(chatId, messageId, params) {
1368
- return await this.#dispatch("getMessageReactions", chatId, messageId, params);
1400
+ async sendPhoto(chatId, photo, params) {
1401
+ return await this.#dispatch("sendPhoto", chatId, photo, params);
1369
1402
  }
1370
1403
  /**
1371
- * Set a reaction as default. User-only.
1404
+ * Send a poll.
1372
1405
  *
1373
1406
  * @method ms
1374
- * @param reaction The reaction to set as default.
1407
+ * @param chatId The identifier of a chat to send the poll to.
1408
+ * @param question The poll's question.
1409
+ * @param options The poll's options.
1410
+ * @returns The sent poll.
1375
1411
  */
1376
- async setDefaultReaction(reaction) {
1377
- return await this.#dispatch("setDefaultReaction", reaction);
1412
+ async sendPoll(chatId, question, options, params) {
1413
+ return await this.#dispatch("sendPoll", chatId, question, options, params);
1378
1414
  }
1379
1415
  /**
1380
- * Clear all message drafts. User-only.
1416
+ * Send a rich text message.
1381
1417
  *
1382
1418
  * @method ms
1419
+ * @param chatId The identifier of a chat to send the message to.
1420
+ * @param richText The message's rich text.
1421
+ * @returns The sent rich text message.
1383
1422
  */
1384
- async clearDrafts() {
1385
- return await this.#dispatch("clearDrafts");
1423
+ async sendRichText(chatId, richText, params) {
1424
+ return await this.#dispatch("sendRichText", chatId, richText, params);
1386
1425
  }
1387
1426
  /**
1388
- * Summarize a message's text. User-only.
1427
+ * Stream a drafted rich text message. Bot-only.
1389
1428
  *
1390
1429
  * @method ms
1391
- * @param chatId The identifier of a chat.
1392
- * @param messageId The identifier of a message.
1430
+ * @param chatId The identifier of a chat to send the message to.
1431
+ * @param draftId The identifier of the draft.
1432
+ * @param richText The message's rich text.
1393
1433
  */
1394
- async summarizeText(chatId, messageId, params) {
1395
- return await this.#dispatch("summarizeText", chatId, messageId, params);
1434
+ async sendRichTextDraft(chatId, draftId, richText, params) {
1435
+ return await this.#dispatch("sendRichTextDraft", chatId, draftId, richText, params);
1396
1436
  }
1397
1437
  /**
1398
- * View multiple messages. User-only.
1438
+ * Send a scheduled message before its schedule.
1399
1439
  *
1400
1440
  * @method ms
1401
- * @param chatId The identifier of the chat including the messages.
1402
- * @param messageIds The identifiers of the messages.
1441
+ * @param chatId The identifier of a chat.
1442
+ * @param messageId The identifier of the scheduled message to send.
1403
1443
  */
1404
- async viewMessages(chatId, messageIds) {
1405
- return await this.#dispatch("viewMessages", chatId, messageIds);
1444
+ async sendScheduledMessage(chatId, messageId) {
1445
+ return await this.#dispatch("sendScheduledMessage", chatId, messageId);
1406
1446
  }
1407
1447
  /**
1408
- * View a single message. User-only.
1448
+ * Send multiple scheduled messages before their schedule.
1409
1449
  *
1410
1450
  * @method ms
1411
- * @param chatId The identifier of the chat including the message.
1412
- * @param messageId The identifier of the message.
1451
+ * @param chatId The identifier of a chat.
1452
+ * @param messageIds The identifiers of the scheduled messages to send.
1413
1453
  */
1414
- async viewMessage(chatId, messageId) {
1415
- return await this.#dispatch("viewMessage", chatId, messageId);
1454
+ async sendScheduledMessages(chatId, messageIds) {
1455
+ return await this.#dispatch("sendScheduledMessages", chatId, messageIds);
1416
1456
  }
1417
1457
  /**
1418
- * Translate multiple texts. User-only.
1458
+ * Send a screenshot notification. User-only.
1419
1459
  *
1420
1460
  * @method ms
1421
- * @param toLanguage The code of the language to translate into.
1422
- * @param texts The texts to translate.
1461
+ * @param chatId The identifier of a chat.
1462
+ * @param replyToMessageId The identifier of the message.
1423
1463
  */
1424
- async translateTexts(toLanguage, texts, params) {
1425
- return await this.#dispatch("translateTexts", toLanguage, texts, params);
1464
+ async sendScreenshotNotification(chatId, replyToMessageId) {
1465
+ return await this.#dispatch("sendScreenshotNotification", chatId, replyToMessageId);
1426
1466
  }
1427
1467
  /**
1428
- * Translate a single text. User-only.
1468
+ * Send a sticker.
1429
1469
  *
1430
1470
  * @method ms
1431
- * @param toLanguage The code of the language to translate into.
1432
- * @param text The text to translate.
1471
+ * @param chatId The identifier of a chat to send the sticker to.
1472
+ * @param sticker The sticker to send.
1473
+ * @returns The sent sticker.
1433
1474
  */
1434
- async translateText(toLanguage, text, params) {
1435
- return await this.#dispatch("translateText", toLanguage, text, params);
1475
+ async sendSticker(chatId, sticker, params) {
1476
+ return await this.#dispatch("sendSticker", chatId, sticker, params);
1436
1477
  }
1437
1478
  /**
1438
- * Translate multiple texts. User-only.
1479
+ * Send a venue.
1439
1480
  *
1440
1481
  * @method ms
1441
- * @param toLanguage The code of the language to translate into.
1442
- * @param chatId The identifier of the chat including the messages.
1443
- * @param messageIds The identifiers of the messages to translate.
1482
+ * @param chatId The identifier of a chat to send the venue to.
1483
+ * @param latitude The latitude of the venue.
1484
+ * @param longitude The longitude of the venue.
1485
+ * @param title The title of the venue.
1486
+ * @param address The written address of the venue.
1487
+ * @returns The sent venue.
1444
1488
  */
1445
- async translateMessages(toLanguage, chatId, messageIds, params) {
1446
- return await this.#dispatch("translateMessages", toLanguage, chatId, messageIds, params);
1489
+ async sendVenue(chatId, latitude, longitude, title, address, params) {
1490
+ return await this.#dispatch("sendVenue", chatId, latitude, longitude, title, address, params);
1447
1491
  }
1448
1492
  /**
1449
- * Translate a single text. User-only.
1493
+ * Send a video.
1450
1494
  *
1451
1495
  * @method ms
1452
- * @param toLanguage The code of the language to translate into.
1453
- * @param chatId The identifier of the chat including the message.
1454
- * @param messageId The identifier of the message to translate.
1496
+ * @param chatId The identifier of a chat to send the video to.
1497
+ * @param video The video to send.
1498
+ * @returns The sent video.
1455
1499
  */
1456
- async translateMessage(toLanguage, chatId, messageId, params) {
1457
- return await this.#dispatch("translateMessage", toLanguage, chatId, messageId, params);
1500
+ async sendVideo(chatId, video, params) {
1501
+ return await this.#dispatch("sendVideo", chatId, video, params);
1458
1502
  }
1459
1503
  /**
1460
- * Get the counters of multiple messages. User-only.
1504
+ * Send a video note.
1461
1505
  *
1462
1506
  * @method ms
1463
- * @param chatId The identifier of the chat including the messages.
1464
- * @param messageIds The identifiers of the messages.
1507
+ * @param chatId The identifier of a chat to send the video note to.
1508
+ * @param videoNote The video note to send.
1509
+ * @returns The sent video note.
1465
1510
  */
1466
- async getMessagesCounters(chatId, messageIds) {
1467
- return await this.#dispatch("getMessagesCounters", chatId, messageIds);
1511
+ async sendVideoNote(chatId, videoNote, params) {
1512
+ return await this.#dispatch("sendVideoNote", chatId, videoNote, params);
1468
1513
  }
1469
1514
  /**
1470
- * Get the counters of a single message. User-only.
1515
+ * Send a voice message.
1471
1516
  *
1472
1517
  * @method ms
1473
- * @param chatId The identifier of the chat including the message.
1474
- * @param messageId The identifier of the message.
1518
+ * @param chatId The identifier of a chat to send the voice message to.
1519
+ * @param voice The voice to send.
1520
+ * @returns The sent voice message.
1475
1521
  */
1476
- async getMessageCounters(chatId, messageId) {
1477
- return await this.#dispatch("getMessageCounters", chatId, messageId);
1522
+ async sendVoice(chatId, voice, params) {
1523
+ return await this.#dispatch("sendVoice", chatId, voice, params);
1478
1524
  }
1479
1525
  /**
1480
- * Get a message's full rich text. User-only.
1526
+ * Set a reaction as default. User-only.
1481
1527
  *
1482
1528
  * @method ms
1483
- * @param chatId The identifier of the chat including the message.
1484
- * @param messageId The identifier of the message.
1529
+ * @param reaction The reaction to set as default.
1485
1530
  */
1486
- async getRichText(chatId, messageId) {
1487
- return await this.#dispatch("getRichText", chatId, messageId);
1531
+ async setDefaultReaction(reaction) {
1532
+ return await this.#dispatch("setDefaultReaction", reaction);
1488
1533
  }
1489
1534
  /**
1490
- * Get the scheduled messages of a chat. User-only.
1535
+ * Start a bot. User-only.
1491
1536
  *
1492
1537
  * @method ms
1493
- * @param chatId The identifier of the chat including the scheduled messages.
1538
+ * @param botId The identifier of the bot to start.
1539
+ * @returns The start message.
1494
1540
  */
1495
- async getScheduledMessages(chatId) {
1496
- return await this.#dispatch("getScheduledMessages", chatId);
1541
+ async startBot(botId, params) {
1542
+ return await this.#dispatch("startBot", botId, params);
1497
1543
  }
1498
1544
  /**
1499
- * Get favorite stickers. User-only.
1545
+ * Stop a poll.
1500
1546
  *
1501
1547
  * @method ms
1548
+ * @param chatId The chat that includes the poll.
1549
+ * @param messageId The identifier of the poll's message.
1550
+ * @returns The new state of the poll.
1502
1551
  */
1503
- async getFavoriteStickers() {
1504
- return await this.#dispatch("getFavoriteStickers");
1552
+ async stopPoll(chatId, messageId, params) {
1553
+ return await this.#dispatch("stopPoll", chatId, messageId, params);
1505
1554
  }
1506
1555
  /**
1507
- * Add a sticker to favorites. User-only.
1556
+ * Summarize a message's text. User-only.
1508
1557
  *
1509
1558
  * @method ms
1510
- * @param fileId The file identifier of the sticker.
1559
+ * @param chatId The identifier of a chat.
1560
+ * @param messageId The identifier of a message.
1511
1561
  */
1512
- async addStickerToFavorites(fileId) {
1513
- return await this.#dispatch("addStickerToFavorites", fileId);
1562
+ async summarizeText(chatId, messageId, params) {
1563
+ return await this.#dispatch("summarizeText", chatId, messageId, params);
1514
1564
  }
1515
1565
  /**
1516
- * Remove a sticker from favorites. User-only.
1566
+ * Transcribe a voice message. User-only.
1517
1567
  *
1518
1568
  * @method ms
1519
- * @param fileId The file identifier of the sticker.
1569
+ * @param chatId The identifier of the chat which the message belongs to.
1570
+ * @param messageId The identifier of the message.
1571
+ * @cache
1520
1572
  */
1521
- async removeStickerFromFavorites(fileId) {
1522
- return await this.#dispatch("removeStickerFromFavorites", fileId);
1573
+ async transcribeVoice(chatId, messageId) {
1574
+ return await this.#dispatch("transcribeVoice", chatId, messageId);
1523
1575
  }
1524
1576
  /**
1525
- * Add a sticker to recents. User-only.
1577
+ * Translate a single text. User-only.
1526
1578
  *
1527
1579
  * @method ms
1528
- * @param fileId The file identifier of the sticker.
1580
+ * @param toLanguage The code of the language to translate into.
1581
+ * @param chatId The identifier of the chat including the message.
1582
+ * @param messageId The identifier of the message to translate.
1529
1583
  */
1530
- async addStickerToRecents(fileId) {
1531
- return await this.#dispatch("addStickerToRecents", fileId);
1584
+ async translateMessage(toLanguage, chatId, messageId, params) {
1585
+ return await this.#dispatch("translateMessage", toLanguage, chatId, messageId, params);
1532
1586
  }
1533
1587
  /**
1534
- * Remove a sticker from recents. User-only.
1588
+ * Translate multiple texts. User-only.
1535
1589
  *
1536
1590
  * @method ms
1537
- * @param fileId The file identifier of the sticker.
1591
+ * @param toLanguage The code of the language to translate into.
1592
+ * @param chatId The identifier of the chat including the messages.
1593
+ * @param messageIds The identifiers of the messages to translate.
1538
1594
  */
1539
- async removeStickerFromRecents(fileId) {
1540
- return await this.#dispatch("removeStickerFromRecents", fileId);
1595
+ async translateMessages(toLanguage, chatId, messageIds, params) {
1596
+ return await this.#dispatch("translateMessages", toLanguage, chatId, messageIds, params);
1541
1597
  }
1542
1598
  /**
1543
- * Get recent stickers. User-only.
1599
+ * Translate a single text. User-only.
1544
1600
  *
1545
1601
  * @method ms
1602
+ * @param toLanguage The code of the language to translate into.
1603
+ * @param text The text to translate.
1546
1604
  */
1547
- async getRecentStickers() {
1548
- return await this.#dispatch("getRecentStickers");
1605
+ async translateText(toLanguage, text, params) {
1606
+ return await this.#dispatch("translateText", toLanguage, text, params);
1549
1607
  }
1550
1608
  /**
1551
- * Clear recent stickers. User-only.
1609
+ * Translate multiple texts. User-only.
1552
1610
  *
1553
1611
  * @method ms
1612
+ * @param toLanguage The code of the language to translate into.
1613
+ * @param texts The texts to translate.
1554
1614
  */
1555
- async clearRecentStickers() {
1556
- return await this.#dispatch("clearRecentStickers");
1615
+ async translateTexts(toLanguage, texts, params) {
1616
+ return await this.#dispatch("translateTexts", toLanguage, texts, params);
1557
1617
  }
1558
1618
  /**
1559
- * Get saved animations. User-only.
1619
+ * Unpin a pinned message.
1560
1620
  *
1561
1621
  * @method ms
1622
+ * @param chatId The identifier of a chat.
1623
+ * @param messageId The identifier of the message.
1562
1624
  */
1563
- async getSavedAnimations() {
1564
- return await this.#dispatch("getSavedAnimations");
1625
+ async unpinMessage(chatId, messageId, params) {
1626
+ return await this.#dispatch("unpinMessage", chatId, messageId, params);
1565
1627
  }
1566
1628
  /**
1567
- * Save an animation. User-only.
1629
+ * Unpin all pinned messages.
1568
1630
  *
1569
1631
  * @method ms
1570
- * @param fileId The file identifier of the animation.
1632
+ * @param chatId The identifier of a chat.
1571
1633
  */
1572
- async saveAnimation(fileId) {
1573
- return await this.#dispatch("saveAnimation", fileId);
1634
+ async unpinMessages(chatId, params) {
1635
+ return await this.#dispatch("unpinMessages", chatId, params);
1574
1636
  }
1575
1637
  /**
1576
1638
  * Unsave an animation. User-only.
@@ -1582,58 +1644,80 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1582
1644
  return await this.#dispatch("unsaveAnimation", fileId);
1583
1645
  }
1584
1646
  /**
1585
- * Get a message's read date. User-only.
1647
+ * View a single message. User-only.
1586
1648
  *
1587
1649
  * @method ms
1588
- * @param chatId The identifier of a chat.
1650
+ * @param chatId The identifier of the chat including the message.
1589
1651
  * @param messageId The identifier of the message.
1590
1652
  */
1591
- async getMessageReadDate(chatId, messageId) {
1592
- return await this.#dispatch("getMessageReadDate", chatId, messageId);
1653
+ async viewMessage(chatId, messageId) {
1654
+ return await this.#dispatch("viewMessage", chatId, messageId);
1655
+ }
1656
+ /**
1657
+ * View multiple messages. User-only.
1658
+ *
1659
+ * @method ms
1660
+ * @param chatId The identifier of the chat including the messages.
1661
+ * @param messageIds The identifiers of the messages.
1662
+ */
1663
+ async viewMessages(chatId, messageIds) {
1664
+ return await this.#dispatch("viewMessages", chatId, messageIds);
1593
1665
  }
1594
1666
  //
1595
1667
  // ========================= POLLS ========================= //
1596
1668
  //
1597
1669
  /**
1598
- * Cast a vote. User-only.
1670
+ * Add an option to a poll. User-only.
1599
1671
  *
1600
1672
  * @method pl
1601
1673
  * @param chatId The identifier of the chat that includes the poll.
1602
1674
  * @param messageId The identifier of the message that includes the poll.
1603
- * @param optionIndexes The indexes of the options to cast for.
1675
+ * @param option The option to add.
1604
1676
  */
1605
- async vote(chatId, messageId, optionIndexes) {
1606
- return await this.#dispatch("vote", chatId, messageId, optionIndexes);
1677
+ async addPollOption(chatId, messageId, option) {
1678
+ return await this.#dispatch("addPollOption", chatId, messageId, option);
1607
1679
  }
1608
1680
  /**
1609
- * Retract a vote. User-only.
1681
+ * Get poll voters. User-only.
1610
1682
  *
1611
1683
  * @method pl
1612
1684
  * @param chatId The identifier of the chat that includes the poll.
1613
1685
  * @param messageId The identifier of the message that includes the poll.
1614
1686
  */
1615
- async retractVote(chatId, messageId) {
1616
- return await this.#dispatch("retractVote", chatId, messageId);
1687
+ async getPollVoters(chatId, messageId, params) {
1688
+ return await this.#dispatch("getPollVoters", chatId, messageId, params);
1617
1689
  }
1618
1690
  /**
1619
- * Add an option to a poll. User-only.
1691
+ * Remove an option from a poll. User-only.
1620
1692
  *
1693
+ * @method pl
1621
1694
  * @param chatId The identifier of the chat that includes the poll.
1622
1695
  * @param messageId The identifier of the message that includes the poll.
1623
- * @param option The option to add.
1696
+ * @param optionIndex The index of the option to remove.
1624
1697
  */
1625
- async addPollOption(chatId, messageId, option) {
1626
- return await this.#dispatch("addPollOption", chatId, messageId, option);
1698
+ async removePollOption(chatId, messageId, optionIndex) {
1699
+ return await this.#dispatch("removePollOption", chatId, messageId, optionIndex);
1627
1700
  }
1628
1701
  /**
1629
- * Remove an option from a poll. User-only.
1702
+ * Retract a vote. User-only.
1703
+ *
1704
+ * @method pl
1705
+ * @param chatId The identifier of the chat that includes the poll.
1706
+ * @param messageId The identifier of the message that includes the poll.
1707
+ */
1708
+ async retractVote(chatId, messageId) {
1709
+ return await this.#dispatch("retractVote", chatId, messageId);
1710
+ }
1711
+ /**
1712
+ * Cast a vote. User-only.
1630
1713
  *
1714
+ * @method pl
1631
1715
  * @param chatId The identifier of the chat that includes the poll.
1632
1716
  * @param messageId The identifier of the message that includes the poll.
1633
- * @param optionId The identifier of the option to remove.
1717
+ * @param optionIndexes The indexes of the options to cast for.
1634
1718
  */
1635
- async removePollOption(chatId, messageId, optionId) {
1636
- return await this.#dispatch("removePollOption", chatId, messageId, optionId);
1719
+ async vote(chatId, messageId, optionIndexes) {
1720
+ return await this.#dispatch("vote", chatId, messageId, optionIndexes);
1637
1721
  }
1638
1722
  //
1639
1723
  // ========================= CHECKLISTS ========================= //
@@ -1650,14 +1734,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1650
1734
  return await this.#dispatch("addToChecklist", chatId, messageId, items);
1651
1735
  }
1652
1736
  /**
1653
- * Update a checklist. User-only.
1737
+ * Check a single item of a checklist. User-only.
1654
1738
  *
1655
1739
  * @param chatId The identifier of a chat.
1656
1740
  * @param messageId The identifier of the checklist message.
1741
+ * @param item The identifier of the item to check.
1657
1742
  * @method cl
1658
1743
  */
1659
- async updateChecklist(chatId, messageId, params) {
1660
- return await this.#dispatch("updateChecklist", chatId, messageId, params);
1744
+ async checkChecklistItem(chatId, messageId, item) {
1745
+ return await this.#dispatch("checkChecklistItem", chatId, messageId, item);
1661
1746
  }
1662
1747
  /**
1663
1748
  * Check multiple items of a checklist. User-only.
@@ -1671,55 +1756,40 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1671
1756
  return await this.#dispatch("checkChecklistItems", chatId, messageId, items);
1672
1757
  }
1673
1758
  /**
1674
- * Uncheck multiple items of a checklist. User-only.
1759
+ * Uncheck a single item of a checklist. User-only.
1675
1760
  *
1676
1761
  * @param chatId The identifier of a chat.
1677
1762
  * @param messageId The identifier of the checklist message.
1678
- * @param items The identifiers of the items to uncheck.
1763
+ * @param item The identifier of the item to uncheck.
1679
1764
  * @method cl
1680
1765
  */
1681
- async uncheckChecklistItems(chatId, messageId, items) {
1682
- return await this.#dispatch("uncheckChecklistItems", chatId, messageId, items);
1766
+ async uncheckChecklistItem(chatId, messageId, item) {
1767
+ return await this.#dispatch("uncheckChecklistItem", chatId, messageId, item);
1683
1768
  }
1684
1769
  /**
1685
- * Check a single item of a checklist. User-only.
1770
+ * Uncheck multiple items of a checklist. User-only.
1686
1771
  *
1687
1772
  * @param chatId The identifier of a chat.
1688
1773
  * @param messageId The identifier of the checklist message.
1689
- * @param item The identifier of the item to check.
1774
+ * @param items The identifiers of the items to uncheck.
1690
1775
  * @method cl
1691
1776
  */
1692
- async checkChecklistItem(chatId, messageId, item) {
1693
- return await this.#dispatch("checkChecklistItem", chatId, messageId, item);
1777
+ async uncheckChecklistItems(chatId, messageId, items) {
1778
+ return await this.#dispatch("uncheckChecklistItems", chatId, messageId, items);
1694
1779
  }
1695
1780
  /**
1696
- * Uncheck a single item of a checklist. User-only.
1781
+ * Update a checklist. User-only.
1697
1782
  *
1698
1783
  * @param chatId The identifier of a chat.
1699
1784
  * @param messageId The identifier of the checklist message.
1700
- * @param item The identifier of the item to uncheck.
1701
1785
  * @method cl
1702
1786
  */
1703
- async uncheckChecklistItem(chatId, messageId, item) {
1704
- return await this.#dispatch("uncheckChecklistItem", chatId, messageId, item);
1787
+ async updateChecklist(chatId, messageId, params) {
1788
+ return await this.#dispatch("updateChecklist", chatId, messageId, params);
1705
1789
  }
1706
1790
  //
1707
1791
  // ========================= FILES ========================= //
1708
1792
  //
1709
- /**
1710
- * Download a chunk of a file.
1711
- *
1712
- * @method fs
1713
- * @param fileId The identifier of a file.
1714
- * @example ```ts
1715
- * const chunk = await client.downloadChunk(fileId, { chunkSize: 256 * 1024 });
1716
- * ```
1717
- * @returns The downloaded chunk.
1718
- * @cache file
1719
- */
1720
- async downloadChunk(fileId, params) {
1721
- return await this.#dispatch("downloadChunk", fileId, params);
1722
- }
1723
1793
  /**
1724
1794
  * Download a file.
1725
1795
  *
@@ -1747,6 +1817,20 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1747
1817
  }
1748
1818
  }
1749
1819
  }
1820
+ /**
1821
+ * Download a chunk of a file.
1822
+ *
1823
+ * @method fs
1824
+ * @param fileId The identifier of a file.
1825
+ * @example ```ts
1826
+ * const chunk = await client.downloadChunk(fileId, { chunkSize: 256 * 1024 });
1827
+ * ```
1828
+ * @returns The downloaded chunk.
1829
+ * @cache file
1830
+ */
1831
+ async downloadChunk(fileId, params) {
1832
+ return await this.#dispatch("downloadChunk", fileId, params);
1833
+ }
1750
1834
  /**
1751
1835
  * Get custom emoji documents for download.
1752
1836
  *
@@ -1762,394 +1846,401 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
1762
1846
  // ========================= CHATS ========================= //
1763
1847
  //
1764
1848
  /**
1765
- * Get chats from a chat list. User-only.
1849
+ * Add a single user to a chat.
1766
1850
  *
1767
1851
  * @method ch
1852
+ * @param chatId The identifier of a chat to add the user to.
1853
+ * @param userId The identifier of the user to add to the chat.
1854
+ * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
1768
1855
  */
1769
- async getChats(params) {
1770
- return await this.#dispatch("getChats", params);
1856
+ async addChatMember(chatId, userId, params) {
1857
+ return await this.#dispatch("addChatMember", chatId, userId, params);
1771
1858
  }
1772
1859
  /**
1773
- * Get pinned chats from a chat list. User-only.
1860
+ * Add multiple users at once to a channel or a supergroup.
1774
1861
  *
1775
1862
  * @method ch
1776
- * @param from The chat list to get the pinned chats from. Defaults to main.
1863
+ * @param chatId The identifier of the channel or supergroup to add the users to.
1864
+ * @param userIds The identifiers of the users to add to the channel or supergroup.
1865
+ * @returns An array of FailedInvitation that has at most a length that is the same as that of the parameter userIds. If empty, it means that all the provided users were added.
1777
1866
  */
1778
- async getPinnedChats(from) {
1779
- return await this.#dispatch("getPinnedChats", from);
1867
+ async addChatMembers(chatId, userIds) {
1868
+ return await this.#dispatch("addChatMembers", chatId, userIds);
1780
1869
  }
1781
1870
  /**
1782
- * Get a chat.
1871
+ * Approve a join request.
1783
1872
  *
1784
1873
  * @method ch
1785
- * @cache
1874
+ * @param chatId The identifier of a chat with the join request.
1875
+ * @param userId The user who made the join request.
1786
1876
  */
1787
- async getChat(chatId) {
1788
- return await this.#dispatch("getChat", chatId);
1877
+ async approveJoinRequest(chatId, userId) {
1878
+ return await this.#dispatch("approveJoinRequest", chatId, userId);
1789
1879
  }
1790
1880
  /**
1791
- * Get chat history. User-only.
1881
+ * Approve all join requests. User-only.
1792
1882
  *
1793
1883
  * @method ch
1794
- * @param chatId The identifier of a chat.
1884
+ * @param chatId The identifier of a chat with the join requests.
1795
1885
  */
1796
- async getHistory(chatId, params) {
1797
- return await this.#dispatch("getHistory", chatId, params);
1886
+ async approveJoinRequests(chatId, params) {
1887
+ return await this.#dispatch("approveJoinRequests", chatId, params);
1798
1888
  }
1799
1889
  /**
1800
- * Set a chat's available reactions. User-only.
1890
+ * Archive a single chat. User-only.
1801
1891
  *
1802
1892
  * @method ch
1803
1893
  * @param chatId The identifier of a chat.
1804
- * @param availableReactions The new available reactions.
1805
1894
  */
1806
- async setAvailableReactions(chatId, availableReactions) {
1807
- return await this.#dispatch("setAvailableReactions", chatId, availableReactions);
1895
+ async archiveChat(chatId) {
1896
+ return await this.#dispatch("archiveChat", chatId);
1808
1897
  }
1809
1898
  /**
1810
- * Set a chat's photo.
1899
+ * Archive multiple chats. User-only.
1811
1900
  *
1812
1901
  * @method ch
1813
- * @param chatId The identifier of a chat.
1814
- * @param photo A photo to set as the chat's photo.
1902
+ * @param chatIds The identifiers of the chats to archive.
1815
1903
  */
1816
- async setChatPhoto(chatId, photo, params) {
1817
- return await this.#dispatch("setChatPhoto", chatId, photo, params);
1904
+ async archiveChats(chatIds) {
1905
+ return await this.#dispatch("archiveChats", chatIds);
1818
1906
  }
1819
1907
  /**
1820
- * Delete a chat's photo.
1908
+ * Ban a member from a chat.
1821
1909
  *
1822
1910
  * @method ch
1823
1911
  * @param chatId The identifier of a chat.
1912
+ * @param memberId The identifier of the member.
1824
1913
  */
1825
- async deleteChatPhoto(chatId) {
1826
- return await this.#dispatch("deleteChatPhoto", chatId);
1914
+ async banChatMember(chatId, memberId, params) {
1915
+ return await this.#dispatch("banChatMember", chatId, memberId, params);
1827
1916
  }
1828
1917
  /**
1829
- * Ban a member from a chat.
1918
+ * Close a chat previously opened by openChat.
1919
+ *
1920
+ * @method ch
1921
+ * @param chatId The identifier of a chat to close.
1922
+ */
1923
+ async closeChat(chatId) {
1924
+ return await this.#dispatch("closeChat", chatId);
1925
+ }
1926
+ /**
1927
+ * Close a forum topic.
1830
1928
  *
1831
1929
  * @method ch
1832
1930
  * @param chatId The identifier of a chat.
1833
- * @param memberId The identifier of the member.
1931
+ * @param topicId The identifier of the topic.
1834
1932
  */
1835
- async banChatMember(chatId, memberId, params) {
1836
- return await this.#dispatch("banChatMember", chatId, memberId, params);
1933
+ async closeTopic(chatId, topicId) {
1934
+ return await this.#dispatch("closeTopic", chatId, topicId);
1837
1935
  }
1838
1936
  /**
1839
- * Unban a member from a chat.
1937
+ * Create a channel. User-only.
1840
1938
  *
1841
1939
  * @method ch
1842
- * @param chatId The identifier of a chat. Must be a supergroup.
1843
- * @param memberId The identifier of the member.
1940
+ * @param title The title of the channel.
1941
+ * @returns The created channel.
1844
1942
  */
1845
- async unbanChatMember(chatId, memberId) {
1846
- return await this.#dispatch("unbanChatMember", chatId, memberId);
1943
+ async createChannel(title, params) {
1944
+ return await this.#dispatch("createChannel", title, params);
1847
1945
  }
1848
1946
  /**
1849
- * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
1947
+ * Create a group. User-only.
1850
1948
  *
1851
1949
  * @method ch
1852
- * @param chatId The identifier of a chat. Must be a supergroup.
1853
- * @param memberId The identifier of the member.
1950
+ * @param title The title of the group.
1951
+ * @returns The created group.
1854
1952
  */
1855
- async kickChatMember(chatId, memberId) {
1856
- return await this.#dispatch("kickChatMember", chatId, memberId);
1953
+ async createGroup(title, params) {
1954
+ return await this.#dispatch("createGroup", title, params);
1857
1955
  }
1858
1956
  /**
1859
- * Set the rights of a chat member.
1957
+ * Create an invite link.
1860
1958
  *
1861
1959
  * @method ch
1862
- * @param chatId The identifier of a chat. Must be a supergroup.
1863
- * @param memberId The identifier of the member.
1960
+ * @param chatId The identifier of a chat to create the invite link for.
1961
+ * @returns The newly created invite link.
1864
1962
  */
1865
- async setChatMemberRights(chatId, memberId, params) {
1866
- return await this.#dispatch("setChatMemberRights", chatId, memberId, params);
1963
+ async createInviteLink(chatId, params) {
1964
+ return await this.#dispatch("createInviteLink", chatId, params);
1867
1965
  }
1868
1966
  /**
1869
- * Get the administrators of a chat.
1967
+ * Create a supergroup. User-only.
1870
1968
  *
1871
1969
  * @method ch
1872
- * @param chatId The identifier of a chat.
1873
- * @returns The chat's administrators.
1970
+ * @param title The title of the supergroup.
1971
+ * @returns The created supergroup.
1874
1972
  */
1875
- async getChatAdministrators(chatId) {
1876
- return await this.#dispatch("getChatAdministrators", chatId);
1973
+ async createSupergroup(title, params) {
1974
+ return await this.#dispatch("createSupergroup", title, params);
1877
1975
  }
1878
1976
  /**
1879
- * Enable join requests in a chat. User-only.
1977
+ * Create a forum topic.
1880
1978
  *
1881
1979
  * @method ch
1882
- * @param chatId The identifier of a chat. Must be a channel or a supergroup.
1980
+ * @param chatId The identifier of a chat.
1981
+ * @param title The title of the topic.
1982
+ * @returns The created topic.
1883
1983
  */
1884
- async enableJoinRequests(chatId) {
1885
- return await this.#dispatch("enableJoinRequests", chatId);
1984
+ async createTopic(chatId, title, params) {
1985
+ return await this.#dispatch("createTopic", chatId, title, params);
1886
1986
  }
1887
1987
  /**
1888
- * Disable join requests in a chat. User-only.
1988
+ * Decline a join request.
1889
1989
  *
1890
1990
  * @method ch
1891
- * @param chatId The identifier of a chat. Must be a channel or a supergroup.
1991
+ * @param chatId The identifier of a chat with the join request.
1992
+ * @param userId The user who made the join request.
1892
1993
  */
1893
- async disableJoinRequests(chatId) {
1894
- return await this.#dispatch("disableJoinRequests", chatId);
1994
+ async declineJoinRequest(chatId, userId) {
1995
+ return await this.#dispatch("declineJoinRequest", chatId, userId);
1895
1996
  }
1896
1997
  /**
1897
- * Get inactive chats. User-only.
1998
+ * Decline all join requests. User-only.
1898
1999
  *
1899
2000
  * @method ch
1900
- * @returns A list of inactive chats the current user is a member of.
2001
+ * @param chatId The identifier of a chat with the join requests.
1901
2002
  */
1902
- async getInactiveChats() {
1903
- return await this.#dispatch("getInactiveChats");
2003
+ async declineJoinRequests(chatId, params) {
2004
+ return await this.#dispatch("declineJoinRequests", chatId, params);
1904
2005
  }
1905
2006
  /**
1906
- * Get the invite links created for a chat. User-only.
2007
+ * Delete a chat. User-only.
1907
2008
  *
1908
2009
  * @method ch
1909
2010
  * @param chatId The identifier of a chat.
1910
- * @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
1911
2011
  */
1912
- async getCreatedInviteLinks(chatId, params) {
1913
- return await this.#dispatch("getCreatedInviteLinks", chatId, params);
2012
+ async deleteChat(chatId) {
2013
+ return await this.#dispatch("deleteChat", chatId);
1914
2014
  }
1915
2015
  /**
1916
- * Join a chat. User-only.
2016
+ * Delete a chat's photo.
1917
2017
  *
1918
2018
  * @method ch
1919
2019
  * @param chatId The identifier of a chat.
1920
2020
  */
1921
- async joinChat(chatId) {
1922
- return await this.#dispatch("joinChat", chatId);
2021
+ async deleteChatPhoto(chatId) {
2022
+ return await this.#dispatch("deleteChatPhoto", chatId);
1923
2023
  }
1924
2024
  /**
1925
- * Leave a chat.
2025
+ * Delete a chat's sticker set.
1926
2026
  *
1927
2027
  * @method ch
1928
- * @param chatId The identifier of a chat.
2028
+ * @param chatId The identifier of a chat. Must be a supergroup.
1929
2029
  */
1930
- async leaveChat(chatId) {
1931
- return await this.#dispatch("leaveChat", chatId);
2030
+ async deleteChatStickerSet(chatId) {
2031
+ return await this.#dispatch("deleteChatStickerSet", chatId);
1932
2032
  }
1933
2033
  /**
1934
- * Get information on a user's chat membership.
2034
+ * Disable automatic anti-spam in a group. User-only.
1935
2035
  *
1936
2036
  * @method ch
1937
- * @param chatId The identifier of a chat.
1938
- * @param userId The identifier of the user.
2037
+ * @param chatId The identifier of the group.
1939
2038
  */
1940
- async getChatMember(chatId, userId) {
1941
- return await this.#dispatch("getChatMember", chatId, userId);
2039
+ async disableAntispam(chatId) {
2040
+ return await this.#dispatch("disableAntispam", chatId);
1942
2041
  }
1943
2042
  /**
1944
- * Get the members of a chat.
2043
+ * Disable business bots in a private chat. User-only.
1945
2044
  *
1946
2045
  * @method ch
1947
- * @param chatId The identifier of a chat.
2046
+ * @param chatId The identifier of the private chat to disable business bots in.
1948
2047
  */
1949
- async getChatMembers(chatId, params) {
1950
- return await this.#dispatch("getChatMembers", chatId, params);
2048
+ async disableBusinessBots(chatId) {
2049
+ return await this.#dispatch("disableBusinessBots", chatId);
1951
2050
  }
1952
2051
  /**
1953
- * Set a chat's sticker set.
2052
+ * Disable chat history for new members. User-only.
1954
2053
  *
1955
2054
  * @method ch
1956
- * @param chatId The identifier of a chat. Must be a supergroup.
1957
- * @param setName The name of the set.
2055
+ * @param chatId The identifier of a chat.
1958
2056
  */
1959
- async setChatStickerSet(chatId, setName) {
1960
- return await this.#dispatch("setChatStickerSet", chatId, setName);
2057
+ async disableChatHistoryForNewMembers(chatId) {
2058
+ return await this.#dispatch("disableChatHistoryForNewMembers", chatId);
1961
2059
  }
1962
2060
  /**
1963
- * Delete a chat's sticker set.
2061
+ * Disable join requests in a chat. User-only.
1964
2062
  *
1965
2063
  * @method ch
1966
- * @param chatId The identifier of a chat. Must be a supergroup.
2064
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
1967
2065
  */
1968
- async deleteChatStickerSet(chatId) {
1969
- return await this.#dispatch("deleteChatStickerSet", chatId);
2066
+ async disableJoinRequests(chatId) {
2067
+ return await this.#dispatch("disableJoinRequests", chatId);
1970
2068
  }
1971
2069
  /**
1972
- * Set the number of boosts required to circumvent a chat's default restrictions. User-only.
2070
+ * Disable sharing in a chat. User-only.
1973
2071
  *
1974
2072
  * @method ch
1975
2073
  * @param chatId The identifier of a chat.
1976
- * @param boosts The number of boosts required to circumvent its restrictions.
1977
2074
  */
1978
- async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
1979
- return await this.#dispatch("setBoostsRequiredToCircumventRestrictions", chatId, boosts);
2075
+ async disableSharing(chatId) {
2076
+ return await this.#dispatch("disableSharing", chatId);
1980
2077
  }
1981
2078
  /**
1982
- * Create an invite link.
2079
+ * Disable post signatures in a channel. User-only.
1983
2080
  *
1984
2081
  * @method ch
1985
- * @param chatId The identifier of a chat to create the invite link for.
1986
- * @returns The newly created invite link.
2082
+ * @param chatId The identifier of the channel.
1987
2083
  */
1988
- async createInviteLink(chatId, params) {
1989
- return await this.#dispatch("createInviteLink", chatId, params);
2084
+ async disableSignatures(chatId) {
2085
+ return await this.#dispatch("disableSignatures", chatId);
1990
2086
  }
1991
2087
  /**
1992
- * Approve a join request.
2088
+ * Disable slow mode in a group. User-only.
1993
2089
  *
1994
2090
  * @method ch
1995
- * @param chatId The identifier of a chat with the join request.
1996
- * @param userId The user who made the join request.
2091
+ * @param chatId The identifier of the group to disable slow mode in.
1997
2092
  */
1998
- async approveJoinRequest(chatId, userId) {
1999
- return await this.#dispatch("approveJoinRequest", chatId, userId);
2093
+ async disableSlowMode(chatId) {
2094
+ return await this.#dispatch("disableSlowMode", chatId);
2000
2095
  }
2001
2096
  /**
2002
- * Decline a join request.
2097
+ * Disable topics in a group. User-only.
2003
2098
  *
2004
2099
  * @method ch
2005
- * @param chatId The identifier of a chat with the join request.
2006
- * @param userId The user who made the join request.
2100
+ * @param chatId The identifier of the group.
2007
2101
  */
2008
- async declineJoinRequest(chatId, userId) {
2009
- return await this.#dispatch("declineJoinRequest", chatId, userId);
2102
+ async disableTopics(chatId) {
2103
+ return await this.#dispatch("disableTopics", chatId);
2010
2104
  }
2011
2105
  /**
2012
- * Approve all join requests. User-only.
2106
+ * Edit a forum topic.
2013
2107
  *
2014
2108
  * @method ch
2015
- * @param chatId The identifier of a chat with the join requests.
2109
+ * @param chatId The identifier of a chat.
2110
+ * @param topicId The identifier of the topic.
2111
+ * @param title The new title of the topic.
2112
+ * @returns The new topic.
2016
2113
  */
2017
- async approveJoinRequests(chatId, params) {
2018
- return await this.#dispatch("approveJoinRequests", chatId, params);
2114
+ async editTopic(chatId, topicId, title, params) {
2115
+ return await this.#dispatch("editTopic", chatId, topicId, title, params);
2019
2116
  }
2020
2117
  /**
2021
- * Decline all join requests. User-only.
2118
+ * Enable automatic anti-spam in a group. User-only.
2022
2119
  *
2023
2120
  * @method ch
2024
- * @param chatId The identifier of a chat with the join requests.
2121
+ * @param chatId The identifier of the group.
2025
2122
  */
2026
- async declineJoinRequests(chatId, params) {
2027
- return await this.#dispatch("declineJoinRequests", chatId, params);
2123
+ async enableAntispam(chatId) {
2124
+ return await this.#dispatch("enableAntispam", chatId);
2028
2125
  }
2029
2126
  /**
2030
- * Get pending join requests in a chat. User-only.
2127
+ * Enable business bots in a private chat. User-only.
2031
2128
  *
2032
2129
  * @method ch
2033
- * @param chatId The identifier of a chat with the join requests.
2130
+ * @param chatId The identifier of the private chat to enable business bots in.
2034
2131
  */
2035
- async getJoinRequests(chatId, params) {
2036
- return await this.#dispatch("getJoinRequests", chatId, params);
2132
+ async enableBusinessBots(chatId) {
2133
+ return await this.#dispatch("enableBusinessBots", chatId);
2037
2134
  }
2038
2135
  /**
2039
- * Add a single user to a chat.
2136
+ * Enable chat history for new members. User-only.
2040
2137
  *
2041
2138
  * @method ch
2042
- * @param chatId The identifier of a chat to add the user to.
2043
- * @param userId The identifier of the user to add to the chat.
2044
- * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
2139
+ * @param chatId The identifier of a chat.
2045
2140
  */
2046
- async addChatMember(chatId, userId, params) {
2047
- return await this.#dispatch("addChatMember", chatId, userId, params);
2141
+ async enableChatHistoryForNewMembers(chatId) {
2142
+ return await this.#dispatch("enableChatHistoryForNewMembers", chatId);
2048
2143
  }
2049
2144
  /**
2050
- * Add multiple users at once to a channel or a supergroup.
2145
+ * Enable join requests in a chat. User-only.
2051
2146
  *
2052
2147
  * @method ch
2053
- * @param chatId The identifier of the channel or supergroup to add the users to.
2054
- * @param userIds The identifiers of the users to add to the channel or supergroup.
2055
- * @returns An array of FailedInvitation that has at most a length that is the same as that of the parameter userIds. If empty, it means that all the provided users were added.
2148
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2056
2149
  */
2057
- async addChatMembers(chatId, userIds) {
2058
- return await this.#dispatch("addChatMembers", chatId, userIds);
2150
+ async enableJoinRequests(chatId) {
2151
+ return await this.#dispatch("enableJoinRequests", chatId);
2059
2152
  }
2060
2153
  /**
2061
- * Open a chat.
2154
+ * Enable sharing in a chat. User-only.
2062
2155
  *
2063
2156
  * @method ch
2064
- * @param chatId The identifier of a chat to open.
2157
+ * @param chatId The identifier of a chat.
2065
2158
  */
2066
- async openChat(chatId, params) {
2067
- return await this.#dispatch("openChat", chatId, params);
2159
+ async enableSharing(chatId) {
2160
+ return await this.#dispatch("enableSharing", chatId);
2068
2161
  }
2069
2162
  /**
2070
- * Close a chat previously opened by openChat.
2163
+ * Enable post signatures in a channel. User-only.
2071
2164
  *
2072
2165
  * @method ch
2073
- * @param chatId The identifier of a chat to close.
2166
+ * @param chatId The identifier of the channel.
2074
2167
  */
2075
- async closeChat(chatId) {
2076
- return await this.#dispatch("closeChat", chatId);
2168
+ async enableSignatures(chatId, params) {
2169
+ return await this.#dispatch("enableSignatures", chatId, params);
2077
2170
  }
2078
2171
  /**
2079
- * Create a group. User-only.
2172
+ * Enable topics in a group. User-only.
2080
2173
  *
2081
2174
  * @method ch
2082
- * @param title The title of the group.
2083
- * @returns The created group.
2175
+ * @param chatId The identifier of the group.
2176
+ * @param isShownAsTabs Whether topics should be displayed as tabs.
2084
2177
  */
2085
- async createGroup(title, params) {
2086
- return await this.#dispatch("createGroup", title, params);
2178
+ async enableTopics(chatId, isShownAsTabs) {
2179
+ return await this.#dispatch("enableTopics", chatId, isShownAsTabs);
2087
2180
  }
2088
2181
  /**
2089
- * Create a supergroup. User-only.
2182
+ * Get a chat.
2090
2183
  *
2091
2184
  * @method ch
2092
- * @param title The title of the supergroup.
2093
- * @returns The created supergroup.
2185
+ * @cache
2094
2186
  */
2095
- async createSupergroup(title, params) {
2096
- return await this.#dispatch("createSupergroup", title, params);
2187
+ async getChat(chatId) {
2188
+ return await this.#dispatch("getChat", chatId);
2097
2189
  }
2098
2190
  /**
2099
- * Create a channel. User-only.
2191
+ * Get the administrators of a chat.
2100
2192
  *
2101
2193
  * @method ch
2102
- * @param title The title of the channel.
2103
- * @returns The created channel.
2194
+ * @param chatId The identifier of a chat.
2195
+ * @returns The chat's administrators.
2104
2196
  */
2105
- async createChannel(title, params) {
2106
- return await this.#dispatch("createChannel", title, params);
2197
+ async getChatAdministrators(chatId) {
2198
+ return await this.#dispatch("getChatAdministrators", chatId);
2107
2199
  }
2108
2200
  /**
2109
- * Set the time to live of the messages of a chat. User-only.
2201
+ * Get information on a user's chat membership.
2110
2202
  *
2111
2203
  * @method ch
2112
2204
  * @param chatId The identifier of a chat.
2113
- * @param messageTtl The time to live of the messages in seconds.
2205
+ * @param userId The identifier of the user.
2114
2206
  */
2115
- async setMessageTtl(chatId, messageTtl) {
2116
- return await this.#dispatch("setMessageTtl", chatId, messageTtl);
2207
+ async getChatMember(chatId, userId) {
2208
+ return await this.#dispatch("getChatMember", chatId, userId);
2117
2209
  }
2118
2210
  /**
2119
- * Archive multiple chats. User-only.
2211
+ * Get the members of a chat.
2120
2212
  *
2121
2213
  * @method ch
2122
- * @param chatIds The identifiers of the chats to archive.
2214
+ * @param chatId The identifier of a chat.
2123
2215
  */
2124
- async archiveChats(chatIds) {
2125
- return await this.#dispatch("archiveChats", chatIds);
2216
+ async getChatMembers(chatId, params) {
2217
+ return await this.#dispatch("getChatMembers", chatId, params);
2126
2218
  }
2127
2219
  /**
2128
- * Archive a single chat. User-only.
2220
+ * Get a partial chat.
2129
2221
  *
2130
2222
  * @method ch
2131
- * @param chatId The identifier of a chat.
2223
+ * @cache
2132
2224
  */
2133
- async archiveChat(chatId) {
2134
- return await this.#dispatch("archiveChat", chatId);
2225
+ async getChatP(chatId) {
2226
+ return await this.#dispatch("getChatP", chatId);
2135
2227
  }
2136
2228
  /**
2137
- * Unarchive multiple chats. User-only.
2229
+ * Get chats from a chat list. User-only.
2138
2230
  *
2139
2231
  * @method ch
2140
- * @param chatIds The identifiers of the chats to unarchive.
2141
2232
  */
2142
- async unarchiveChats(chatIds) {
2143
- return await this.#dispatch("unarchiveChats", chatIds);
2233
+ async getChats(params) {
2234
+ return await this.#dispatch("getChats", params);
2144
2235
  }
2145
2236
  /**
2146
- * Unarchive a single chat. User-only.
2237
+ * Get the settings of a chat. User-only.
2147
2238
  *
2148
2239
  * @method ch
2149
2240
  * @param chatId The identifier of a chat.
2150
2241
  */
2151
- async unarchiveChat(chatId) {
2152
- return await this.#dispatch("unarchiveChat", chatId);
2242
+ async getChatSettings(chatId) {
2243
+ return await this.#dispatch("getChatSettings", chatId);
2153
2244
  }
2154
2245
  /**
2155
2246
  * Get common chats between a user and the current one. User-only.
@@ -2161,272 +2252,259 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2161
2252
  return await this.#dispatch("getCommonChats", userId, params);
2162
2253
  }
2163
2254
  /**
2164
- * Get the settings of a chat. User-only.
2255
+ * Get the invite links created for a chat. User-only.
2165
2256
  *
2166
2257
  * @method ch
2167
2258
  * @param chatId The identifier of a chat.
2259
+ * @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
2168
2260
  */
2169
- async getChatSettings(chatId) {
2170
- return await this.#dispatch("getChatSettings", chatId);
2171
- }
2172
- /**
2173
- * Disable business bots in a private chat. User-only.
2174
- *
2175
- * @method ch
2176
- * @param chatId The identifier of the private chat to disable business bots in.
2177
- */
2178
- async disableBusinessBots(chatId) {
2179
- return await this.#dispatch("disableBusinessBots", chatId);
2261
+ async getCreatedInviteLinks(chatId, params) {
2262
+ return await this.#dispatch("getCreatedInviteLinks", chatId, params);
2180
2263
  }
2181
2264
  /**
2182
- * Enable business bots in a private chat. User-only.
2265
+ * Get discussion chat suggestions. User-only.
2183
2266
  *
2184
2267
  * @method ch
2185
- * @param chatId The identifier of the private chat to enable business bots in.
2186
2268
  */
2187
- async enableBusinessBots(chatId) {
2188
- return await this.#dispatch("enableBusinessBots", chatId);
2269
+ async getDiscussionChatSuggestions() {
2270
+ return await this.#dispatch("getDiscussionChatSuggestions");
2189
2271
  }
2190
2272
  /**
2191
- * Disable slow mode in a group. User-only.
2273
+ * Get chat history. User-only.
2192
2274
  *
2193
2275
  * @method ch
2194
- * @param chatId The identifier of the group to disable slow mode in.
2276
+ * @param chatId The identifier of a chat.
2195
2277
  */
2196
- async disableSlowMode(chatId) {
2197
- return await this.#dispatch("disableSlowMode", chatId);
2278
+ async getHistory(chatId, params) {
2279
+ return await this.#dispatch("getHistory", chatId, params);
2198
2280
  }
2199
2281
  /**
2200
- * Change slow mode in a group. User-only.
2282
+ * Get inactive chats. User-only.
2201
2283
  *
2202
2284
  * @method ch
2203
- * @param chatId The identifier of the group to change slow mode in.
2204
- * @param duration New slow mode duration.
2285
+ * @returns A list of inactive chats the current user is a member of.
2205
2286
  */
2206
- async setSlowMode(chatId, duration) {
2207
- return await this.#dispatch("setSlowMode", chatId, duration);
2287
+ async getInactiveChats() {
2288
+ return await this.#dispatch("getInactiveChats");
2208
2289
  }
2209
2290
  /**
2210
- * Change the title of a chat.
2291
+ * Get pending join requests in a chat. User-only.
2211
2292
  *
2212
2293
  * @method ch
2213
- * @param chatId The identifier of a chat.
2214
- * @param title The new title.
2294
+ * @param chatId The identifier of a chat with the join requests.
2215
2295
  */
2216
- async setChatTitle(chatId, title) {
2217
- return await this.#dispatch("setChatTitle", chatId, title);
2296
+ async getJoinRequests(chatId, params) {
2297
+ return await this.#dispatch("getJoinRequests", chatId, params);
2218
2298
  }
2219
2299
  /**
2220
- * Change the description of a chat.
2300
+ * Get the count of online members in a chat. User-only.
2221
2301
  *
2222
2302
  * @method ch
2223
2303
  * @param chatId The identifier of a chat.
2224
- * @param description The new description.
2304
+ * @returns The count of online members in the chat.
2225
2305
  */
2226
- async setChatDescription(chatId, description) {
2227
- return await this.#dispatch("setChatDescription", chatId, description);
2306
+ async getOnlineCount(chatId) {
2307
+ return await this.#dispatch("getOnlineCount", chatId);
2228
2308
  }
2229
2309
  /**
2230
- * Hide the member list of a group to non-admins. User-only.
2310
+ * Get pinned chats from a chat list. User-only.
2231
2311
  *
2232
2312
  * @method ch
2233
- * @param chatId The identifier of the group.
2313
+ * @param from The chat list to get the pinned chats from. Defaults to main.
2234
2314
  */
2235
- async hideMemberList(chatId) {
2236
- return await this.#dispatch("hideMemberList", chatId);
2315
+ async getPinnedChats(from) {
2316
+ return await this.#dispatch("getPinnedChats", from);
2237
2317
  }
2238
2318
  /**
2239
- * Show the member list of a group to non-admins. User-only.
2319
+ * Get recommended channels. User-only.
2240
2320
  *
2241
2321
  * @method ch
2242
- * @param chatId The identifier of the group.
2322
+ * @returns A list of recommended channels.
2243
2323
  */
2244
- async showMemberList(chatId) {
2245
- return await this.#dispatch("showMemberList", chatId);
2324
+ async getRecommendedChannels() {
2325
+ return await this.#dispatch("getRecommendedChannels");
2246
2326
  }
2247
2327
  /**
2248
- * Enable topics in a group. User-only.
2328
+ * Get similar bots. User-only.
2249
2329
  *
2250
2330
  * @method ch
2251
- * @param chatId The identifier of the group.
2252
- * @param isShownAsTabs Whether topics should be displayed as tabs.
2331
+ * @param chatId The identifier of a bot to get similar bots for.
2332
+ * @returns A list of similar bots.
2253
2333
  */
2254
- async enableTopics(chatId, isShownAsTabs) {
2255
- return await this.#dispatch("enableTopics", chatId, isShownAsTabs);
2334
+ async getSimilarBots(chatId) {
2335
+ return await this.#dispatch("getSimilarBots", chatId);
2256
2336
  }
2257
2337
  /**
2258
- * Disable topics in a group. User-only.
2338
+ * Get similar channels. User-only.
2259
2339
  *
2260
2340
  * @method ch
2261
- * @param chatId The identifier of the group.
2341
+ * @param chatId The identifier of a channel to get similar channels for.
2342
+ * @returns A list of similar channels.
2262
2343
  */
2263
- async disableTopics(chatId) {
2264
- return await this.#dispatch("disableTopics", chatId);
2344
+ async getSimilarChannels(chatId) {
2345
+ return await this.#dispatch("getSimilarChannels", chatId);
2265
2346
  }
2266
2347
  /**
2267
- * Enable automatic anti-spam in a group. User-only.
2348
+ * Hide the general forum topic.
2268
2349
  *
2269
2350
  * @method ch
2270
- * @param chatId The identifier of the group.
2351
+ * @param chatId The identifier of a chat.
2271
2352
  */
2272
- async enableAntispam(chatId) {
2273
- return await this.#dispatch("enableAntispam", chatId);
2353
+ async hideGeneralTopic(chatId) {
2354
+ return await this.#dispatch("hideGeneralTopic", chatId);
2274
2355
  }
2275
2356
  /**
2276
- * Disable automatic anti-spam in a group. User-only.
2357
+ * Hide the member list of a group to non-admins. User-only.
2277
2358
  *
2278
2359
  * @method ch
2279
2360
  * @param chatId The identifier of the group.
2280
2361
  */
2281
- async disableAntispam(chatId) {
2282
- return await this.#dispatch("disableAntispam", chatId);
2362
+ async hideMemberList(chatId) {
2363
+ return await this.#dispatch("hideMemberList", chatId);
2283
2364
  }
2284
2365
  /**
2285
- * Enable post signatures in a channel. User-only.
2366
+ * Join a chat. User-only.
2286
2367
  *
2287
2368
  * @method ch
2288
- * @param chatId The identifier of the channel.
2369
+ * @param chatId The identifier of a chat.
2289
2370
  */
2290
- async enableSignatures(chatId, params) {
2291
- return await this.#dispatch("enableSignatures", chatId, params);
2371
+ async joinChat(chatId) {
2372
+ return await this.#dispatch("joinChat", chatId);
2292
2373
  }
2293
2374
  /**
2294
- * Disable post signatures in a channel. User-only.
2375
+ * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
2295
2376
  *
2296
2377
  * @method ch
2297
- * @param chatId The identifier of the channel.
2378
+ * @param chatId The identifier of a chat. Must be a supergroup.
2379
+ * @param memberId The identifier of the member.
2298
2380
  */
2299
- async disableSignatures(chatId) {
2300
- return await this.#dispatch("disableSignatures", chatId);
2381
+ async kickChatMember(chatId, memberId) {
2382
+ return await this.#dispatch("kickChatMember", chatId, memberId);
2301
2383
  }
2302
2384
  /**
2303
- * Delete a chat. User-only.
2385
+ * Leave a chat.
2304
2386
  *
2305
2387
  * @method ch
2306
2388
  * @param chatId The identifier of a chat.
2307
2389
  */
2308
- async deleteChat(chatId) {
2309
- return await this.#dispatch("deleteChat", chatId);
2390
+ async leaveChat(chatId) {
2391
+ return await this.#dispatch("leaveChat", chatId);
2310
2392
  }
2311
2393
  /**
2312
- * Get discussion chat suggestions. User-only.
2394
+ * Mark all mentions in a chat as read. User-only.
2313
2395
  *
2314
2396
  * @method ch
2397
+ * @param chatId The identifier of the chat.
2315
2398
  */
2316
- async getDiscussionChatSuggestions() {
2317
- return await this.#dispatch("getDiscussionChatSuggestions");
2399
+ async markAllMentionsAsRead(chatId, params) {
2400
+ return await this.#dispatch("markAllMentionsAsRead", chatId, params);
2318
2401
  }
2319
2402
  /**
2320
- * Set a channel's discussion chat. User-only.
2403
+ * Mark a chat as read. User-only.
2321
2404
  *
2322
2405
  * @method ch
2323
- * @param chatId The identifier of a channel.
2324
- * @param discussionChatId The identifier of a chat to use as discussion for the channel.
2406
+ * @param chatId The identifier of a chat.
2325
2407
  */
2326
- async setDiscussionChat(chatId, discussionChatId) {
2327
- return await this.#dispatch("setDiscussionChat", chatId, discussionChatId);
2408
+ async markChatAsRead(chatId) {
2409
+ return await this.#dispatch("markChatAsRead", chatId);
2328
2410
  }
2329
2411
  /**
2330
- * Transfer the ownership of a chat. User-only.
2412
+ * Mark a chat as unread. User-only.
2331
2413
  *
2332
2414
  * @method ch
2333
2415
  * @param chatId The identifier of a chat.
2334
- * @param userId The identifier of the new owner.
2335
- * @param password The password of the current account.
2336
2416
  */
2337
- async transferChatOwnership(chatId, userId, password) {
2338
- return await this.#dispatch("transferChatOwnership", chatId, userId, password);
2417
+ async markChatAsUnread(chatId) {
2418
+ return await this.#dispatch("markChatAsUnread", chatId);
2339
2419
  }
2340
2420
  /**
2341
- * Create a forum topic.
2421
+ * Open a chat.
2342
2422
  *
2343
2423
  * @method ch
2344
- * @param chatId The identifier of a chat.
2345
- * @param title The title of the topic.
2346
- * @returns The created topic.
2424
+ * @param chatId The identifier of a chat to open.
2347
2425
  */
2348
- async createTopic(chatId, title, params) {
2349
- return await this.#dispatch("createTopic", chatId, title, params);
2426
+ async openChat(chatId, params) {
2427
+ return await this.#dispatch("openChat", chatId, params);
2350
2428
  }
2351
2429
  /**
2352
- * Edit a forum topic.
2430
+ * Pin a forum topic.
2353
2431
  *
2354
2432
  * @method ch
2355
2433
  * @param chatId The identifier of a chat.
2356
2434
  * @param topicId The identifier of the topic.
2357
- * @param title The new title of the topic.
2358
- * @returns The new topic.
2359
2435
  */
2360
- async editTopic(chatId, topicId, title, params) {
2361
- return await this.#dispatch("editTopic", chatId, topicId, title, params);
2436
+ async pinTopic(chatId, topicId) {
2437
+ return await this.#dispatch("pinTopic", chatId, topicId);
2362
2438
  }
2363
2439
  /**
2364
- * Hide the general forum topic.
2440
+ * Promote a chat member.
2365
2441
  *
2366
2442
  * @method ch
2367
2443
  * @param chatId The identifier of a chat.
2444
+ * @param userId The identifier of the user to promote.
2368
2445
  */
2369
- async hideGeneralTopic(chatId) {
2370
- return await this.#dispatch("hideGeneralTopic", chatId);
2446
+ async promoteChatMember(chatId, userId, params) {
2447
+ return await this.#dispatch("promoteChatMember", chatId, userId, params);
2371
2448
  }
2372
2449
  /**
2373
- * Show the general forum topic.
2450
+ * Reopen a forum topic.
2374
2451
  *
2375
2452
  * @method ch
2376
2453
  * @param chatId The identifier of a chat.
2454
+ * @param topicId The identifier of the topic.
2377
2455
  */
2378
- async showGeneralTopic(chatId) {
2379
- return await this.#dispatch("showGeneralTopic", chatId);
2456
+ async reopenTopic(chatId, topicId) {
2457
+ return await this.#dispatch("reopenTopic", chatId, topicId);
2380
2458
  }
2381
2459
  /**
2382
- * Close a forum topic.
2460
+ * Report a chat. User-only.
2383
2461
  *
2384
2462
  * @method ch
2385
- * @param chatId The identifier of a chat.
2386
- * @param topicId The identifier of the topic.
2463
+ * @param chatId The identifier of a chat to report.
2464
+ * @param reason The reason of the report.
2387
2465
  */
2388
- async closeTopic(chatId, topicId) {
2389
- return await this.#dispatch("closeTopic", chatId, topicId);
2466
+ async reportChat(chatId, reason, params) {
2467
+ return await this.#dispatch("reportChat", chatId, reason, params);
2390
2468
  }
2391
2469
  /**
2392
- * Reopen a forum topic.
2470
+ * Set a chat's available reactions. User-only.
2393
2471
  *
2394
2472
  * @method ch
2395
2473
  * @param chatId The identifier of a chat.
2396
- * @param topicId The identifier of the topic.
2474
+ * @param availableReactions The new available reactions.
2397
2475
  */
2398
- async reopenTopic(chatId, topicId) {
2399
- return await this.#dispatch("reopenTopic", chatId, topicId);
2476
+ async setAvailableReactions(chatId, availableReactions) {
2477
+ return await this.#dispatch("setAvailableReactions", chatId, availableReactions);
2400
2478
  }
2401
2479
  /**
2402
- * Pin a forum topic.
2480
+ * Set the number of boosts required to circumvent a chat's default restrictions. User-only.
2403
2481
  *
2404
2482
  * @method ch
2405
2483
  * @param chatId The identifier of a chat.
2406
- * @param topicId The identifier of the topic.
2484
+ * @param boosts The number of boosts required to circumvent its restrictions.
2407
2485
  */
2408
- async pinTopic(chatId, topicId) {
2409
- return await this.#dispatch("pinTopic", chatId, topicId);
2486
+ async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
2487
+ return await this.#dispatch("setBoostsRequiredToCircumventRestrictions", chatId, boosts);
2410
2488
  }
2411
2489
  /**
2412
- * Unpin a forum topic.
2490
+ * Change the description of a chat.
2413
2491
  *
2414
2492
  * @method ch
2415
2493
  * @param chatId The identifier of a chat.
2416
- * @param topicId The identifier of the topic.
2494
+ * @param description The new description.
2417
2495
  */
2418
- async unpinTopic(chatId, topicId) {
2419
- return await this.#dispatch("unpinTopic", chatId, topicId);
2496
+ async setChatDescription(chatId, description) {
2497
+ return await this.#dispatch("setChatDescription", chatId, description);
2420
2498
  }
2421
2499
  /**
2422
- * Promote a chat member.
2500
+ * Set the rights of a chat member.
2423
2501
  *
2424
2502
  * @method ch
2425
- * @param chatId The identifier of a chat.
2426
- * @param userId The identifier of the user to promote.
2503
+ * @param chatId The identifier of a chat. Must be a supergroup.
2504
+ * @param memberId The identifier of the member.
2427
2505
  */
2428
- async promoteChatMember(chatId, userId, params) {
2429
- return await this.#dispatch("promoteChatMember", chatId, userId, params);
2506
+ async setChatMemberRights(chatId, memberId, params) {
2507
+ return await this.#dispatch("setChatMemberRights", chatId, memberId, params);
2430
2508
  }
2431
2509
  /**
2432
2510
  * Change the tag of a chat member.
@@ -2439,121 +2517,154 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2439
2517
  return await this.#dispatch("setChatMemberTag", chatId, userId, params);
2440
2518
  }
2441
2519
  /**
2442
- * Enable sharing in a chat. User-only.
2520
+ * Set a chat's photo.
2443
2521
  *
2444
2522
  * @method ch
2445
2523
  * @param chatId The identifier of a chat.
2524
+ * @param photo A photo to set as the chat's photo.
2446
2525
  */
2447
- async enableSharing(chatId) {
2448
- return await this.#dispatch("enableSharing", chatId);
2526
+ async setChatPhoto(chatId, photo, params) {
2527
+ return await this.#dispatch("setChatPhoto", chatId, photo, params);
2449
2528
  }
2450
2529
  /**
2451
- * Disable sharing in a chat. User-only.
2530
+ * Set a chat's sticker set.
2531
+ *
2532
+ * @method ch
2533
+ * @param chatId The identifier of a chat. Must be a supergroup.
2534
+ * @param setName The name of the set.
2535
+ */
2536
+ async setChatStickerSet(chatId, setName) {
2537
+ return await this.#dispatch("setChatStickerSet", chatId, setName);
2538
+ }
2539
+ /**
2540
+ * Change the title of a chat.
2452
2541
  *
2453
2542
  * @method ch
2454
2543
  * @param chatId The identifier of a chat.
2544
+ * @param title The new title.
2455
2545
  */
2456
- async disableSharing(chatId) {
2457
- return await this.#dispatch("disableSharing", chatId);
2546
+ async setChatTitle(chatId, title) {
2547
+ return await this.#dispatch("setChatTitle", chatId, title);
2458
2548
  }
2459
2549
  /**
2460
- * Get recommended channels. User-only.
2550
+ * Set the default send as chat of a chat. User-only.
2461
2551
  *
2462
2552
  * @method ch
2463
- * @returns A list of recommended channels.
2553
+ * @param chatId The identifier of a chat.
2554
+ * @param sendAs The new default send as chat.
2464
2555
  */
2465
- async getRecommendedChannels() {
2466
- return await this.#dispatch("getRecommendedChannels");
2556
+ async setDefaultSendAs(chatId, sendAs) {
2557
+ return await this.#dispatch("setDefaultSendAs", chatId, sendAs);
2467
2558
  }
2468
2559
  /**
2469
- * Get similar channels. User-only.
2560
+ * Set a channel's discussion chat. User-only.
2470
2561
  *
2471
2562
  * @method ch
2472
- * @param chatId The identifier of a channel to get similar channels for.
2473
- * @returns A list of similar channels.
2563
+ * @param chatId The identifier of a channel.
2564
+ * @param discussionChatId The identifier of a chat to use as discussion for the channel.
2474
2565
  */
2475
- async getSimilarChannels(chatId) {
2476
- return await this.#dispatch("getSimilarChannels", chatId);
2566
+ async setDiscussionChat(chatId, discussionChatId) {
2567
+ return await this.#dispatch("setDiscussionChat", chatId, discussionChatId);
2477
2568
  }
2478
2569
  /**
2479
- * Get similar bots. User-only.
2570
+ * Set the time to live of the messages of a chat. User-only.
2480
2571
  *
2481
2572
  * @method ch
2482
- * @param chatId The identifier of a bot to get similar bots for.
2483
- * @returns A list of similar bots.
2573
+ * @param chatId The identifier of a chat.
2574
+ * @param messageTtl The time to live of the messages in seconds.
2484
2575
  */
2485
- async getSimilarBots(chatId) {
2486
- return await this.#dispatch("getSimilarBots", chatId);
2576
+ async setMessageTtl(chatId, messageTtl) {
2577
+ return await this.#dispatch("setMessageTtl", chatId, messageTtl);
2487
2578
  }
2488
2579
  /**
2489
- * Get the count of online members in a chat. User-only.
2580
+ * Change slow mode in a group. User-only.
2581
+ *
2582
+ * @method ch
2583
+ * @param chatId The identifier of the group to change slow mode in.
2584
+ * @param duration New slow mode duration.
2585
+ */
2586
+ async setSlowMode(chatId, duration) {
2587
+ return await this.#dispatch("setSlowMode", chatId, duration);
2588
+ }
2589
+ /**
2590
+ * Show the general forum topic.
2490
2591
  *
2491
2592
  * @method ch
2492
2593
  * @param chatId The identifier of a chat.
2493
- * @returns The count of online members in the chat.
2494
2594
  */
2495
- async getOnlineCount(chatId) {
2496
- return await this.#dispatch("getOnlineCount", chatId);
2595
+ async showGeneralTopic(chatId) {
2596
+ return await this.#dispatch("showGeneralTopic", chatId);
2497
2597
  }
2498
2598
  /**
2499
- * Enable chat history for new members. User-only.
2599
+ * Show the member list of a group to non-admins. User-only.
2500
2600
  *
2501
2601
  * @method ch
2502
- * @param chatId The identifier of a chat.
2602
+ * @param chatId The identifier of the group.
2503
2603
  */
2504
- async enableChatHistoryForNewMembers(chatId) {
2505
- return await this.#dispatch("enableChatHistoryForNewMembers", chatId);
2604
+ async showMemberList(chatId) {
2605
+ return await this.#dispatch("showMemberList", chatId);
2506
2606
  }
2507
2607
  /**
2508
- * Disable chat history for new members. User-only.
2608
+ * Transfer the ownership of a chat. User-only.
2509
2609
  *
2510
2610
  * @method ch
2511
2611
  * @param chatId The identifier of a chat.
2612
+ * @param userId The identifier of the new owner.
2613
+ * @param password The password of the current account.
2512
2614
  */
2513
- async disableChatHistoryForNewMembers(chatId) {
2514
- return await this.#dispatch("disableChatHistoryForNewMembers", chatId);
2615
+ async transferChatOwnership(chatId, userId, password) {
2616
+ return await this.#dispatch("transferChatOwnership", chatId, userId, password);
2515
2617
  }
2516
2618
  /**
2517
- * Set the default send as chat of a chat. User-only.
2619
+ * Unarchive a single chat. User-only.
2518
2620
  *
2519
2621
  * @method ch
2520
2622
  * @param chatId The identifier of a chat.
2521
- * @param sendAs The new default send as chat.
2522
2623
  */
2523
- async setDefaultSendAs(chatId, sendAs) {
2524
- return await this.#dispatch("setDefaultSendAs", chatId, sendAs);
2624
+ async unarchiveChat(chatId) {
2625
+ return await this.#dispatch("unarchiveChat", chatId);
2525
2626
  }
2526
2627
  /**
2527
- * Report a chat. User-only.
2628
+ * Unarchive multiple chats. User-only.
2528
2629
  *
2529
2630
  * @method ch
2530
- * @param chatId The identifier of a chat to report.
2531
- * @param reason The reason of the report.
2631
+ * @param chatIds The identifiers of the chats to unarchive.
2532
2632
  */
2533
- async reportChat(chatId, reason, params) {
2534
- return await this.#dispatch("reportChat", chatId, reason, params);
2633
+ async unarchiveChats(chatIds) {
2634
+ return await this.#dispatch("unarchiveChats", chatIds);
2535
2635
  }
2536
2636
  /**
2537
- * Mark a chat as unread. User-only.
2637
+ * Unban a member from a chat.
2538
2638
  *
2539
2639
  * @method ch
2540
- * @param chatId The identifier of a chat.
2640
+ * @param chatId The identifier of a chat. Must be a supergroup.
2641
+ * @param memberId The identifier of the member.
2541
2642
  */
2542
- async markChatAsUnread(chatId) {
2543
- return await this.#dispatch("markChatAsUnread", chatId);
2643
+ async unbanChatMember(chatId, memberId) {
2644
+ return await this.#dispatch("unbanChatMember", chatId, memberId);
2544
2645
  }
2545
2646
  /**
2546
- * Mark a chat as read. User-only.
2647
+ * Unpin a forum topic.
2547
2648
  *
2548
2649
  * @method ch
2549
2650
  * @param chatId The identifier of a chat.
2651
+ * @param topicId The identifier of the topic.
2550
2652
  */
2551
- async markChatAsRead(chatId) {
2552
- return await this.#dispatch("markChatAsRead", chatId);
2653
+ async unpinTopic(chatId, topicId) {
2654
+ return await this.#dispatch("unpinTopic", chatId, topicId);
2553
2655
  }
2554
2656
  //
2555
2657
  // ========================= CALLBACK QUERIES ========================= //
2556
2658
  //
2659
+ /**
2660
+ * Answer a callback query. Bot-only.
2661
+ *
2662
+ * @method cq
2663
+ * @param id ID of the callback query to answer.
2664
+ */
2665
+ async answerCallbackQuery(id, params) {
2666
+ return await this.#dispatch("answerCallbackQuery", id, params);
2667
+ }
2557
2668
  /**
2558
2669
  * Send a callback query. User-only.
2559
2670
  *
@@ -2567,18 +2678,19 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2567
2678
  async sendCallbackQuery(botId, messageId, question) {
2568
2679
  return await this.#dispatch("sendCallbackQuery", botId, messageId, question);
2569
2680
  }
2681
+ //
2682
+ // ========================= INLINE QUERIES ========================= //
2683
+ //
2570
2684
  /**
2571
- * Answer a callback query. Bot-only.
2685
+ * Answer an inline query. Bot-only.
2572
2686
  *
2573
- * @method cq
2574
- * @param id ID of the callback query to answer.
2687
+ * @method iq
2688
+ * @param id The identifier of the inline query to answer.
2689
+ * @param results The results to answer with.
2575
2690
  */
2576
- async answerCallbackQuery(id, params) {
2577
- return await this.#dispatch("answerCallbackQuery", id, params);
2691
+ async answerInlineQuery(id, results, params) {
2692
+ return await this.#dispatch("answerInlineQuery", id, results, params);
2578
2693
  }
2579
- //
2580
- // ========================= INLINE QUERIES ========================= //
2581
- //
2582
2694
  /**
2583
2695
  * Send an inline query. User-only.
2584
2696
  *
@@ -2591,42 +2703,17 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2591
2703
  async sendInlineQuery(botId, chatId, params) {
2592
2704
  return await this.#dispatch("sendInlineQuery", botId, chatId, params);
2593
2705
  }
2594
- /**
2595
- * Answer an inline query. Bot-only.
2596
- *
2597
- * @method iq
2598
- * @param id The identifier of the inline query to answer.
2599
- * @param results The results to answer with.
2600
- */
2601
- async answerInlineQuery(id, results, params) {
2602
- return await this.#dispatch("answerInlineQuery", id, results, params);
2603
- }
2604
2706
  //
2605
2707
  // ========================= BOTS ========================= //
2606
2708
  //
2607
2709
  /**
2608
- * Set the bot's description in the given language. Bot-only.
2609
- *
2610
- * @method bo
2611
- */
2612
- async setMyDescription(params) {
2613
- return await this.#dispatch("setMyDescription", params);
2614
- }
2615
- /**
2616
- * Set the bot's name in the given language. Bot-only.
2617
- *
2618
- * @method bo
2619
- */
2620
- async setMyName(params) {
2621
- return await this.#dispatch("setMyName", params);
2622
- }
2623
- /**
2624
- * Set the bot's short description in the given language. Bot-only.
2710
+ * Get the bot's commands in the given scope and/or language. Bot-only.
2625
2711
  *
2626
2712
  * @method bo
2713
+ * @returns The current bot's commands in the specified language.
2627
2714
  */
2628
- async setMyShortDescription(params) {
2629
- return await this.#dispatch("setMyShortDescription", params);
2715
+ async getMyCommands(params) {
2716
+ return await this.#dispatch("getMyCommands", params);
2630
2717
  }
2631
2718
  /**
2632
2719
  * Get the bot's description in the given language. Bot-only.
@@ -2665,28 +2752,32 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2665
2752
  return await this.#dispatch("setMyCommands", commands, params);
2666
2753
  }
2667
2754
  /**
2668
- * Get the bot's commands in the given scope and/or language. Bot-only.
2755
+ * Set the bot's description in the given language. Bot-only.
2669
2756
  *
2670
2757
  * @method bo
2671
- * @returns The current bot's commands in the specified language.
2672
2758
  */
2673
- async getMyCommands(params) {
2674
- return await this.#dispatch("getMyCommands", params);
2759
+ async setMyDescription(params) {
2760
+ return await this.#dispatch("setMyDescription", params);
2675
2761
  }
2676
- //
2677
- // ========================= REACTIONS ========================= //
2678
- //
2679
2762
  /**
2680
- * Change reactions made to a message.
2763
+ * Set the bot's name in the given language. Bot-only.
2681
2764
  *
2682
- * @method re
2683
- * @param chatId The identifier of the chat which the message belongs to.
2684
- * @param messageId The identifier of the message to add the reaction to.
2685
- * @param reactions The new reactions.
2765
+ * @method bo
2686
2766
  */
2687
- async setReactions(chatId, messageId, reactions, params) {
2688
- return await this.#dispatch("setReactions", chatId, messageId, reactions, params);
2767
+ async setMyName(params) {
2768
+ return await this.#dispatch("setMyName", params);
2769
+ }
2770
+ /**
2771
+ * Set the bot's short description in the given language. Bot-only.
2772
+ *
2773
+ * @method bo
2774
+ */
2775
+ async setMyShortDescription(params) {
2776
+ return await this.#dispatch("setMyShortDescription", params);
2689
2777
  }
2778
+ //
2779
+ // ========================= REACTIONS ========================= //
2780
+ //
2690
2781
  /**
2691
2782
  * Make a reaction to a message.
2692
2783
  *
@@ -2698,6 +2789,14 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2698
2789
  async addReaction(chatId, messageId, reaction, params) {
2699
2790
  return await this.#dispatch("addReaction", chatId, messageId, reaction, params);
2700
2791
  }
2792
+ /**
2793
+ * Clear recent reactions. User-only.
2794
+ *
2795
+ * @method re
2796
+ */
2797
+ async clearRecentReactions() {
2798
+ return await this.#dispatch("clearRecentReactions");
2799
+ }
2701
2800
  /**
2702
2801
  * Undo a reaction made to a message.
2703
2802
  *
@@ -2731,47 +2830,48 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2731
2830
  return await this.#dispatch("removeUserReactions", chatId, userId);
2732
2831
  }
2733
2832
  /**
2734
- * Clear recent reactions. User-only.
2833
+ * Change reactions made to a message.
2735
2834
  *
2736
2835
  * @method re
2836
+ * @param chatId The identifier of the chat which the message belongs to.
2837
+ * @param messageId The identifier of the message to add the reaction to.
2838
+ * @param reactions The new reactions.
2737
2839
  */
2738
- async clearRecentReactions() {
2739
- return await this.#dispatch("clearRecentReactions");
2840
+ async setReactions(chatId, messageId, reactions, params) {
2841
+ return await this.#dispatch("setReactions", chatId, messageId, reactions, params);
2740
2842
  }
2741
2843
  //
2742
2844
  // ========================= STORIES ========================= //
2743
2845
  //
2744
2846
  /**
2745
- * Create a story. User-only.
2847
+ * Add multiple stories to highlights. User-only.
2746
2848
  *
2747
2849
  * @method st
2748
- * @param content The content of the story.
2749
- * @returns The created story.
2850
+ * @param chatId The identifier of a chat.
2851
+ * @param storyIds The identifiers of the stories to add to highlights.
2750
2852
  */
2751
- async createStory(chatId, content, params) {
2752
- return await this.#dispatch("createStory", chatId, content, params);
2853
+ async addStoriesToHighlights(chatId, storyIds) {
2854
+ return await this.#dispatch("addStoriesToHighlights", chatId, storyIds);
2753
2855
  }
2754
2856
  /**
2755
- * Retrieve multiple stories. User-only.
2857
+ * Add a single story to highlights. User-only.
2756
2858
  *
2757
2859
  * @method st
2758
2860
  * @param chatId The identifier of a chat.
2759
- * @param storyIds The identifiers of the stories to retrieve.
2760
- * @returns The retrieved stories.
2861
+ * @param storyId The identifier of the story to add to highlights.
2761
2862
  */
2762
- async getStories(chatId, storyIds) {
2763
- return await this.#dispatch("getStories", chatId, storyIds);
2863
+ async addStoryToHighlights(chatId, storyId) {
2864
+ return await this.#dispatch("addStoryToHighlights", chatId, storyId);
2764
2865
  }
2765
2866
  /**
2766
- * Retrieve a single story. User-only.
2867
+ * Create a story. User-only.
2767
2868
  *
2768
2869
  * @method st
2769
- * @param chatId The identifier of a chat.
2770
- * @param storyId The identifier of the story to retrieve.
2771
- * @returns The retrieved story.
2870
+ * @param content The content of the story.
2871
+ * @returns The created story.
2772
2872
  */
2773
- async getStory(chatId, storyId) {
2774
- return await this.#dispatch("getStory", chatId, storyId);
2873
+ async createStory(chatId, content, params) {
2874
+ return await this.#dispatch("createStory", chatId, content, params);
2775
2875
  }
2776
2876
  /**
2777
2877
  * Delete multiple stories. User-only.
@@ -2794,24 +2894,26 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2794
2894
  return await this.#dispatch("deleteStory", chatId, storyId);
2795
2895
  }
2796
2896
  /**
2797
- * Add multiple stories to highlights. User-only.
2897
+ * Retrieve multiple stories. User-only.
2798
2898
  *
2799
2899
  * @method st
2800
2900
  * @param chatId The identifier of a chat.
2801
- * @param storyIds The identifiers of the stories to add to highlights.
2901
+ * @param storyIds The identifiers of the stories to retrieve.
2902
+ * @returns The retrieved stories.
2802
2903
  */
2803
- async addStoriesToHighlights(chatId, storyIds) {
2804
- return await this.#dispatch("addStoriesToHighlights", chatId, storyIds);
2904
+ async getStories(chatId, storyIds) {
2905
+ return await this.#dispatch("getStories", chatId, storyIds);
2805
2906
  }
2806
2907
  /**
2807
- * Add a single story to highlights. User-only.
2908
+ * Retrieve a single story. User-only.
2808
2909
  *
2809
2910
  * @method st
2810
2911
  * @param chatId The identifier of a chat.
2811
- * @param storyId The identifier of the story to add to highlights.
2912
+ * @param storyId The identifier of the story to retrieve.
2913
+ * @returns The retrieved story.
2812
2914
  */
2813
- async addStoryToHighlights(chatId, storyId) {
2814
- return await this.#dispatch("addStoryToHighlights", chatId, storyId);
2915
+ async getStory(chatId, storyId) {
2916
+ return await this.#dispatch("getStory", chatId, storyId);
2815
2917
  }
2816
2918
  /**
2817
2919
  * Remove multiple stories from highlights. User-only.
@@ -2833,16 +2935,6 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2833
2935
  async removeStoryFromHighlights(chatId, storyId) {
2834
2936
  return await this.#dispatch("removeStoryFromHighlights", chatId, storyId);
2835
2937
  }
2836
- /**
2837
- * Report a single story. User-only.
2838
- *
2839
- * @method st
2840
- * @param chatId The identifier of a chat that posted the story.
2841
- * @param storyId The identifier of the story to report.
2842
- */
2843
- async reportStory(chatId, storyId, params) {
2844
- return await this.#dispatch("reportStory", chatId, storyId, params);
2845
- }
2846
2938
  /**
2847
2939
  * Report multiple stories. User-only.
2848
2940
  *
@@ -2853,52 +2945,70 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2853
2945
  async reportStories(chatId, storyIds, params) {
2854
2946
  return await this.#dispatch("reportStories", chatId, storyIds, params);
2855
2947
  }
2948
+ /**
2949
+ * Report a single story. User-only.
2950
+ *
2951
+ * @method st
2952
+ * @param chatId The identifier of a chat that posted the story.
2953
+ * @param storyId The identifier of the story to report.
2954
+ */
2955
+ async reportStory(chatId, storyId, params) {
2956
+ return await this.#dispatch("reportStory", chatId, storyId, params);
2957
+ }
2856
2958
  //
2857
2959
  // ========================= STORY ALBUMS ========================= //
2858
2960
  //
2859
2961
  /**
2860
- * Create a story album. User-only.
2962
+ * Add multiple stories to an album. User-only.
2861
2963
  *
2862
2964
  * @method sa
2863
- * @param chatId The identifier of the chat to create the album in.
2864
- * @param name The name of the album.
2865
- * @param storyIds The initial stories inside the album.
2965
+ * @param chatId The identifier of the chat including the album.
2966
+ * @param albumId The identifier of an album.
2967
+ * @param storyIds The identifiers of the stories to add.
2866
2968
  */
2867
- async createStoryAlbum(chatId, name, storyIds) {
2868
- return await this.#dispatch("createStoryAlbum", chatId, name, storyIds);
2969
+ async addStoriesToAlbum(chatId, albumId, storyIds) {
2970
+ return await this.#dispatch("addStoriesToAlbum", chatId, albumId, storyIds);
2869
2971
  }
2870
2972
  /**
2871
- * Set the name of a story album. User-only.
2973
+ * Add a single story to an album. User-only.
2872
2974
  *
2873
2975
  * @method sa
2874
2976
  * @param chatId The identifier of the chat including the album.
2875
- * @param albumId The identifier of the album to rename.
2876
- * @param name The new name of the album.
2977
+ * @param albumId The identifier of an album.
2978
+ * @param storyId The identifier of the story to add.
2979
+ */
2980
+ async addStoryToAlbum(chatId, albumId, storyId) {
2981
+ return await this.#dispatch("addStoryToAlbum", chatId, albumId, storyId);
2982
+ }
2983
+ /**
2984
+ * Create a story album. User-only.
2985
+ *
2986
+ * @method sa
2987
+ * @param chatId The identifier of the chat to create the album in.
2988
+ * @param name The name of the album.
2989
+ * @param storyIds The initial stories inside the album.
2877
2990
  */
2878
- async setStoryAlbumName(chatId, albumId, name) {
2879
- return await this.#dispatch("setStoryAlbumName", chatId, albumId, name);
2991
+ async createStoryAlbum(chatId, name, storyIds) {
2992
+ return await this.#dispatch("createStoryAlbum", chatId, name, storyIds);
2880
2993
  }
2881
2994
  /**
2882
- * Add multiple stories to an album. User-only.
2995
+ * Get stories inside an album. User-only.
2883
2996
  *
2884
2997
  * @method sa
2885
- * @param chatId The identifier of the chat including the album.
2998
+ * @param chatId The identifier of the chat including albums.
2886
2999
  * @param albumId The identifier of an album.
2887
- * @param storyIds The identifiers of the stories to add.
2888
3000
  */
2889
- async addStoriesToAlbum(chatId, albumId, storyIds) {
2890
- return await this.#dispatch("addStoriesToAlbum", chatId, albumId, storyIds);
3001
+ async getStoriesInAlbum(chatId, albumId) {
3002
+ return await this.#dispatch("getStoriesInAlbum", chatId, albumId);
2891
3003
  }
2892
3004
  /**
2893
- * Add a single story to an album. User-only.
3005
+ * Get story albums in a chat. User-only.
2894
3006
  *
2895
3007
  * @method sa
2896
- * @param chatId The identifier of the chat including the album.
2897
- * @param albumId The identifier of an album.
2898
- * @param storyId The identifier of the story to add.
3008
+ * @param chatId The identifier of a chat including albums.
2899
3009
  */
2900
- async addStoryToAlbum(chatId, albumId, storyId) {
2901
- return await this.#dispatch("addStoryToAlbum", chatId, albumId, storyId);
3010
+ async getStoryAlbums(chatId) {
3011
+ return await this.#dispatch("getStoryAlbums", chatId);
2902
3012
  }
2903
3013
  /**
2904
3014
  * Remove multiple stories from an album. User-only.
@@ -2934,23 +3044,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2934
3044
  return await this.#dispatch("reorderStoriesInAlbum", chatId, albumId, storyIds);
2935
3045
  }
2936
3046
  /**
2937
- * Get story albums in a chat. User-only.
2938
- *
2939
- * @method sa
2940
- * @param chatId The identifier of a chat including albums.
2941
- */
2942
- async getStoryAlbums(chatId) {
2943
- return await this.#dispatch("getStoryAlbums", chatId);
2944
- }
2945
- /**
2946
- * Get stories inside an album. User-only.
3047
+ * Set the name of a story album. User-only.
2947
3048
  *
2948
3049
  * @method sa
2949
- * @param chatId The identifier of the chat including albums.
2950
- * @param albumId The identifier of an album.
3050
+ * @param chatId The identifier of the chat including the album.
3051
+ * @param albumId The identifier of the album to rename.
3052
+ * @param name The new name of the album.
2951
3053
  */
2952
- async getStoriesInAlbum(chatId, albumId) {
2953
- return await this.#dispatch("getStoriesInAlbum", chatId, albumId);
3054
+ async setStoryAlbumName(chatId, albumId, name) {
3055
+ return await this.#dispatch("setStoryAlbumName", chatId, albumId, name);
2954
3056
  }
2955
3057
  //
2956
3058
  // ========================= NETWORK STATISTICS ========================= //
@@ -2967,85 +3069,85 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
2967
3069
  // ========================= VIDEO CHATS ========================= //
2968
3070
  //
2969
3071
  /**
2970
- * Start a video chat. User-only.
3072
+ * Download a live stream segment. User-only.
2971
3073
  *
2972
3074
  * @method vc
2973
- * @param chatId The identifier of a chat to start the video chat in.
2974
- * @returns The started video chat.
3075
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3076
+ * @param channelId Stream channel ID.
3077
+ * @param scale Stream channel scale.
3078
+ * @param timestamp Millisecond timestamp of the chunk to download.
2975
3079
  */
2976
- async startVideoChat(chatId, params) {
2977
- return await this.#dispatch("startVideoChat", chatId, params);
3080
+ async downloadLiveStreamSegment(id, channelId, scale, timestamp, params) {
3081
+ return await this.#dispatch("downloadLiveStreamSegment", id, channelId, scale, timestamp, params);
2978
3082
  }
2979
3083
  /**
2980
- * Schedule a video chat. User-only.
3084
+ * Get live stream channels. User-only.
2981
3085
  *
2982
3086
  * @method vc
2983
- * @param chatId The identifier of a chat to schedule the video chat in.
2984
- * @param startAt A point in time in the future when the video chat will be started.
2985
- * @returns The scheduled video chat.
3087
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2986
3088
  */
2987
- async scheduleVideoChat(chatId, startAt, params) {
2988
- return await this.#dispatch("scheduleVideoChat", chatId, startAt, params);
3089
+ async getLiveStreamChannels(id) {
3090
+ return await this.#dispatch("getLiveStreamChannels", id);
2989
3091
  }
2990
3092
  /**
2991
- * Join a video chat. User-only.
3093
+ * Get a video chat. User-only.
2992
3094
  *
2993
3095
  * @method vc
2994
3096
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2995
- * @param params_ WebRTC connection parameters.
2996
- * @returns Parameters to be passed to the used WebRTC library.
3097
+ * @cache
2997
3098
  */
2998
- async joinVideoChat(id, params_, params) {
2999
- return await this.#dispatch("joinVideoChat", id, params_, params);
3099
+ async getVideoChat(id) {
3100
+ return await this.#dispatch("getVideoChat", id);
3000
3101
  }
3001
3102
  /**
3002
- * Leave a video chat. User-only.
3103
+ * Join a live stream. User-only.
3003
3104
  *
3004
3105
  * @method vc
3005
3106
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3006
3107
  */
3007
- async leaveVideoChat(id) {
3008
- return await this.#dispatch("leaveVideoChat", id);
3108
+ async joinLiveStream(id) {
3109
+ return await this.#dispatch("joinLiveStream", id);
3009
3110
  }
3010
3111
  /**
3011
- * Join a live stream. User-only.
3112
+ * Join a video chat. User-only.
3012
3113
  *
3013
3114
  * @method vc
3014
3115
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3116
+ * @param params_ WebRTC connection parameters.
3117
+ * @returns Parameters to be passed to the used WebRTC library.
3015
3118
  */
3016
- async joinLiveStream(id) {
3017
- return await this.#dispatch("joinLiveStream", id);
3119
+ async joinVideoChat(id, params_, params) {
3120
+ return await this.#dispatch("joinVideoChat", id, params_, params);
3018
3121
  }
3019
3122
  /**
3020
- * Get a video chat. User-only.
3123
+ * Leave a video chat. User-only.
3021
3124
  *
3022
3125
  * @method vc
3023
3126
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3024
- * @cache
3025
3127
  */
3026
- async getVideoChat(id) {
3027
- return await this.#dispatch("getVideoChat", id);
3128
+ async leaveVideoChat(id) {
3129
+ return await this.#dispatch("leaveVideoChat", id);
3028
3130
  }
3029
3131
  /**
3030
- * Get live stream channels. User-only.
3132
+ * Schedule a video chat. User-only.
3031
3133
  *
3032
3134
  * @method vc
3033
- * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3135
+ * @param chatId The identifier of a chat to schedule the video chat in.
3136
+ * @param startAt A point in time in the future when the video chat will be started.
3137
+ * @returns The scheduled video chat.
3034
3138
  */
3035
- async getLiveStreamChannels(id) {
3036
- return await this.#dispatch("getLiveStreamChannels", id);
3139
+ async scheduleVideoChat(chatId, startAt, params) {
3140
+ return await this.#dispatch("scheduleVideoChat", chatId, startAt, params);
3037
3141
  }
3038
3142
  /**
3039
- * Download a live stream segment. User-only.
3143
+ * Start a video chat. User-only.
3040
3144
  *
3041
3145
  * @method vc
3042
- * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3043
- * @param channelId Stream channel ID.
3044
- * @param scale Stream channel scale.
3045
- * @param timestamp Millisecond timestamp of the chunk to download.
3146
+ * @param chatId The identifier of a chat to start the video chat in.
3147
+ * @returns The started video chat.
3046
3148
  */
3047
- async downloadLiveStreamSegment(id, channelId, scale, timestamp, params) {
3048
- return await this.#dispatch("downloadLiveStreamSegment", id, channelId, scale, timestamp, params);
3149
+ async startVideoChat(chatId, params) {
3150
+ return await this.#dispatch("startVideoChat", chatId, params);
3049
3151
  }
3050
3152
  //
3051
3153
  // ========================= PAYMENTS ========================= //
@@ -3061,23 +3163,22 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3061
3163
  return await this.#dispatch("answerPreCheckoutQuery", preCheckoutQueryId, ok, params);
3062
3164
  }
3063
3165
  /**
3064
- * Refund a star payment. Bot-only.
3166
+ * Get the star balance of a chat.
3065
3167
  *
3066
3168
  * @method pa
3067
- * @param userId The identifier of the user that was charged.
3068
- * @param telegramPaymentChargeId The identifier of the charge.
3169
+ * @param chatId The identifier of the chat to get the star balance for.
3069
3170
  */
3070
- async refundStarPayment(userId, telegramPaymentChargeId) {
3071
- return await this.#dispatch("refundStarPayment", userId, telegramPaymentChargeId);
3171
+ async getStarBalance(chatId) {
3172
+ return await this.#dispatch("getStarBalance", chatId);
3072
3173
  }
3073
3174
  /**
3074
- * Get the star balance of a chat.
3175
+ * Get star transactions.
3075
3176
  *
3076
3177
  * @method pa
3077
- * @param chatId The identifier of the chat to get the star balance for.
3178
+ * @param chatId The identifier of the chat to get star transactions for.
3078
3179
  */
3079
- async getStarBalance(chatId) {
3080
- return await this.#dispatch("getStarBalance", chatId);
3180
+ async getStarTransactions(chatId, params) {
3181
+ return await this.#dispatch("getStarTransactions", chatId, params);
3081
3182
  }
3082
3183
  /**
3083
3184
  * Get the TON balance of a chat.
@@ -3089,52 +3190,53 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3089
3190
  return await this.#dispatch("getTonBalance", chatId);
3090
3191
  }
3091
3192
  /**
3092
- * Get star transactions.
3193
+ * Refund a star payment. Bot-only.
3093
3194
  *
3094
3195
  * @method pa
3095
- * @param chatId The identifier of the chat to get star transactions for.
3196
+ * @param userId The identifier of the user that was charged.
3197
+ * @param telegramPaymentChargeId The identifier of the charge.
3096
3198
  */
3097
- async getStarTransactions(chatId, params) {
3098
- return await this.#dispatch("getStarTransactions", chatId, params);
3199
+ async refundStarPayment(userId, telegramPaymentChargeId) {
3200
+ return await this.#dispatch("refundStarPayment", userId, telegramPaymentChargeId);
3099
3201
  }
3100
3202
  //
3101
3203
  // ========================= CONTACTS ========================= //
3102
3204
  //
3103
3205
  /**
3104
- * Get contacts. User-only.
3206
+ * Add a contact. User-only.
3105
3207
  *
3106
3208
  * @method co
3209
+ * @param userId The identifier of the user to add as contact.
3210
+ * @param firstName The contact's first name.
3107
3211
  */
3108
- async getContacts() {
3109
- return await this.#dispatch("getContacts");
3212
+ async addContact(userId, firstName, params) {
3213
+ await this.#dispatch("addContact", userId, firstName, params);
3110
3214
  }
3111
3215
  /**
3112
- * Delete multiple contacts. User-only.
3216
+ * Delete a single contact. User-only.
3113
3217
  *
3114
3218
  * @method co
3115
- * @param userIds The identifiers of contacts to delete.
3219
+ * @param userId The identifier of the contact to delete.
3116
3220
  */
3117
- async deleteContacts(userIds) {
3118
- return await this.#dispatch("deleteContacts", userIds);
3221
+ async deleteContact(userId) {
3222
+ return await this.#dispatch("deleteContact", userId);
3119
3223
  }
3120
3224
  /**
3121
- * Delete a single contact. User-only.
3225
+ * Delete multiple contacts. User-only.
3122
3226
  *
3123
3227
  * @method co
3124
- * @param userId The identifier of the contact to delete.
3228
+ * @param userIds The identifiers of contacts to delete.
3125
3229
  */
3126
- async deleteContact(userId) {
3127
- return await this.#dispatch("deleteContact", userId);
3230
+ async deleteContacts(userIds) {
3231
+ return await this.#dispatch("deleteContacts", userIds);
3128
3232
  }
3129
3233
  /**
3130
- * Add a contact. User-only.
3234
+ * Get contacts. User-only.
3131
3235
  *
3132
3236
  * @method co
3133
- * @param userId The identifier of the user to add as contact.
3134
- * @param firstName The contact's first name.
3135
3237
  */
3136
- async addContact(userId, firstName, params) {
3137
- await this.#dispatch("addContact", userId, firstName, params);
3238
+ async getContacts() {
3239
+ return await this.#dispatch("getContacts");
3138
3240
  }
3139
3241
  /**
3140
3242
  * Set a contact note.
@@ -3161,12 +3263,13 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3161
3263
  // ========================= GIFTS ========================= //
3162
3264
  //
3163
3265
  /**
3164
- * Get available gifts.
3266
+ * Craft gifts.
3165
3267
  *
3166
3268
  * @method gf
3269
+ * @param gifts The gifts to craft.
3167
3270
  */
3168
- async getGifts() {
3169
- return await this.#dispatch("getGifts");
3271
+ async craftGifts(gifts) {
3272
+ return await this.#dispatch("craftGifts", gifts);
3170
3273
  }
3171
3274
  /**
3172
3275
  * Get gifts claimed by a user or a channel. User-only.
@@ -3178,73 +3281,74 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3178
3281
  return await this.#dispatch("getClaimedGifts", chatId, params);
3179
3282
  }
3180
3283
  /**
3181
- * Send a gift.
3284
+ * Get a gift using its slug.
3182
3285
  *
3183
3286
  * @method gf
3184
- * @param chatId The identifier of a user or a channel to send the gift to.
3185
- * @param giftId The identifier of the gift to send.
3287
+ * @param slug The slug of a gift.
3186
3288
  */
3187
- async sendGift(chatId, giftId, params) {
3188
- return await this.#dispatch("sendGift", chatId, giftId, params);
3289
+ async getGift(slug) {
3290
+ return await this.#dispatch("getGift", slug);
3189
3291
  }
3190
3292
  /**
3191
- * Sell a gift.
3293
+ * Get available gifts.
3192
3294
  *
3193
3295
  * @method gf
3194
- * @param gift The gift to sell.
3195
3296
  */
3196
- async sellGift(gift) {
3197
- return await this.#dispatch("sellGift", gift);
3297
+ async getGifts() {
3298
+ return await this.#dispatch("getGifts");
3198
3299
  }
3199
3300
  /**
3200
- * Craft gifts.
3301
+ * Gift a Telegram Premium subscription. Bot-only.
3201
3302
  *
3202
3303
  * @method gf
3203
- * @param gifts The gifts to craft.
3304
+ * @param userId The identifier of a user to gift the Telegram Premium subscription to.
3305
+ * @param duration The duration of the subscription.
3204
3306
  */
3205
- async craftGifts(gifts) {
3206
- return await this.#dispatch("craftGifts", gifts);
3307
+ async giftPremiumSubscription(userId, duration, params) {
3308
+ return await this.#dispatch("giftPremiumSubscription", userId, duration, params);
3207
3309
  }
3208
3310
  /**
3209
- * Get a gift using its slug.
3311
+ * Sell a gift.
3210
3312
  *
3211
3313
  * @method gf
3212
- * @param slug The slug of a gift.
3314
+ * @param gift The gift to sell.
3213
3315
  */
3214
- async getGift(slug) {
3215
- return await this.#dispatch("getGift", slug);
3316
+ async sellGift(gift) {
3317
+ return await this.#dispatch("sellGift", gift);
3216
3318
  }
3217
3319
  /**
3218
- * Transfer a gift. User-only.
3320
+ * Send a gift.
3219
3321
  *
3220
3322
  * @method gf
3221
- * @param chatId The identifier of a chat to transfer the gift to.
3222
- * @param gift The gift to transfer.
3323
+ * @param chatId The identifier of a user or a channel to send the gift to.
3324
+ * @param giftId The identifier of the gift to send.
3223
3325
  */
3224
- async transferGift(chatId, gift) {
3225
- return await this.#dispatch("transferGift", chatId, gift);
3326
+ async sendGift(chatId, giftId, params) {
3327
+ return await this.#dispatch("sendGift", chatId, giftId, params);
3226
3328
  }
3227
3329
  /**
3228
- * Gift a Telegram Premium subscription. Bot-only.
3330
+ * Transfer a gift. User-only.
3229
3331
  *
3230
3332
  * @method gf
3231
- * @param userId The identifier of a user to gift the Telegram Premium subscription to.
3232
- * @param duration The duration of the subscription.
3333
+ * @param chatId The identifier of a chat to transfer the gift to.
3334
+ * @param gift The gift to transfer.
3233
3335
  */
3234
- async giftPremiumSubscription(userId, duration, params) {
3235
- return await this.#dispatch("giftPremiumSubscription", userId, duration, params);
3336
+ async transferGift(chatId, gift) {
3337
+ return await this.#dispatch("transferGift", chatId, gift);
3236
3338
  }
3237
3339
  //
3238
3340
  // ========================= GIFT COLLECTIONS ========================= //
3239
3341
  //
3240
3342
  /**
3241
- * Get gift collections of a chat. User-only.
3343
+ * Add gifts to a gift collection. User-only.
3242
3344
  *
3243
3345
  * @method gc
3244
- * @param chatId The identifier of a chat to get gift collections for.
3346
+ * @param chatId The identifier of the chat that includes the gift collection.
3347
+ * @param collectionId The identifier of a gift collection.
3348
+ * @param gifts The gifts to add to the collection.
3245
3349
  */
3246
- async getGiftCollections(chatId) {
3247
- return await this.#dispatch("getGiftCollections", chatId);
3350
+ async addGiftsToCollection(chatId, collectionId, gifts) {
3351
+ return await this.#dispatch("addGiftsToCollection", chatId, collectionId, gifts);
3248
3352
  }
3249
3353
  /**
3250
3354
  * Create a gift collection. User-only.
@@ -3258,26 +3362,23 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3258
3362
  return await this.#dispatch("createGiftCollection", chatId, name, gifts);
3259
3363
  }
3260
3364
  /**
3261
- * Set the name of a gift collection. User-only.
3365
+ * Delete a gift collection. User-only.
3262
3366
  *
3263
3367
  * @method gc
3264
3368
  * @param chatId The identifier of the chat that includes the gift collection.
3265
3369
  * @param collectionId The identifier of a gift collection.
3266
- * @param name The gift collection's new name.
3267
3370
  */
3268
- async setGiftCollectionName(chatId, collectionId, name) {
3269
- return await this.#dispatch("setGiftCollectionName", chatId, collectionId, name);
3371
+ async deleteGiftCollection(chatId, collectionId) {
3372
+ return await this.#dispatch("deleteGiftCollection", chatId, collectionId);
3270
3373
  }
3271
3374
  /**
3272
- * Add gifts to a gift collection. User-only.
3375
+ * Get gift collections of a chat. User-only.
3273
3376
  *
3274
3377
  * @method gc
3275
- * @param chatId The identifier of the chat that includes the gift collection.
3276
- * @param collectionId The identifier of a gift collection.
3277
- * @param gifts The gifts to add to the collection.
3378
+ * @param chatId The identifier of a chat to get gift collections for.
3278
3379
  */
3279
- async addGiftsToCollection(chatId, collectionId, gifts) {
3280
- return await this.#dispatch("addGiftsToCollection", chatId, collectionId, gifts);
3380
+ async getGiftCollections(chatId) {
3381
+ return await this.#dispatch("getGiftCollections", chatId);
3281
3382
  }
3282
3383
  /**
3283
3384
  * Remove gifts from a gift collection. User-only.
@@ -3302,27 +3403,19 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3302
3403
  return await this.#dispatch("reorderGiftsInCollection", chatId, collectionId, gifts);
3303
3404
  }
3304
3405
  /**
3305
- * Delete a gift collection. User-only.
3406
+ * Set the name of a gift collection. User-only.
3306
3407
  *
3307
3408
  * @method gc
3308
3409
  * @param chatId The identifier of the chat that includes the gift collection.
3309
3410
  * @param collectionId The identifier of a gift collection.
3411
+ * @param name The gift collection's new name.
3310
3412
  */
3311
- async deleteGiftCollection(chatId, collectionId) {
3312
- return await this.#dispatch("deleteGiftCollection", chatId, collectionId);
3413
+ async setGiftCollectionName(chatId, collectionId, name) {
3414
+ return await this.#dispatch("setGiftCollectionName", chatId, collectionId, name);
3313
3415
  }
3314
3416
  //
3315
3417
  // ========================= TAKEOUTS ========================= //
3316
3418
  //
3317
- /**
3318
- * Start a takeout session. User-only.
3319
- *
3320
- * @method to
3321
- * @returns The identifier of the takeout session.
3322
- */
3323
- async startTakeoutSession(params) {
3324
- return await this.#dispatch("startTakeoutSession", params);
3325
- }
3326
3419
  /**
3327
3420
  * End a takeout session. User-only.
3328
3421
  *
@@ -3341,26 +3434,37 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3341
3434
  async getLeftChannels(takeoutId, params) {
3342
3435
  return await this.#dispatch("getLeftChannels", takeoutId, params);
3343
3436
  }
3437
+ /**
3438
+ * Start a takeout session. User-only.
3439
+ *
3440
+ * @method to
3441
+ * @returns The identifier of the takeout session.
3442
+ */
3443
+ async startTakeoutSession(params) {
3444
+ return await this.#dispatch("startTakeoutSession", params);
3445
+ }
3344
3446
  //
3345
3447
  // ========================= STICKER SETS ========================= //
3346
3448
  //
3347
3449
  /**
3348
- * Get a sticker set.
3450
+ * Add a sticker to a sticker set.
3349
3451
  *
3350
3452
  * @method ss
3351
3453
  * @param slug The slug of the sticker set or its link.
3454
+ * @param sticker The sticker to add.
3352
3455
  */
3353
- async getStickerSet(slug) {
3354
- return await this.#dispatch("getStickerSet", slug);
3456
+ async addStickerToStickerSet(slug, sticker, params) {
3457
+ return await this.#dispatch("addStickerToStickerSet", slug, sticker, params);
3355
3458
  }
3356
3459
  /**
3357
- * Get a dice sticker set.
3460
+ * Change the position of a sticker in its set.
3358
3461
  *
3359
3462
  * @method ss
3360
- * @param emoji The emoji of the dice.
3463
+ * @param fileId The identifier of the sticker.
3464
+ * @param position The new position of the sticker.
3361
3465
  */
3362
- async getDiceStickerSet(emoji) {
3363
- return await this.#dispatch("getDiceStickerSet", emoji);
3466
+ async changeStickerPositionInStickerSet(fileId, position) {
3467
+ return await this.#dispatch("changeStickerPositionInStickerSet", fileId, position);
3364
3468
  }
3365
3469
  /**
3366
3470
  * Check the availability of a sticker set slug.
@@ -3372,16 +3476,6 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3372
3476
  async checkStickerSetSlug(slug) {
3373
3477
  return await this.#dispatch("checkStickerSetSlug", slug);
3374
3478
  }
3375
- /**
3376
- * Suggest a sticker set slug from its title.
3377
- *
3378
- * @method ss
3379
- * @param title A title of a sticker set.
3380
- * @returns The suggested slug.
3381
- */
3382
- async suggestStickerSetSlug(title) {
3383
- return await this.#dispatch("suggestStickerSetSlug", title);
3384
- }
3385
3479
  /**
3386
3480
  * Create a sticker set.
3387
3481
  *
@@ -3394,14 +3488,31 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3394
3488
  return await this.#dispatch("createStickerSet", name, slug, stickers, params);
3395
3489
  }
3396
3490
  /**
3397
- * Add a sticker to a sticker set.
3491
+ * Delete a sticker set.
3398
3492
  *
3399
3493
  * @method ss
3400
3494
  * @param slug The slug of the sticker set or its link.
3401
- * @param sticker The sticker to add.
3402
3495
  */
3403
- async addStickerToStickerSet(slug, sticker, params) {
3404
- return await this.#dispatch("addStickerToStickerSet", slug, sticker, params);
3496
+ async deleteStickerSet(slug) {
3497
+ return await this.#dispatch("deleteStickerSet", slug);
3498
+ }
3499
+ /**
3500
+ * Get a dice sticker set.
3501
+ *
3502
+ * @method ss
3503
+ * @param emoji The emoji of the dice.
3504
+ */
3505
+ async getDiceStickerSet(emoji) {
3506
+ return await this.#dispatch("getDiceStickerSet", emoji);
3507
+ }
3508
+ /**
3509
+ * Get a sticker set.
3510
+ *
3511
+ * @method ss
3512
+ * @param slug The slug of the sticker set or its link.
3513
+ */
3514
+ async getStickerSet(slug) {
3515
+ return await this.#dispatch("getStickerSet", slug);
3405
3516
  }
3406
3517
  /**
3407
3518
  * Remove a sticker from its set.
@@ -3433,57 +3544,57 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3433
3544
  return await this.#dispatch("replaceStickerInStickerSet", currentStickerFileId, newSticker, params);
3434
3545
  }
3435
3546
  /**
3436
- * Delete a sticker set.
3547
+ * Set a custom emoji as a sticker set's thumbnail.
3437
3548
  *
3438
3549
  * @method ss
3439
3550
  * @param slug The slug of the sticker set or its link.
3551
+ * @param customEmojiId The identifier of the custom emoji to use as thumbnail.
3440
3552
  */
3441
- async deleteStickerSet(slug) {
3442
- return await this.#dispatch("deleteStickerSet", slug);
3553
+ async setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId) {
3554
+ return await this.#dispatch("setCustomEmojiAsStickerSetThumbnail", slug, customEmojiId);
3443
3555
  }
3444
3556
  /**
3445
- * Set the title of a sticker set.
3557
+ * Set a sticker set's thumbnail.
3446
3558
  *
3447
3559
  * @method ss
3448
3560
  * @param slug The slug of the sticker set or its link.
3449
- * @param title The sticker set's new title.
3450
- */
3451
- async setStickerSetTitle(slug, title) {
3452
- return await this.#dispatch("setStickerSetTitle", slug, title);
3453
- }
3454
- /**
3455
- * Change the position of a sticker in its set.
3456
- *
3457
- * @method ss
3458
- * @param fileId The identifier of the sticker.
3459
- * @param position The new position of the sticker.
3561
+ * @param thumbnail The new thumbnail of the sticker set.
3460
3562
  */
3461
- async changeStickerPositionInStickerSet(fileId, position) {
3462
- return await this.#dispatch("changeStickerPositionInStickerSet", fileId, position);
3563
+ async setStickerSetThumbnail(slug, thumbnail) {
3564
+ return await this.#dispatch("setStickerSetThumbnail", slug, thumbnail);
3463
3565
  }
3464
3566
  /**
3465
- * Set a sticker set's thumbnail.
3567
+ * Set the title of a sticker set.
3466
3568
  *
3467
3569
  * @method ss
3468
3570
  * @param slug The slug of the sticker set or its link.
3469
- * @param thumbnail The new thumbnail of the sticker set.
3571
+ * @param title The sticker set's new title.
3470
3572
  */
3471
- async setStickerSetThumbnail(slug, thumbnail) {
3472
- return await this.#dispatch("setStickerSetThumbnail", slug, thumbnail);
3573
+ async setStickerSetTitle(slug, title) {
3574
+ return await this.#dispatch("setStickerSetTitle", slug, title);
3473
3575
  }
3474
3576
  /**
3475
- * Set a custom emoji as a sticker set's thumbnail.
3577
+ * Suggest a sticker set slug from its title.
3476
3578
  *
3477
3579
  * @method ss
3478
- * @param slug The slug of the sticker set or its link.
3479
- * @param customEmojiId The identifier of the custom emoji to use as thumbnail.
3580
+ * @param title A title of a sticker set.
3581
+ * @returns The suggested slug.
3480
3582
  */
3481
- async setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId) {
3482
- return await this.#dispatch("setCustomEmojiAsStickerSetThumbnail", slug, customEmojiId);
3583
+ async suggestStickerSetSlug(title) {
3584
+ return await this.#dispatch("suggestStickerSetSlug", title);
3483
3585
  }
3484
3586
  //
3485
3587
  // ========================= MANAGED BOTS ========================= //
3486
3588
  //
3589
+ /**
3590
+ * Set the access settings of a managed bot. Bot-only.
3591
+ *
3592
+ * @method mb
3593
+ * @param userId The identifier of the bot user.
3594
+ */
3595
+ async getManagedBotAccessSettings(userId) {
3596
+ return await this.#dispatch("getManagedBotAccessSettings", userId);
3597
+ }
3487
3598
  /**
3488
3599
  * Get the token of a managed bot. Bot-only.
3489
3600
  *
@@ -3514,15 +3625,6 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3514
3625
  async setManagedBotAccessSettings(userId, isAccessRestricted, params) {
3515
3626
  return await this.#dispatch("setManagedBotAccessSettings", userId, isAccessRestricted, params);
3516
3627
  }
3517
- /**
3518
- * Set the access settings of a managed bot. Bot-only.
3519
- *
3520
- * @method mb
3521
- * @param userId The identifier of the bot user.
3522
- */
3523
- async getManagedBotAccessSettings(userId) {
3524
- return await this.#dispatch("getManagedBotAccessSettings", userId);
3525
- }
3526
3628
  //
3527
3629
  // ========================= GUEST QUERIES ========================= //
3528
3630
  //
@@ -3539,15 +3641,6 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3539
3641
  //
3540
3642
  // ========================= SECRET CHATS ========================= //
3541
3643
  //
3542
- /**
3543
- * Request a secret chat. User-only.
3544
- *
3545
- * @method sc
3546
- * @param chatId The identifier of a chat.
3547
- */
3548
- async requestSecretChat(chatId) {
3549
- return await this.#dispatch("requestSecretChat", chatId);
3550
- }
3551
3644
  /**
3552
3645
  * Accept a secret chat. User-only.
3553
3646
  *
@@ -3567,38 +3660,43 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3567
3660
  return await this.#dispatch("endSecretChat", id, params);
3568
3661
  }
3569
3662
  /**
3570
- * Send a message to a secret chat. User-only.
3663
+ * Request a secret chat. User-only.
3664
+ *
3665
+ * @method sc
3666
+ * @param chatId The identifier of a chat.
3667
+ */
3668
+ async requestSecretChat(chatId) {
3669
+ return await this.#dispatch("requestSecretChat", chatId);
3670
+ }
3671
+ /**
3672
+ * Send an animation to a secret chat. User-only.
3571
3673
  *
3572
3674
  * @method sc
3573
3675
  * @param id The identifier of the secret chat.
3574
- * @param text The message's text.
3676
+ * @param animation The animation to send.
3575
3677
  */
3576
- async sendSecretMessage(id, text, params) {
3577
- return await this.#dispatch("sendSecretMessage", id, text, params);
3678
+ async sendSecretAnimation(id, animation, params) {
3679
+ return await this.#dispatch("sendSecretAnimation", id, animation, params);
3578
3680
  }
3579
3681
  /**
3580
- * Send a location to a secret chat. User-only.
3682
+ * Send an audio file to a secret chat. User-only.
3581
3683
  *
3582
3684
  * @method sc
3583
3685
  * @param id The identifier of the secret chat.
3584
- * @param latitude The location's latitude.
3585
- * @param longitude The location's longitude.
3686
+ * @param audio The audio file to send.
3586
3687
  */
3587
- async sendSecretLocation(id, latitude, longitude, params) {
3588
- return await this.#dispatch("sendSecretLocation", id, latitude, longitude, params);
3688
+ async sendSecretAudio(id, audio, params) {
3689
+ return await this.#dispatch("sendSecretAudio", id, audio, params);
3589
3690
  }
3590
3691
  /**
3591
- * Send a venue to a secret chat. User-only.
3692
+ * Send a secret chat action. User-only.
3592
3693
  *
3593
3694
  * @method sc
3594
3695
  * @param id The identifier of the secret chat.
3595
- * @param latitude The latitude of the venue.
3596
- * @param longitude The longitude of the venue.
3597
- * @param title The title of the venue.
3598
- * @param address The written address of the venue.
3696
+ * @param action The type of action to send.
3599
3697
  */
3600
- async sendSecretVenue(id, latitude, longitude, title, address, params) {
3601
- return await this.#dispatch("sendSecretVenue", id, latitude, longitude, title, address, params);
3698
+ async sendSecretChatAction(id, action) {
3699
+ return await this.#dispatch("sendSecretChatAction", id, action);
3602
3700
  }
3603
3701
  /**
3604
3702
  * Send a contact to a secret chat. User-only.
@@ -3621,6 +3719,27 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3621
3719
  async sendSecretDocument(id, document, params) {
3622
3720
  return await this.#dispatch("sendSecretDocument", id, document, params);
3623
3721
  }
3722
+ /**
3723
+ * Send a location to a secret chat. User-only.
3724
+ *
3725
+ * @method sc
3726
+ * @param id The identifier of the secret chat.
3727
+ * @param latitude The location's latitude.
3728
+ * @param longitude The location's longitude.
3729
+ */
3730
+ async sendSecretLocation(id, latitude, longitude, params) {
3731
+ return await this.#dispatch("sendSecretLocation", id, latitude, longitude, params);
3732
+ }
3733
+ /**
3734
+ * Send a message to a secret chat. User-only.
3735
+ *
3736
+ * @method sc
3737
+ * @param id The identifier of the secret chat.
3738
+ * @param text The message's text.
3739
+ */
3740
+ async sendSecretMessage(id, text, params) {
3741
+ return await this.#dispatch("sendSecretMessage", id, text, params);
3742
+ }
3624
3743
  /**
3625
3744
  * Send a photo to a secret chat. User-only.
3626
3745
  *
@@ -3632,64 +3751,67 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
3632
3751
  return await this.#dispatch("sendSecretPhoto", id, photo, params);
3633
3752
  }
3634
3753
  /**
3635
- * Send a video to a secret chat. User-only.
3754
+ * Send a secret chat screenshot notification. User-only.
3636
3755
  *
3637
3756
  * @method sc
3638
3757
  * @param id The identifier of the secret chat.
3639
- * @param video The video to send.
3758
+ * @param messageIds Identifiers of messages.
3640
3759
  */
3641
- async sendSecretVideo(id, video, params) {
3642
- return await this.#dispatch("sendSecretVideo", id, video, params);
3760
+ async sendSecretScreenshotNotification(id, messageIds) {
3761
+ return await this.#dispatch("sendSecretScreenshotNotification", id, messageIds);
3643
3762
  }
3644
3763
  /**
3645
- * Send a video note to a secret chat. User-only.
3764
+ * Send a sticker to a secret chat. User-only.
3646
3765
  *
3647
3766
  * @method sc
3648
3767
  * @param id The identifier of the secret chat.
3649
- * @param videoNote The video note to send.
3768
+ * @param sticker The sticker to send.
3650
3769
  */
3651
- async sendSecretVideoNote(id, videoNote, params) {
3652
- return await this.#dispatch("sendSecretVideoNote", id, videoNote, params);
3770
+ async sendSecretSticker(id, sticker, params) {
3771
+ return await this.#dispatch("sendSecretSticker", id, sticker, params);
3653
3772
  }
3654
3773
  /**
3655
- * Send an animation to a secret chat. User-only.
3774
+ * Send a venue to a secret chat. User-only.
3656
3775
  *
3657
3776
  * @method sc
3658
3777
  * @param id The identifier of the secret chat.
3659
- * @param animation The animation to send.
3778
+ * @param latitude The latitude of the venue.
3779
+ * @param longitude The longitude of the venue.
3780
+ * @param title The title of the venue.
3781
+ * @param address The written address of the venue.
3660
3782
  */
3661
- async sendSecretAnimation(id, animation, params) {
3662
- return await this.#dispatch("sendSecretAnimation", id, animation, params);
3783
+ async sendSecretVenue(id, latitude, longitude, title, address, params) {
3784
+ return await this.#dispatch("sendSecretVenue", id, latitude, longitude, title, address, params);
3663
3785
  }
3664
3786
  /**
3665
- * Send an audio file to a secret chat. User-only.
3787
+ * Send a video to a secret chat. User-only.
3666
3788
  *
3667
3789
  * @method sc
3668
3790
  * @param id The identifier of the secret chat.
3669
- * @param audio The audio file to send.
3791
+ * @param video The video to send.
3670
3792
  */
3671
- async sendSecretAudio(id, audio, params) {
3672
- return await this.#dispatch("sendSecretAudio", id, audio, params);
3793
+ async sendSecretVideo(id, video, params) {
3794
+ return await this.#dispatch("sendSecretVideo", id, video, params);
3673
3795
  }
3674
3796
  /**
3675
- * Send a voice message to a secret chat. User-only.
3797
+ * Send a video note to a secret chat. User-only.
3676
3798
  *
3677
3799
  * @method sc
3678
3800
  * @param id The identifier of the secret chat.
3679
- * @param voice The voice message to send.
3801
+ * @param videoNote The video note to send.
3680
3802
  */
3681
- async sendSecretVoice(id, voice, params) {
3682
- return await this.#dispatch("sendSecretVoice", id, voice, params);
3803
+ async sendSecretVideoNote(id, videoNote, params) {
3804
+ return await this.#dispatch("sendSecretVideoNote", id, videoNote, params);
3683
3805
  }
3684
3806
  /**
3685
- * Send a sticker to a secret chat. User-only.
3807
+ * Send a voice message to a secret chat. User-only.
3686
3808
  *
3687
3809
  * @method sc
3688
3810
  * @param id The identifier of the secret chat.
3689
- * @param sticker The sticker to send.
3811
+ * @param voice The voice message to send.
3690
3812
  */
3691
- async sendSecretSticker(id, sticker, params) {
3692
- return await this.#dispatch("sendSecretSticker", id, sticker, params);
3813
+ async sendSecretVoice(id, voice, params) {
3814
+ return await this.#dispatch("sendSecretVoice", id, voice, params);
3693
3815
  }
3694
3816
  }
3695
3817
  exports.ClientDispatcher = ClientDispatcher;