@mtkruto/node 0.180.1 → 0.191.0

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