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