@mtkruto/node 0.190.0 → 0.192.0

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