@mtkruto/node 0.180.1 → 0.191.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/esm/3_types.d.ts +6 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +6 -0
  4. package/esm/client/0_params.d.ts +42 -30
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +1158 -1056
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  9. package/esm/client/2_client_encrypted.js +19 -12
  10. package/esm/client/2_file_manager.js +1 -1
  11. package/esm/client/3_account_manager.d.ts +6 -0
  12. package/esm/client/3_account_manager.d.ts.map +1 -1
  13. package/esm/client/3_account_manager.js +30 -1
  14. package/esm/client/3_message_manager.d.ts +3 -1
  15. package/esm/client/3_message_manager.d.ts.map +1 -1
  16. package/esm/client/3_message_manager.js +33 -19
  17. package/esm/client/3_secret_chat_manager.d.ts +3 -1
  18. package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
  19. package/esm/client/3_secret_chat_manager.js +77 -3
  20. package/esm/client/4_chat_manager.d.ts +2 -1
  21. package/esm/client/4_chat_manager.d.ts.map +1 -1
  22. package/esm/client/4_chat_manager.js +7 -1
  23. package/esm/client/4_context.d.ts +132 -48
  24. package/esm/client/4_context.d.ts.map +1 -1
  25. package/esm/client/4_context.js +336 -125
  26. package/esm/client/4_poll_manager.d.ts +3 -1
  27. package/esm/client/4_poll_manager.d.ts.map +1 -1
  28. package/esm/client/4_poll_manager.js +16 -5
  29. package/esm/client/6_client.d.ts +1158 -1056
  30. package/esm/client/6_client.d.ts.map +1 -1
  31. package/esm/client/6_client.js +1514 -1386
  32. package/esm/client/6_client_dispatcher.d.ts +1158 -1056
  33. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  34. package/esm/client/6_client_dispatcher.js +1478 -1356
  35. package/esm/types/0_checklist_changed.d.ts +1 -1
  36. package/esm/types/0_checklist_changed.d.ts.map +1 -1
  37. package/esm/types/0_location.d.ts +2 -2
  38. package/esm/types/0_location.d.ts.map +1 -1
  39. package/esm/types/0_message_viewer.d.ts +29 -0
  40. package/esm/types/0_message_viewer.d.ts.map +1 -0
  41. package/esm/types/0_message_viewer.js +25 -0
  42. package/esm/types/0_secret_chat_action_type.d.ts +69 -0
  43. package/esm/types/0_secret_chat_action_type.d.ts.map +1 -0
  44. package/esm/types/0_secret_chat_action_type.js +46 -0
  45. package/esm/types/1_chat_p.d.ts +1 -5
  46. package/esm/types/1_chat_p.d.ts.map +1 -1
  47. package/esm/types/1_input_poll_media.d.ts +5 -5
  48. package/esm/types/1_input_poll_media.d.ts.map +1 -1
  49. package/esm/types/1_input_sticker.d.ts +1 -1
  50. package/esm/types/1_secret_chat_action.d.ts +30 -0
  51. package/esm/types/1_secret_chat_action.d.ts.map +1 -0
  52. package/esm/types/1_secret_chat_action.js +28 -0
  53. package/esm/types/1_sticker.d.ts +3 -3
  54. package/esm/types/1_sticker.d.ts.map +1 -1
  55. package/esm/types/1_video.d.ts +3 -3
  56. package/esm/types/1_video.d.ts.map +1 -1
  57. package/esm/types/1_video_note.d.ts +3 -3
  58. package/esm/types/1_video_note.d.ts.map +1 -1
  59. package/esm/types/2_poll_voter.d.ts +13 -0
  60. package/esm/types/2_poll_voter.d.ts.map +1 -0
  61. package/esm/types/2_poll_voter.js +18 -0
  62. package/esm/types/3_connected_website.d.ts +35 -0
  63. package/esm/types/3_connected_website.d.ts.map +1 -0
  64. package/esm/types/3_connected_website.js +39 -0
  65. package/esm/types/3_input_media.d.ts +5 -5
  66. package/esm/types/3_input_media.d.ts.map +1 -1
  67. package/esm/types/3_poll_voter_list.d.ts +31 -0
  68. package/esm/types/3_poll_voter_list.d.ts.map +1 -0
  69. package/esm/types/3_poll_voter_list.js +28 -0
  70. package/esm/types/4_reply_to.d.ts +2 -2
  71. package/esm/types/4_reply_to.d.ts.map +1 -1
  72. package/esm/types/6_message_content.d.ts +2 -2
  73. package/esm/types/6_message_content.d.ts.map +1 -1
  74. package/esm/types/9_message.d.ts +8 -1
  75. package/esm/types/9_message.d.ts.map +1 -1
  76. package/esm/types/9_message.js +3 -0
  77. package/esm/types/B_update.d.ts +25 -10
  78. package/esm/types/B_update.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/script/3_types.d.ts +6 -0
  81. package/script/3_types.d.ts.map +1 -1
  82. package/script/3_types.js +6 -0
  83. package/script/client/0_params.d.ts +42 -30
  84. package/script/client/0_params.d.ts.map +1 -1
  85. package/script/client/1_client_generic.d.ts +1158 -1056
  86. package/script/client/1_client_generic.d.ts.map +1 -1
  87. package/script/client/2_client_encrypted.d.ts.map +1 -1
  88. package/script/client/2_client_encrypted.js +19 -12
  89. package/script/client/2_file_manager.js +1 -1
  90. package/script/client/3_account_manager.d.ts +6 -0
  91. package/script/client/3_account_manager.d.ts.map +1 -1
  92. package/script/client/3_account_manager.js +29 -0
  93. package/script/client/3_message_manager.d.ts +3 -1
  94. package/script/client/3_message_manager.d.ts.map +1 -1
  95. package/script/client/3_message_manager.js +32 -18
  96. package/script/client/3_secret_chat_manager.d.ts +3 -1
  97. package/script/client/3_secret_chat_manager.d.ts.map +1 -1
  98. package/script/client/3_secret_chat_manager.js +76 -2
  99. package/script/client/4_chat_manager.d.ts +2 -1
  100. package/script/client/4_chat_manager.d.ts.map +1 -1
  101. package/script/client/4_chat_manager.js +7 -1
  102. package/script/client/4_context.d.ts +132 -48
  103. package/script/client/4_context.d.ts.map +1 -1
  104. package/script/client/4_context.js +336 -125
  105. package/script/client/4_poll_manager.d.ts +3 -1
  106. package/script/client/4_poll_manager.d.ts.map +1 -1
  107. package/script/client/4_poll_manager.js +15 -4
  108. package/script/client/6_client.d.ts +1158 -1056
  109. package/script/client/6_client.d.ts.map +1 -1
  110. package/script/client/6_client.js +1514 -1386
  111. package/script/client/6_client_dispatcher.d.ts +1158 -1056
  112. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  113. package/script/client/6_client_dispatcher.js +1478 -1356
  114. package/script/types/0_checklist_changed.d.ts +1 -1
  115. package/script/types/0_checklist_changed.d.ts.map +1 -1
  116. package/script/types/0_location.d.ts +2 -2
  117. package/script/types/0_location.d.ts.map +1 -1
  118. package/script/types/0_message_viewer.d.ts +29 -0
  119. package/script/types/0_message_viewer.d.ts.map +1 -0
  120. package/script/types/0_message_viewer.js +28 -0
  121. package/script/types/0_secret_chat_action_type.d.ts +69 -0
  122. package/script/types/0_secret_chat_action_type.d.ts.map +1 -0
  123. package/script/types/0_secret_chat_action_type.js +49 -0
  124. package/script/types/1_chat_p.d.ts +1 -5
  125. package/script/types/1_chat_p.d.ts.map +1 -1
  126. package/script/types/1_input_poll_media.d.ts +5 -5
  127. package/script/types/1_input_poll_media.d.ts.map +1 -1
  128. package/script/types/1_input_sticker.d.ts +1 -1
  129. package/script/types/1_secret_chat_action.d.ts +30 -0
  130. package/script/types/1_secret_chat_action.d.ts.map +1 -0
  131. package/script/types/1_secret_chat_action.js +31 -0
  132. package/script/types/1_sticker.d.ts +3 -3
  133. package/script/types/1_sticker.d.ts.map +1 -1
  134. package/script/types/1_video.d.ts +3 -3
  135. package/script/types/1_video.d.ts.map +1 -1
  136. package/script/types/1_video_note.d.ts +3 -3
  137. package/script/types/1_video_note.d.ts.map +1 -1
  138. package/script/types/2_poll_voter.d.ts +13 -0
  139. package/script/types/2_poll_voter.d.ts.map +1 -0
  140. package/script/types/2_poll_voter.js +21 -0
  141. package/script/types/3_connected_website.d.ts +35 -0
  142. package/script/types/3_connected_website.d.ts.map +1 -0
  143. package/script/types/3_connected_website.js +42 -0
  144. package/script/types/3_input_media.d.ts +5 -5
  145. package/script/types/3_input_media.d.ts.map +1 -1
  146. package/script/types/3_poll_voter_list.d.ts +31 -0
  147. package/script/types/3_poll_voter_list.d.ts.map +1 -0
  148. package/script/types/3_poll_voter_list.js +31 -0
  149. package/script/types/4_reply_to.d.ts +2 -2
  150. package/script/types/4_reply_to.d.ts.map +1 -1
  151. package/script/types/6_message_content.d.ts +2 -2
  152. package/script/types/6_message_content.d.ts.map +1 -1
  153. package/script/types/9_message.d.ts +8 -1
  154. package/script/types/9_message.d.ts.map +1 -1
  155. package/script/types/9_message.js +3 -0
  156. package/script/types/B_update.d.ts +25 -10
  157. package/script/types/B_update.d.ts.map +1 -1
@@ -1227,42 +1227,22 @@ export class Client extends Composer {
1227
1227
  // ========================= ACCOUNT ========================= //
1228
1228
  //
1229
1229
  /**
1230
- * Get information on the currently authorized user.
1231
- *
1232
- * @method ac
1233
- * @returns Information on the currently authorized user.
1234
- */
1235
- async getMe() {
1236
- if (this.#lastGetMe === null) {
1237
- const me = await this.#checkAuthorization();
1238
- if (!me) {
1239
- throw new InputError("Not signed in.");
1240
- }
1241
- else {
1242
- return me;
1243
- }
1244
- }
1245
- return await this.#getMeInner();
1246
- }
1247
- /**
1248
- * Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
1230
+ * Add a bot to the attachments menu. User-only.
1249
1231
  *
1250
1232
  * @method ac
1251
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1252
- * @param username The username to show.
1233
+ * @param botId The identifier of the bot to add to the attachments menu.
1253
1234
  */
1254
- async showUsername(id, username) {
1255
- await this.#accountManager.showUsername(id, username);
1235
+ async addBotToAttachmentsMenu(botId, params) {
1236
+ return await this.#accountManager.addBotToAttachmentsMenu(botId, params);
1256
1237
  }
1257
1238
  /**
1258
- * Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
1239
+ * Block a user. User-only.
1259
1240
  *
1260
1241
  * @method ac
1261
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1262
- * @param username The username to hide.
1242
+ * @param userId The identifier of the user to block.
1263
1243
  */
1264
- async hideUsername(id, username) {
1265
- await this.#accountManager.hideUsername(id, username);
1244
+ async blockUser(userId) {
1245
+ await this.#messageManager.blockUser(userId);
1266
1246
  }
1267
1247
  /**
1268
1248
  * Check the availability of a username. User-only.
@@ -1275,678 +1255,640 @@ export class Client extends Composer {
1275
1255
  return await this.#accountManager.checkUsername(username, params);
1276
1256
  }
1277
1257
  /**
1278
- * Set the username of the current account. User-only.
1258
+ * Delete the current account. User-only.
1279
1259
  *
1280
1260
  * @method ac
1281
- * @param username The username to set.
1261
+ * @param reason The reason of the deletion.
1282
1262
  */
1283
- async setUsername(username) {
1284
- await this.#accountManager.setUsername(username);
1263
+ async deleteAccount(reason, params) {
1264
+ return await this.#accountManager.deleteAccount(reason, params);
1285
1265
  }
1286
1266
  /**
1287
- * Remove the current account's username. User-only.
1267
+ * Disable sponsored messages on the current user. User-only.
1288
1268
  *
1289
1269
  * @method ac
1290
1270
  */
1291
- async removeUsername() {
1292
- await this.#accountManager.removeUsername();
1271
+ async disableSponsoredMessages() {
1272
+ await this.#accountManager.disableSponsoredMessages();
1293
1273
  }
1294
1274
  /**
1295
- * Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
1275
+ * Disconnect a connected website. User-only.
1296
1276
  *
1297
1277
  * @method ac
1298
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1299
- * @param order The new order to use.
1300
- * @returns Whether the order was changed.
1278
+ * @param id The identifier of a connected website.
1301
1279
  */
1302
- async reorderUsernames(id, order) {
1303
- return await this.#accountManager.reorderUsernames(id, order);
1280
+ async disconnectConnectedWebsite(id) {
1281
+ return await this.#accountManager.disconnectConnectedWebsite(id);
1304
1282
  }
1305
1283
  /**
1306
- * Hide all usernames from a supergroup or a channel's profile. User-only.
1284
+ * Disconnect all connected websites. User-only.
1307
1285
  *
1308
1286
  * @method ac
1309
- * @param id A supergroup ID or a channel ID.
1310
- * @returns Whether any username was hidden.
1311
1287
  */
1312
- async hideUsernames(id) {
1313
- return await this.#accountManager.hideUsernames(id);
1288
+ async disconnectConnectedWebsites() {
1289
+ return await this.#accountManager.disconnectConnectedWebsites();
1314
1290
  }
1315
1291
  /**
1316
- * Get a business connection. Bot-only.
1292
+ * Enable sponsored messages on the current user. User-only.
1317
1293
  *
1318
1294
  * @method ac
1319
- * @param id The identifier of the business connection.
1320
- * @cache
1321
1295
  */
1322
- async getBusinessConnection(id) {
1323
- return await this.#businessConnectionManager.getBusinessConnection(id);
1296
+ async enableSponsoredMessages() {
1297
+ await this.#accountManager.enableSponsoredMessages();
1324
1298
  }
1325
1299
  /**
1326
- * Set the current account's online status. User-only.
1300
+ * Get the current account's TTL. User-only.
1327
1301
  *
1328
1302
  * @method ac
1329
- * @param isOnline The new online status.
1303
+ * @returns The current account's TTL in days.
1330
1304
  */
1331
- async setIsOnline(isOnline) {
1332
- await this.#accountManager.setIsOnline(isOnline);
1305
+ async getAccountTtl() {
1306
+ return await this.#accountManager.getAccountTtl();
1333
1307
  }
1334
1308
  /**
1335
- * Set the current account's emoji status. User-only.
1309
+ * Get app support. User-only.
1336
1310
  *
1337
1311
  * @method ac
1338
- * @param emojiStatus The emoji or gift to set as the new emoji status.
1339
1312
  */
1340
- async setEmojiStatus(emojiStatus, params) {
1341
- await this.#accountManager.setEmojiStatus(emojiStatus, params);
1313
+ async getAppSupport() {
1314
+ return await this.#accountManager.getAppSupport();
1342
1315
  }
1343
1316
  /**
1344
- * Remove the current account's emoji status. User-only.
1317
+ * Get app support name. User-only.
1345
1318
  *
1346
1319
  * @method ac
1347
1320
  */
1348
- async removeEmojiStatus() {
1349
- await this.#accountManager.removeEmojiStatus();
1321
+ async getAppSupportName() {
1322
+ return await this.#accountManager.getAppSupportName();
1350
1323
  }
1351
1324
  /**
1352
- * Set the emoji status of a channel. User-only.
1325
+ * Get the authorization sessions. User-only.
1353
1326
  *
1354
1327
  * @method ac
1355
- * @param chatId The identifier of a channel.
1356
- * @param emojiStatus The emoji or gift to set as the new emoji status.
1357
1328
  */
1358
- async setChannelEmojiStatus(chatId, emojiStatus, params) {
1359
- await this.#accountManager.setChannelEmojiStatus(chatId, emojiStatus, params);
1329
+ async getAuthorizationSessions() {
1330
+ return await this.#accountManager.getAuthorizationSessions();
1360
1331
  }
1361
1332
  /**
1362
- * Remove the emoji status of a channel. User-only.
1333
+ * Get blocked users. User-only.
1363
1334
  *
1364
1335
  * @method ac
1365
- * @param chatId The identifier of a channel.
1366
1336
  */
1367
- async removeChannelEmojiStatus(chatId) {
1368
- await this.#accountManager.removeChannelEmojiStatus(chatId);
1337
+ async getBlockedUsers(params) {
1338
+ return await this.#messageManager.getBlockedUsers(params);
1369
1339
  }
1370
1340
  /**
1371
- * Set the emoji status of a bot's user. Bot-only.
1341
+ * Get a business connection. Bot-only.
1372
1342
  *
1373
1343
  * @method ac
1374
- * @param userId The identifier of a user of the bot.
1375
- * @param emojiStatus The emoji or gift to set as the new emoji status.
1344
+ * @param id The identifier of the business connection.
1345
+ * @cache
1376
1346
  */
1377
- async setUserEmojiStatus(userId, emojiStatus, params) {
1378
- await this.#accountManager.setUserEmojiStatus(userId, emojiStatus, params);
1347
+ async getBusinessConnection(id) {
1348
+ return await this.#businessConnectionManager.getBusinessConnection(id);
1379
1349
  }
1380
1350
  /**
1381
- * Remove the emoji status of a bot's user. Bot-only.
1351
+ * Get connected websites. User-only.
1382
1352
  *
1383
1353
  * @method ac
1384
- * @param userId The identifier of a user of the bot.
1385
1354
  */
1386
- async removeUserEmojiStatus(userId) {
1387
- await this.#accountManager.removeUserEmojiStatus(userId);
1355
+ async getConnectedWebsites() {
1356
+ return await this.#accountManager.getConnectedWebsites();
1388
1357
  }
1389
1358
  /**
1390
- * Update the profile of the current user. At least one parameter must be specified. User-only.
1359
+ * Get countries. User-only.
1391
1360
  *
1392
1361
  * @method ac
1393
1362
  */
1394
- async updateProfile(params) {
1395
- await this.#accountManager.updateProfile(params);
1363
+ async getCountries(languageCode) {
1364
+ return await this.#accountManager.getCountries(languageCode);
1396
1365
  }
1397
1366
  /**
1398
- * Update the profile photo of the current user or a bot managed by the current user.
1367
+ * Get the country code for the current user based on its IP address. User-only.
1399
1368
  *
1400
1369
  * @method ac
1401
- * @param photo The photo to set as profile photo.
1402
1370
  */
1403
- async updateProfilePhoto(photo, params) {
1404
- await this.#accountManager.updateProfilePhoto(photo, params);
1371
+ async getCountryCode() {
1372
+ return await this.#accountManager.getCountryCode();
1405
1373
  }
1406
1374
  /**
1407
- * Update the profile video of the current user or a bot managed by the current user.
1375
+ * Get information on the currently authorized user.
1408
1376
  *
1409
1377
  * @method ac
1410
- * @param video The video to set as profile video.
1378
+ * @returns Information on the currently authorized user.
1411
1379
  */
1412
- async updateProfileVideo(video, params) {
1413
- return await this.#accountManager.updateProfileVideo(video, params);
1380
+ async getMe() {
1381
+ if (this.#lastGetMe === null) {
1382
+ const me = await this.#checkAuthorization();
1383
+ if (!me) {
1384
+ throw new InputError("Not signed in.");
1385
+ }
1386
+ else {
1387
+ return me;
1388
+ }
1389
+ }
1390
+ return await this.#getMeInner();
1414
1391
  }
1415
1392
  /**
1416
- * Remove the profile video of the current user or a bot managed by the current user.
1393
+ * Get owned bots. User-only.
1417
1394
  *
1418
1395
  * @method ac
1419
1396
  */
1420
- async removeProfilePhoto(params) {
1421
- return await this.#accountManager.removeProfilePhoto(params);
1397
+ async getOwnedBots() {
1398
+ return await this.#accountManager.getOwnedBots();
1422
1399
  }
1423
1400
  /**
1424
- * Set the birthday of the current user. User-only.
1401
+ * Get the profile photos of a user.
1425
1402
  *
1426
1403
  * @method ac
1404
+ * @param userId The identifier of a user.
1427
1405
  */
1428
- async setBirthday(params) {
1429
- await this.#accountManager.setBirthday(params);
1406
+ async getProfilePhotos(userId, params) {
1407
+ return await this.#accountManager.getProfilePhotos(userId, params);
1430
1408
  }
1431
1409
  /**
1432
- * Set the personal channel of the current user. User-only.
1410
+ * Get timezones. User-only.
1433
1411
  *
1434
1412
  * @method ac
1435
1413
  */
1436
- async setPersonalChannel(params) {
1437
- await this.#accountManager.setPersonalChannel(params);
1414
+ async getTimezones() {
1415
+ return await this.#accountManager.getTimezones();
1438
1416
  }
1439
1417
  /**
1440
- * Set the name color of the current user. User-only.
1418
+ * Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
1441
1419
  *
1442
1420
  * @method ac
1443
- * @param color The identifier of the color to set.
1421
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1422
+ * @param username The username to hide.
1444
1423
  */
1445
- async setNameColor(color, params) {
1446
- await this.#accountManager.setNameColor(color, params);
1424
+ async hideUsername(id, username) {
1425
+ await this.#accountManager.hideUsername(id, username);
1447
1426
  }
1448
1427
  /**
1449
- * Set the profile color of the current user. User-only.
1428
+ * Hide all usernames from a supergroup or a channel's profile. User-only.
1450
1429
  *
1451
1430
  * @method ac
1452
- * @param color The identifier of the color to set.
1431
+ * @param id A supergroup ID or a channel ID.
1432
+ * @returns Whether any username was hidden.
1453
1433
  */
1454
- async setProfileColor(color, params) {
1455
- await this.#accountManager.setProfileColor(color, params);
1434
+ async hideUsernames(id) {
1435
+ return await this.#accountManager.hideUsernames(id);
1456
1436
  }
1457
1437
  /**
1458
- * Set the location of the current user. User-only.
1438
+ * Pause the business bot in a chat. User-only.
1459
1439
  *
1460
1440
  * @method ac
1441
+ * @param chatId The identifier of a chat.
1461
1442
  */
1462
- async setLocation(params) {
1463
- await this.#accountManager.setLocation(params);
1443
+ async pauseBusinessBotConnection(chatId) {
1444
+ await this.#accountManager.pauseBusinessBotConnection(chatId);
1464
1445
  }
1465
1446
  /**
1466
- * Set the working hours of the current user. User-only.
1447
+ * Remove an authorization session. User-only.
1467
1448
  *
1468
1449
  * @method ac
1450
+ * @param id The identifier of the authorization session to remove.
1469
1451
  */
1470
- async setWorkingHours(params) {
1471
- await this.#accountManager.setWorkingHours(params);
1452
+ async removeAuthorizationSession(id) {
1453
+ return await this.#accountManager.removeAuthorizationSession(id);
1472
1454
  }
1473
1455
  /**
1474
- * Enable sponsored messages on the current user. User-only.
1456
+ * Remove all authorization sessions except for the current one. User-only.
1475
1457
  *
1476
1458
  * @method ac
1477
1459
  */
1478
- async enableSponsoredMessages() {
1479
- await this.#accountManager.enableSponsoredMessages();
1460
+ async removeAuthorizationSessions() {
1461
+ return await this.#accountManager.removeAuthorizationSessions();
1480
1462
  }
1481
1463
  /**
1482
- * Disable sponsored messages on the current user. User-only.
1464
+ * Remove a bot from the attachments menu. User-only.
1483
1465
  *
1484
1466
  * @method ac
1467
+ * @param botId The identifier of the bot to remove from the attachments menu.
1485
1468
  */
1486
- async disableSponsoredMessages() {
1487
- await this.#accountManager.disableSponsoredMessages();
1469
+ async removeBotFromAttachmentsMenu(botId) {
1470
+ return await this.#accountManager.removeBotFromAttachmentsMenu(botId);
1488
1471
  }
1489
1472
  /**
1490
- * Pause the business bot in a chat. User-only.
1473
+ * Remove the emoji status of a channel. User-only.
1491
1474
  *
1492
1475
  * @method ac
1493
- * @param chatId The identifier of a chat.
1476
+ * @param chatId The identifier of a channel.
1494
1477
  */
1495
- async pauseBusinessBotConnection(chatId) {
1496
- await this.#accountManager.pauseBusinessBotConnection(chatId);
1478
+ async removeChannelEmojiStatus(chatId) {
1479
+ await this.#accountManager.removeChannelEmojiStatus(chatId);
1497
1480
  }
1498
1481
  /**
1499
- * Resume the business bot in a chat. User-only.
1482
+ * Remove the current account's emoji status. User-only.
1500
1483
  *
1501
1484
  * @method ac
1502
- * @param chatId The identifier of a chat.
1503
1485
  */
1504
- async resumeBusinessBotConnection(chatId) {
1505
- await this.#accountManager.resumeBusinessBotConnection(chatId);
1486
+ async removeEmojiStatus() {
1487
+ await this.#accountManager.removeEmojiStatus();
1506
1488
  }
1507
1489
  /**
1508
- * Resolve a username.
1490
+ * Remove the profile video of the current user or a bot managed by the current user.
1509
1491
  *
1510
1492
  * @method ac
1511
- * @param username The username to resolve.
1512
1493
  */
1513
- async resolveUsername(username, params) {
1514
- return await this.#accountManager.resolveUsername(username, params);
1494
+ async removeProfilePhoto(params) {
1495
+ return await this.#accountManager.removeProfilePhoto(params);
1515
1496
  }
1516
1497
  /**
1517
- * Resolve a phone number. User-only.
1498
+ * Remove the emoji status of a bot's user. Bot-only.
1518
1499
  *
1519
1500
  * @method ac
1520
- * @param phoneNumber The phone number to resolve.
1501
+ * @param userId The identifier of a user of the bot.
1521
1502
  */
1522
- async resolvePhoneNumber(phoneNumber) {
1523
- return await this.#accountManager.resolvePhoneNumber(phoneNumber);
1503
+ async removeUserEmojiStatus(userId) {
1504
+ await this.#accountManager.removeUserEmojiStatus(userId);
1524
1505
  }
1525
1506
  /**
1526
- * Set the list of close friends. User-only.
1507
+ * Remove the current account's username. User-only.
1527
1508
  *
1528
1509
  * @method ac
1529
- * @param userIds The identifiers of users to set as close friends.
1530
1510
  */
1531
- async setCloseFriends(userIds) {
1532
- await this.#accountManager.setCloseFriends(userIds);
1511
+ async removeUsername() {
1512
+ await this.#accountManager.removeUsername();
1533
1513
  }
1534
1514
  /**
1535
- * Suggest a birthday. User-only.
1515
+ * Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
1536
1516
  *
1537
1517
  * @method ac
1538
- * @param userId The identifier of the user to suggest a birthday for.
1539
- * @param birthday The birthday to suggest.
1518
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1519
+ * @param order The new order to use.
1520
+ * @returns Whether the order was changed.
1540
1521
  */
1541
- async suggestBirthday(userId, birthday) {
1542
- await this.#accountManager.suggestBirthday(userId, birthday);
1522
+ async reorderUsernames(id, order) {
1523
+ return await this.#accountManager.reorderUsernames(id, order);
1543
1524
  }
1544
1525
  /**
1545
- * Block a user. User-only.
1526
+ * Resolve a phone number. User-only.
1546
1527
  *
1547
1528
  * @method ac
1548
- * @param userId The identifier of the user to block.
1529
+ * @param phoneNumber The phone number to resolve.
1549
1530
  */
1550
- async blockUser(userId) {
1551
- await this.#messageManager.blockUser(userId);
1531
+ async resolvePhoneNumber(phoneNumber) {
1532
+ return await this.#accountManager.resolvePhoneNumber(phoneNumber);
1552
1533
  }
1553
1534
  /**
1554
- * Unblock a user. User-only.
1535
+ * Resolve a username.
1555
1536
  *
1556
1537
  * @method ac
1557
- * @param userId The identifier of the user to unblock.
1538
+ * @param username The username to resolve.
1558
1539
  */
1559
- async unblockUser(userId) {
1560
- await this.#messageManager.unblockUser(userId);
1540
+ async resolveUsername(username, params) {
1541
+ return await this.#accountManager.resolveUsername(username, params);
1561
1542
  }
1562
1543
  /**
1563
- * Get blocked users. User-only.
1544
+ * Resume the business bot in a chat. User-only.
1564
1545
  *
1565
1546
  * @method ac
1547
+ * @param chatId The identifier of a chat.
1566
1548
  */
1567
- async getBlockedUsers(params) {
1568
- return await this.#messageManager.getBlockedUsers(params);
1549
+ async resumeBusinessBotConnection(chatId) {
1550
+ await this.#accountManager.resumeBusinessBotConnection(chatId);
1569
1551
  }
1570
1552
  /**
1571
- * Add a bot to the attachments menu. User-only.
1553
+ * Set the current account's TTL. User-only.
1572
1554
  *
1573
1555
  * @method ac
1574
- * @param botId The identifier of the bot to add to the attachments menu.
1556
+ * @param dayCount The current account's TTL in days.
1575
1557
  */
1576
- async addBotToAttachmentsMenu(botId, params) {
1577
- return await this.#accountManager.addBotToAttachmentsMenu(botId, params);
1558
+ async setAccountTtl(dayCount) {
1559
+ return await this.#accountManager.setAccountTtl(dayCount);
1578
1560
  }
1579
1561
  /**
1580
- * Remove a bot from the attachments menu. User-only.
1562
+ * Set the birthday of the current user. User-only.
1581
1563
  *
1582
1564
  * @method ac
1583
- * @param botId The identifier of the bot to remove from the attachments menu.
1584
1565
  */
1585
- async removeBotFromAttachmentsMenu(botId) {
1586
- return await this.#accountManager.removeBotFromAttachmentsMenu(botId);
1566
+ async setBirthday(params) {
1567
+ await this.#accountManager.setBirthday(params);
1587
1568
  }
1588
1569
  /**
1589
- * Get app support. User-only.
1570
+ * Set the emoji status of a channel. User-only.
1590
1571
  *
1591
1572
  * @method ac
1573
+ * @param chatId The identifier of a channel.
1574
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
1592
1575
  */
1593
- async getAppSupport() {
1594
- return await this.#accountManager.getAppSupport();
1576
+ async setChannelEmojiStatus(chatId, emojiStatus, params) {
1577
+ await this.#accountManager.setChannelEmojiStatus(chatId, emojiStatus, params);
1595
1578
  }
1596
1579
  /**
1597
- * Get app support name. User-only.
1580
+ * Set the list of close friends. User-only.
1598
1581
  *
1599
1582
  * @method ac
1583
+ * @param userIds The identifiers of users to set as close friends.
1600
1584
  */
1601
- async getAppSupportName() {
1602
- return await this.#accountManager.getAppSupportName();
1585
+ async setCloseFriends(userIds) {
1586
+ await this.#accountManager.setCloseFriends(userIds);
1603
1587
  }
1604
1588
  /**
1605
- * Get owned bots. User-only.
1589
+ * Set the current account's emoji status. User-only.
1606
1590
  *
1607
1591
  * @method ac
1592
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
1608
1593
  */
1609
- async getOwnedBots() {
1610
- return await this.#accountManager.getOwnedBots();
1594
+ async setEmojiStatus(emojiStatus, params) {
1595
+ await this.#accountManager.setEmojiStatus(emojiStatus, params);
1611
1596
  }
1612
1597
  /**
1613
- * Get timezones. User-only.
1598
+ * Set the current account's online status. User-only.
1614
1599
  *
1615
1600
  * @method ac
1601
+ * @param isOnline The new online status.
1616
1602
  */
1617
- async getTimezones() {
1618
- return await this.#accountManager.getTimezones();
1603
+ async setIsOnline(isOnline) {
1604
+ await this.#accountManager.setIsOnline(isOnline);
1619
1605
  }
1620
1606
  /**
1621
- * Get countries. User-only.
1607
+ * Set the location of the current user. User-only.
1622
1608
  *
1623
1609
  * @method ac
1624
1610
  */
1625
- async getCountries(languageCode) {
1626
- return await this.#accountManager.getCountries(languageCode);
1611
+ async setLocation(params) {
1612
+ await this.#accountManager.setLocation(params);
1627
1613
  }
1628
1614
  /**
1629
- * Get the profile photos of a user.
1615
+ * Set the name color of the current user. User-only.
1630
1616
  *
1631
1617
  * @method ac
1632
- * @param userId The identifier of a user.
1618
+ * @param color The identifier of the color to set.
1633
1619
  */
1634
- async getProfilePhotos(userId, params) {
1635
- return await this.#accountManager.getProfilePhotos(userId, params);
1620
+ async setNameColor(color, params) {
1621
+ await this.#accountManager.setNameColor(color, params);
1636
1622
  }
1637
1623
  /**
1638
- * Delete the current account. User-only.
1624
+ * Set the personal channel of the current user. User-only.
1639
1625
  *
1640
1626
  * @method ac
1641
- * @param reason The reason of the deletion.
1642
1627
  */
1643
- async deleteAccount(reason, params) {
1644
- return await this.#accountManager.deleteAccount(reason, params);
1628
+ async setPersonalChannel(params) {
1629
+ await this.#accountManager.setPersonalChannel(params);
1645
1630
  }
1646
1631
  /**
1647
- * Get the authorization sessions. User-only.
1632
+ * Set the profile color of the current user. User-only.
1648
1633
  *
1649
1634
  * @method ac
1635
+ * @param color The identifier of the color to set.
1650
1636
  */
1651
- async getAuthorizationSessions() {
1652
- return await this.#accountManager.getAuthorizationSessions();
1637
+ async setProfileColor(color, params) {
1638
+ await this.#accountManager.setProfileColor(color, params);
1653
1639
  }
1654
1640
  /**
1655
- * Remove an authorization session. User-only.
1641
+ * Set the emoji status of a bot's user. Bot-only.
1656
1642
  *
1657
1643
  * @method ac
1658
- * @param id The identifier of the authorization session to remove.
1644
+ * @param userId The identifier of a user of the bot.
1645
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
1659
1646
  */
1660
- async removeAuthorizationSession(id) {
1661
- return await this.#accountManager.removeAuthorizationSession(id);
1647
+ async setUserEmojiStatus(userId, emojiStatus, params) {
1648
+ await this.#accountManager.setUserEmojiStatus(userId, emojiStatus, params);
1662
1649
  }
1663
1650
  /**
1664
- * Remove all authorization sessions except for the current one. User-only.
1651
+ * Set the username of the current account. User-only.
1665
1652
  *
1666
1653
  * @method ac
1654
+ * @param username The username to set.
1667
1655
  */
1668
- async removeAuthorizationSessions() {
1669
- return await this.#accountManager.removeAuthorizationSessions();
1656
+ async setUsername(username) {
1657
+ await this.#accountManager.setUsername(username);
1670
1658
  }
1671
- //
1672
- // ========================= MESSAGES ========================= //
1673
- //
1674
1659
  /**
1675
- * Send a text message.
1660
+ * Set the working hours of the current user. User-only.
1676
1661
  *
1677
- * @method ms
1678
- * @param chatId The identifier of a chat to send the message to.
1679
- * @param text The message's text.
1680
- * @returns The sent text message.
1662
+ * @method ac
1681
1663
  */
1682
- async sendMessage(chatId, text, params) {
1683
- return await this.#messageManager.sendMessage(chatId, text, params);
1664
+ async setWorkingHours(params) {
1665
+ await this.#accountManager.setWorkingHours(params);
1684
1666
  }
1685
1667
  /**
1686
- * Send a rich text message.
1668
+ * Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
1687
1669
  *
1688
- * @method ms
1689
- * @param chatId The identifier of a chat to send the message to.
1690
- * @param richText The message's rich text.
1691
- * @returns The sent rich text message.
1670
+ * @method ac
1671
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1672
+ * @param username The username to show.
1692
1673
  */
1693
- async sendRichText(chatId, richText, params) {
1694
- return await this.#messageManager.sendRichText(chatId, richText, params);
1674
+ async showUsername(id, username) {
1675
+ await this.#accountManager.showUsername(id, username);
1695
1676
  }
1696
1677
  /**
1697
- * Stream a drafted text message. Bot-only.
1678
+ * Suggest a birthday. User-only.
1698
1679
  *
1699
- * @method ms
1700
- * @param chatId The identifier of a chat to send the message to.
1701
- * @param draftId The identifier of the draft.
1702
- * @param text The message's text.
1680
+ * @method ac
1681
+ * @param userId The identifier of the user to suggest a birthday for.
1682
+ * @param birthday The birthday to suggest.
1703
1683
  */
1704
- async sendMessageDraft(chatId, draftId, text, params) {
1705
- await this.#messageManager.sendMessageDraft(chatId, draftId, text, params);
1684
+ async suggestBirthday(userId, birthday) {
1685
+ await this.#accountManager.suggestBirthday(userId, birthday);
1706
1686
  }
1707
1687
  /**
1708
- * Stream a drafted rich text message. Bot-only.
1688
+ * Unblock a user. User-only.
1709
1689
  *
1710
- * @method ms
1711
- * @param chatId The identifier of a chat to send the message to.
1712
- * @param draftId The identifier of the draft.
1713
- * @param richText The message's rich text.
1690
+ * @method ac
1691
+ * @param userId The identifier of the user to unblock.
1714
1692
  */
1715
- async sendRichTextDraft(chatId, draftId, richText, params) {
1716
- return await this.#messageManager.sendRichTextDraft(chatId, draftId, richText, params);
1693
+ async unblockUser(userId) {
1694
+ await this.#messageManager.unblockUser(userId);
1717
1695
  }
1718
1696
  /**
1719
- * Send a photo.
1697
+ * Update the profile of the current user. At least one parameter must be specified. User-only.
1720
1698
  *
1721
- * @method ms
1722
- * @param chatId The identifier of a chat to send the photo to.
1723
- * @param photo The photo to send.
1724
- * @returns The sent photo.
1699
+ * @method ac
1725
1700
  */
1726
- async sendPhoto(chatId, photo, params) {
1727
- return await this.#messageManager.sendPhoto(chatId, photo, params);
1701
+ async updateProfile(params) {
1702
+ await this.#accountManager.updateProfile(params);
1728
1703
  }
1729
1704
  /**
1730
- * Send a live photo.
1705
+ * Update the profile photo of the current user or a bot managed by the current user.
1731
1706
  *
1732
- * @method ms
1733
- * @param chatId The identifier of a chat to send the photo to.
1734
- * @param photo The photo to send.
1735
- * @param video The video version of the photo.
1736
- * @returns The sent live photo.
1707
+ * @method ac
1708
+ * @param photo The photo to set as profile photo.
1737
1709
  */
1738
- async sendLivePhoto(chatId, photo, video, params) {
1739
- return await this.#messageManager.sendLivePhoto(chatId, photo, video, params);
1710
+ async updateProfilePhoto(photo, params) {
1711
+ await this.#accountManager.updateProfilePhoto(photo, params);
1740
1712
  }
1741
1713
  /**
1742
- * Send a document.
1714
+ * Update the profile video of the current user or a bot managed by the current user.
1743
1715
  *
1744
- * @method ms
1745
- * @param chatId The identifier of a chat to send the document to.
1746
- * @param document The document to send.
1747
- * @returns The sent document.
1716
+ * @method ac
1717
+ * @param video The video to set as profile video.
1748
1718
  */
1749
- async sendDocument(chatId, document, params) {
1750
- return await this.#messageManager.sendDocument(chatId, document, params);
1719
+ async updateProfileVideo(video, params) {
1720
+ return await this.#accountManager.updateProfileVideo(video, params);
1751
1721
  }
1722
+ //
1723
+ // ========================= MESSAGES ========================= //
1724
+ //
1752
1725
  /**
1753
- * Send a sticker.
1726
+ * Add a sticker to favorites. User-only.
1754
1727
  *
1755
1728
  * @method ms
1756
- * @param chatId The identifier of a chat to send the sticker to.
1757
- * @param sticker The sticker to send.
1758
- * @returns The sent sticker.
1729
+ * @param fileId The file identifier of the sticker.
1759
1730
  */
1760
- async sendSticker(chatId, sticker, params) {
1761
- return await this.#messageManager.sendSticker(chatId, sticker, params);
1731
+ async addStickerToFavorites(fileId) {
1732
+ return await this.#messageManager.addStickerToFavorites(fileId);
1762
1733
  }
1763
1734
  /**
1764
- * Send a video.
1735
+ * Add a sticker to recents. User-only.
1765
1736
  *
1766
1737
  * @method ms
1767
- * @param chatId The identifier of a chat to send the video to.
1768
- * @param video The video to send.
1769
- * @returns The sent video.
1738
+ * @param fileId The file identifier of the sticker.
1770
1739
  */
1771
- async sendVideo(chatId, video, params) {
1772
- return await this.#messageManager.sendVideo(chatId, video, params);
1740
+ async addStickerToRecents(fileId) {
1741
+ return await this.#messageManager.addStickerToRecents(fileId);
1773
1742
  }
1774
1743
  /**
1775
- * Send an animation.
1744
+ * Clear all message drafts. User-only.
1776
1745
  *
1777
1746
  * @method ms
1778
- * @param chatId The identifier of a chat to send the animation to.
1779
- * @param animation The animation to send.
1780
- * @returns The sent animation.
1781
1747
  */
1782
- async sendAnimation(chatId, animation, params) {
1783
- return await this.#messageManager.sendAnimation(chatId, animation, params);
1748
+ async clearDrafts() {
1749
+ await this.#messageManager.clearDrafts();
1784
1750
  }
1785
1751
  /**
1786
- * Send a voice message.
1752
+ * Clear recent stickers. User-only.
1787
1753
  *
1788
1754
  * @method ms
1789
- * @param chatId The identifier of a chat to send the voice message to.
1790
- * @param voice The voice to send.
1791
- * @returns The sent voice message.
1792
1755
  */
1793
- async sendVoice(chatId, voice, params) {
1794
- return await this.#messageManager.sendVoice(chatId, voice, params);
1756
+ async clearRecentStickers() {
1757
+ return await this.#messageManager.clearRecentStickers();
1795
1758
  }
1796
1759
  /**
1797
- * Send an audio file.
1760
+ * Delete all messages sent by a specific member of a chat. User-only.
1798
1761
  *
1799
1762
  * @method ms
1800
- * @param chatId The identifier of a chat to send the audio file to.
1801
- * @param audio The audio to send.
1802
- * @returns The sent audio file.
1763
+ * @param chatId The identifier of a chat. Must be a supergroup.
1764
+ * @param memberId The identifier of the member.
1803
1765
  */
1804
- async sendAudio(chatId, audio, params) {
1805
- return await this.#messageManager.sendAudio(chatId, audio, params);
1766
+ async deleteChatMemberMessages(chatId, memberId) {
1767
+ await this.#messageManager.deleteChatMemberMessages(chatId, memberId);
1806
1768
  }
1807
1769
  /**
1808
- * Send a media group.
1770
+ * Delete a single message.
1809
1771
  *
1810
1772
  * @method ms
1811
- * @param chatId The identifier of a chat to send the media group to.
1812
- * @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.
1813
- * @returns The sent messages.
1773
+ * @param chatId The identifier of the chat which the message belongs to.
1774
+ * @param messageId The identifier of the message to delete.
1814
1775
  */
1815
- async sendMediaGroup(chatId, media, params) {
1816
- return await this.#messageManager.sendMediaGroup(chatId, media, params);
1776
+ async deleteMessage(chatId, messageId, params) {
1777
+ await this.#messageManager.deleteMessages(chatId, [messageId], params);
1817
1778
  }
1818
1779
  /**
1819
- * Send a video note.
1780
+ * Delete multiple messages.
1820
1781
  *
1821
1782
  * @method ms
1822
- * @param chatId The identifier of a chat to send the video note to.
1823
- * @param videoNote The video note to send.
1824
- * @returns The sent video note.
1783
+ * @param chatId The identifier of the chat which the message belongs to.
1784
+ * @param messageIds The identifiers of the messages to delete.
1825
1785
  */
1826
- async sendVideoNote(chatId, videoNote, params) {
1827
- return await this.#messageManager.sendVideoNote(chatId, videoNote, params);
1786
+ async deleteMessages(chatId, messageIds, params) {
1787
+ await this.#messageManager.deleteMessages(chatId, messageIds, params);
1828
1788
  }
1829
1789
  /**
1830
- * Send a location.
1790
+ * Delete a scheduled message.
1831
1791
  *
1832
1792
  * @method ms
1833
- * @param chatId The identifier of a chat to send the location to.
1834
- * @param latitude The location's latitude.
1835
- * @param longitude The location's longitude.
1836
- * @returns The sent location.
1793
+ * @param chatId The identifier of a chat.
1794
+ * @param messageId The identifier of the scheduled message to delete.
1837
1795
  */
1838
- async sendLocation(chatId, latitude, longitude, params) {
1839
- return await this.#messageManager.sendLocation(chatId, latitude, longitude, params);
1796
+ async deleteScheduledMessage(chatId, messageId) {
1797
+ await this.#messageManager.deleteScheduledMessage(chatId, messageId);
1840
1798
  }
1841
1799
  /**
1842
- * Send a contact.
1800
+ * Delete multiple scheduled messages.
1843
1801
  *
1844
1802
  * @method ms
1845
- * @param chatId The identifier of a chat to send the contact to.
1846
- * @param firstName The contact's first name.
1847
- * @param phoneNumber The contact's phone number.
1848
- * @returns The sent contact.
1803
+ * @param chatId The identifier of a chat.
1804
+ * @param messageIds The identifiers of the scheduled messages to delete.
1849
1805
  */
1850
- async sendContact(chatId, firstName, phoneNumber, params) {
1851
- return await this.#messageManager.sendContact(chatId, firstName, phoneNumber, params);
1806
+ async deleteScheduledMessages(chatId, messageIds) {
1807
+ await this.#messageManager.deleteScheduledMessages(chatId, messageIds);
1852
1808
  }
1853
1809
  /**
1854
- * Send a dice.
1810
+ * Edit an inline message's caption. Bot-only.
1855
1811
  *
1856
1812
  * @method ms
1857
- * @param chatId The identifier of a chat to send the dice to.
1858
- * @returns The sent dice.
1813
+ * @param inlineMessageId The identifier of the inline message.
1859
1814
  */
1860
- async sendDice(chatId, params) {
1861
- return await this.#messageManager.sendDice(chatId, params);
1815
+ async editInlineMessageCaption(inlineMessageId, params) {
1816
+ await this.#messageManager.editInlineMessageCaption(inlineMessageId, params);
1862
1817
  }
1863
1818
  /**
1864
- * Send a venue.
1819
+ * Edit an inline message's live location. Bot-only.
1865
1820
  *
1866
1821
  * @method ms
1867
- * @param chatId The identifier of a chat to send the venue to.
1868
- * @param latitude The latitude of the venue.
1869
- * @param longitude The longitude of the venue.
1870
- * @param title The title of the venue.
1871
- * @param address The written address of the venue.
1872
- * @returns The sent venue.
1822
+ * @param inlineMessageId The identifier of the inline message.
1823
+ * @param latitude The new latitude.
1824
+ * @param longitude The new longitude.
1825
+ * @returns The edited location message.
1873
1826
  */
1874
- async sendVenue(chatId, latitude, longitude, title, address, params) {
1875
- return await this.#messageManager.sendVenue(chatId, latitude, longitude, title, address, params);
1827
+ async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
1828
+ await this.#messageManager.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
1876
1829
  }
1877
1830
  /**
1878
- * Send a poll.
1831
+ * Edit an inline message's media.
1879
1832
  *
1880
1833
  * @method ms
1881
- * @param chatId The identifier of a chat to send the poll to.
1882
- * @param question The poll's question.
1883
- * @param options The poll's options.
1884
- * @returns The sent poll.
1834
+ * @param inlineMessageId The identifier of the inline message.
1835
+ * @param media The new media of the message.
1885
1836
  */
1886
- async sendPoll(chatId, question, options, params) {
1887
- return await this.#messageManager.sendPoll(chatId, question, options, params);
1837
+ async editInlineMessageMedia(inlineMessageId, media, params) {
1838
+ await this.#messageManager.editInlineMessageMedia(inlineMessageId, media, params);
1888
1839
  }
1889
1840
  /**
1890
- * Send a checklist.
1841
+ * Edit an inline message's reply markup. Bot-only.
1891
1842
  *
1892
1843
  * @method ms
1893
- * @param chatId The identifier of a chat to send the checklist to.
1894
- * @param title The checklist's title.
1895
- * @param items The checklist's items.
1896
- * @returns The sent checklist.
1844
+ * @param inlineMessageId The identifier of the inline message.
1897
1845
  */
1898
- async sendChecklist(chatId, title, items, params) {
1899
- return await this.#messageManager.sendChecklist(chatId, title, items, params);
1846
+ async editInlineMessageReplyMarkup(inlineMessageId, params) {
1847
+ await this.#messageManager.editInlineMessageReplyMarkup(inlineMessageId, params);
1900
1848
  }
1901
1849
  /**
1902
- * Send an invoice. Bot-only.
1850
+ * Edit an inline message's rich text. Bot-only.
1903
1851
  *
1904
1852
  * @method ms
1905
- * @param chatId The identifier of a chat to send the invoice to.
1906
- * @param title The invoice's title.
1907
- * @param description The invoice's description.
1908
- * @param payload The invoice's payload.
1909
- * @param currency The invoice's currency.
1910
- * @param prices The invoice's price tags.
1911
- * @returns The sent invoice.
1853
+ * @param inlineMessageId The identifier of the inline message.
1854
+ * @param richText The new rich text of the message.
1912
1855
  */
1913
- async sendInvoice(chatId, title, description, payload, currency, prices, params) {
1914
- return await this.#messageManager.sendInvoice(chatId, title, description, payload, currency, prices, params);
1856
+ async editInlineMessageRichText(inlineMessageId, richText, params) {
1857
+ return await this.#messageManager.editInlineMessageRichText(inlineMessageId, richText, params);
1915
1858
  }
1916
1859
  /**
1917
- * Edit a message's text.
1860
+ * Edit an inline message's text. Bot-only.
1918
1861
  *
1919
1862
  * @method ms
1920
- * @param chatId The identifier of the chat which the message belongs to.
1921
- * @param messageId The identifier of the message.
1863
+ * @param inlineMessageId The identifier of the inline message.
1922
1864
  * @param text The new text of the message.
1923
- * @returns The edited text message.
1924
1865
  */
1925
- async editMessageText(chatId, messageId, text, params) {
1926
- return await this.#messageManager.editMessageText(chatId, messageId, text, params);
1866
+ async editInlineMessageText(inlineMessageId, text, params) {
1867
+ await this.#messageManager.editInlineMessageText(inlineMessageId, text, params);
1927
1868
  }
1928
1869
  /**
1929
- * Edit a message's rich text.
1870
+ * Edit a message's caption.
1930
1871
  *
1931
1872
  * @method ms
1932
1873
  * @param chatId The identifier of the chat which the message belongs to.
1933
1874
  * @param messageId The identifier of the message.
1934
- * @param richText The new rich text of the message.
1935
- * @returns The edited rich text message.
1875
+ * @returns The edited message.
1936
1876
  */
1937
- async editMessageRichText(chatId, messageId, richText, params) {
1938
- return await this.#messageManager.editMessageRichText(chatId, messageId, richText, params);
1877
+ async editMessageCaption(chatId, messageId, params) {
1878
+ return await this.#messageManager.editMessageCaption(chatId, messageId, params);
1939
1879
  }
1940
1880
  /**
1941
- * Edit a message's caption.
1881
+ * Edit a message's live location.
1942
1882
  *
1943
1883
  * @method ms
1944
1884
  * @param chatId The identifier of the chat which the message belongs to.
1945
1885
  * @param messageId The identifier of the message.
1946
- * @returns The edited message.
1886
+ * @param latitude The new latitude.
1887
+ * @param longitude The new longitude.
1888
+ * @returns The edited location message.
1947
1889
  */
1948
- async editMessageCaption(chatId, messageId, params) {
1949
- return await this.#messageManager.editMessageCaption(chatId, messageId, params);
1890
+ async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
1891
+ return await this.#messageManager.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
1950
1892
  }
1951
1893
  /**
1952
1894
  * Edit a message's media.
@@ -1961,103 +1903,80 @@ export class Client extends Composer {
1961
1903
  return await this.#messageManager.editMessageMedia(chatId, messageId, media, params);
1962
1904
  }
1963
1905
  /**
1964
- * Edit an inline message's media.
1906
+ * Edit a message's reply markup.
1965
1907
  *
1966
1908
  * @method ms
1967
- * @param inlineMessageId The identifier of the inline message.
1968
- * @param media The new media of the message.
1909
+ * @param chatId The identifier of the chat which the message belongs to.
1910
+ * @param messageId The identifier of the message.
1911
+ * @returns The edited message.
1969
1912
  */
1970
- async editInlineMessageMedia(inlineMessageId, media, params) {
1971
- await this.#messageManager.editInlineMessageMedia(inlineMessageId, media, params);
1913
+ async editMessageReplyMarkup(chatId, messageId, params) {
1914
+ return await this.#messageManager.editMessageReplyMarkup(chatId, messageId, params);
1972
1915
  }
1973
1916
  /**
1974
- * Edit an inline message's rich text. Bot-only.
1917
+ * Edit a message's rich text.
1975
1918
  *
1976
1919
  * @method ms
1977
- * @param inlineMessageId The identifier of the inline message.
1920
+ * @param chatId The identifier of the chat which the message belongs to.
1921
+ * @param messageId The identifier of the message.
1978
1922
  * @param richText The new rich text of the message.
1923
+ * @returns The edited rich text message.
1979
1924
  */
1980
- async editInlineMessageRichText(inlineMessageId, richText, params) {
1981
- return await this.#messageManager.editInlineMessageRichText(inlineMessageId, richText, params);
1982
- }
1983
- /**
1984
- * Edit an inline message's text. Bot-only.
1985
- *
1986
- * @method ms
1987
- * @param inlineMessageId The identifier of the inline message.
1988
- * @param text The new text of the message.
1989
- */
1990
- async editInlineMessageText(inlineMessageId, text, params) {
1991
- await this.#messageManager.editInlineMessageText(inlineMessageId, text, params);
1992
- }
1993
- /**
1994
- * Edit an inline message's caption. Bot-only.
1995
- *
1996
- * @method ms
1997
- * @param inlineMessageId The identifier of the inline message.
1998
- */
1999
- async editInlineMessageCaption(inlineMessageId, params) {
2000
- await this.#messageManager.editInlineMessageCaption(inlineMessageId, params);
1925
+ async editMessageRichText(chatId, messageId, richText, params) {
1926
+ return await this.#messageManager.editMessageRichText(chatId, messageId, richText, params);
2001
1927
  }
2002
1928
  /**
2003
- * Edit a message's reply markup.
1929
+ * Edit a message's text.
2004
1930
  *
2005
1931
  * @method ms
2006
1932
  * @param chatId The identifier of the chat which the message belongs to.
2007
1933
  * @param messageId The identifier of the message.
2008
- * @returns The edited message.
1934
+ * @param text The new text of the message.
1935
+ * @returns The edited text message.
2009
1936
  */
2010
- async editMessageReplyMarkup(chatId, messageId, params) {
2011
- return await this.#messageManager.editMessageReplyMarkup(chatId, messageId, params);
1937
+ async editMessageText(chatId, messageId, text, params) {
1938
+ return await this.#messageManager.editMessageText(chatId, messageId, text, params);
2012
1939
  }
2013
1940
  /**
2014
- * Edit an inline message's reply markup. Bot-only.
1941
+ * Forward a single message.
2015
1942
  *
2016
1943
  * @method ms
2017
- * @param inlineMessageId The identifier of the inline message.
1944
+ * @param from The identifier of a chat to forward the message from.
1945
+ * @param to The identifier of a chat to forward the message to.
1946
+ * @param messageId The identifier of the message to forward.
1947
+ * @returns The forwarded message.
2018
1948
  */
2019
- async editInlineMessageReplyMarkup(inlineMessageId, params) {
2020
- await this.#messageManager.editInlineMessageReplyMarkup(inlineMessageId, params);
1949
+ async forwardMessage(from, to, messageId, params) {
1950
+ return (await this.forwardMessages(from, to, [messageId], params))[0];
2021
1951
  }
2022
1952
  /**
2023
- * Edit a message's live location.
1953
+ * Forward multiple messages.
2024
1954
  *
2025
1955
  * @method ms
2026
- * @param chatId The identifier of the chat which the message belongs to.
2027
- * @param messageId The identifier of the message.
2028
- * @param latitude The new latitude.
2029
- * @param longitude The new longitude.
2030
- * @returns The edited location message.
1956
+ * @param from The identifier of a chat to forward the messages from.
1957
+ * @param to The identifier of a chat to forward the messages to.
1958
+ * @param messageIds The identifiers of the messages to forward.
1959
+ * @returns The forwarded messages.
2031
1960
  */
2032
- async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
2033
- return await this.#messageManager.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
1961
+ async forwardMessages(from, to, messageIds, params) {
1962
+ return await this.#messageManager.forwardMessages(from, to, messageIds, params);
2034
1963
  }
2035
1964
  /**
2036
- * Edit an inline message's live location. Bot-only.
1965
+ * Get favorite stickers. User-only.
2037
1966
  *
2038
1967
  * @method ms
2039
- * @param inlineMessageId The identifier of the inline message.
2040
- * @param latitude The new latitude.
2041
- * @param longitude The new longitude.
2042
- * @returns The edited location message.
2043
1968
  */
2044
- async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
2045
- await this.#messageManager.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
1969
+ async getFavoriteStickers() {
1970
+ return await this.#messageManager.getFavoriteStickers();
2046
1971
  }
2047
1972
  /**
2048
- * Retrieve multiple messages.
1973
+ * Get the link preview for a message that is about to be sent. User-only.
2049
1974
  *
2050
1975
  * @method ms
2051
- * @param chatId The identifier of a chat to retrieve the messages from.
2052
- * @param messageIds The identifiers of the messages to retrieve.
2053
- * @example ```ts
2054
- * const message = await client.getMessages("@MTKruto", [210, 212]);
2055
- * ```
2056
- * @returns The retrieved messages.
2057
- * @cache
1976
+ * @param text The message's text.
2058
1977
  */
2059
- async getMessages(chatId, messageIds) {
2060
- return await this.#messageManager.getMessages(chatId, messageIds);
1978
+ async getLinkPreview(text, params) {
1979
+ return await this.#linkPreviewManager.getLinkPreview(text, params);
2061
1980
  }
2062
1981
  /**
2063
1982
  * Retrieve a single message.
@@ -2075,87 +1994,142 @@ export class Client extends Composer {
2075
1994
  return await this.#messageManager.getMessage(chatId, messageId);
2076
1995
  }
2077
1996
  /**
2078
- * Retrieve a message using its link.
1997
+ * Get the counters of a single message. User-only.
2079
1998
  *
2080
1999
  * @method ms
2081
- * @param link A message link.
2082
- * @example ```ts
2083
- * const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
2084
- * ```
2085
- * @returns The message that was linked to.
2000
+ * @param chatId The identifier of the chat including the message.
2001
+ * @param messageId The identifier of the message.
2086
2002
  */
2087
- async resolveMessageLink(link) {
2088
- return await this.#messageManager.resolveMessageLink(link);
2003
+ async getMessageCounters(chatId, messageId) {
2004
+ return await this.#messageManager.getMessageCounters(chatId, messageId);
2089
2005
  }
2090
2006
  /**
2091
- * Delete multiple messages.
2007
+ * Get a list of reactions made to a message. User-only.
2092
2008
  *
2009
+ * @param chatId The identifier of a chat.
2010
+ * @param messageId The identifier of the message.
2093
2011
  * @method ms
2094
- * @param chatId The identifier of the chat which the message belongs to.
2095
- * @param messageIds The identifiers of the messages to delete.
2096
2012
  */
2097
- async deleteMessages(chatId, messageIds, params) {
2098
- await this.#messageManager.deleteMessages(chatId, messageIds, params);
2013
+ async getMessageReactions(chatId, messageId, params) {
2014
+ return await this.#messageManager.getMessageReactions(chatId, messageId, params);
2099
2015
  }
2100
2016
  /**
2101
- * Delete a single message.
2017
+ * Get a message's read date. User-only.
2102
2018
  *
2103
2019
  * @method ms
2104
- * @param chatId The identifier of the chat which the message belongs to.
2105
- * @param messageId The identifier of the message to delete.
2020
+ * @param chatId The identifier of a chat.
2021
+ * @param messageId The identifier of the message.
2106
2022
  */
2107
- async deleteMessage(chatId, messageId, params) {
2108
- await this.#messageManager.deleteMessages(chatId, [messageId], params);
2023
+ async getMessageReadDate(chatId, messageId) {
2024
+ return await this.#messageManager.getMessageReadDate(chatId, messageId);
2109
2025
  }
2110
2026
  /**
2111
- * Delete all messages sent by a specific member of a chat. User-only.
2027
+ * Retrieve multiple messages.
2112
2028
  *
2113
2029
  * @method ms
2114
- * @param chatId The identifier of a chat. Must be a supergroup.
2115
- * @param memberId The identifier of the member.
2030
+ * @param chatId The identifier of a chat to retrieve the messages from.
2031
+ * @param messageIds The identifiers of the messages to retrieve.
2032
+ * @example ```ts
2033
+ * const message = await client.getMessages("@MTKruto", [210, 212]);
2034
+ * ```
2035
+ * @returns The retrieved messages.
2036
+ * @cache
2116
2037
  */
2117
- async deleteChatMemberMessages(chatId, memberId) {
2118
- await this.#messageManager.deleteChatMemberMessages(chatId, memberId);
2038
+ async getMessages(chatId, messageIds) {
2039
+ return await this.#messageManager.getMessages(chatId, messageIds);
2119
2040
  }
2120
2041
  /**
2121
- * Delete multiple scheduled messages.
2042
+ * Get the counters of multiple messages. User-only.
2122
2043
  *
2123
2044
  * @method ms
2124
- * @param chatId The identifier of a chat.
2125
- * @param messageIds The identifiers of the scheduled messages to delete.
2045
+ * @param chatId The identifier of the chat including the messages.
2046
+ * @param messageIds The identifiers of the messages.
2126
2047
  */
2127
- async deleteScheduledMessages(chatId, messageIds) {
2128
- await this.#messageManager.deleteScheduledMessages(chatId, messageIds);
2048
+ async getMessagesCounters(chatId, messageIds) {
2049
+ return await this.#messageManager.getMessagesCounters(chatId, messageIds);
2129
2050
  }
2130
2051
  /**
2131
- * Delete a scheduled message.
2052
+ * Get a message's viewers. User-only.
2132
2053
  *
2133
2054
  * @method ms
2134
2055
  * @param chatId The identifier of a chat.
2135
- * @param messageId The identifier of the scheduled message to delete.
2056
+ * @param messageId The identifier of the message.
2057
+ * @returns The message's viewers.
2136
2058
  */
2137
- async deleteScheduledMessage(chatId, messageId) {
2138
- await this.#messageManager.deleteScheduledMessage(chatId, messageId);
2059
+ async getMessageViewers(chatId, messageId) {
2060
+ return await this.#messageManager.getMessageViewers(chatId, messageId);
2139
2061
  }
2140
2062
  /**
2141
- * Send multiple scheduled messages before their schedule.
2063
+ * Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
2142
2064
  *
2143
2065
  * @method ms
2144
- * @param chatId The identifier of a chat.
2145
- * @param messageIds The identifiers of the scheduled messages to send.
2066
+ * @cache
2146
2067
  */
2147
- async sendScheduledMessages(chatId, messageIds) {
2148
- return await this.#messageManager.sendScheduledMessages(chatId, messageIds);
2068
+ async getProgressId() {
2069
+ return await this.#fileManager.getProgressId();
2149
2070
  }
2150
2071
  /**
2151
- * Send a scheduled message before its schedule.
2072
+ * Get recent stickers. User-only.
2073
+ *
2074
+ * @method ms
2075
+ */
2076
+ async getRecentStickers() {
2077
+ return await this.#messageManager.getRecentStickers();
2078
+ }
2079
+ /**
2080
+ * Get a message's full rich text. User-only.
2081
+ *
2082
+ * @method ms
2083
+ * @param chatId The identifier of the chat including the message.
2084
+ * @param messageId The identifier of the message.
2085
+ */
2086
+ async getRichText(chatId, messageId) {
2087
+ return await this.#messageManager.getRichText(chatId, messageId);
2088
+ }
2089
+ /**
2090
+ * Get saved animations. User-only.
2091
+ *
2092
+ * @method ms
2093
+ */
2094
+ async getSavedAnimations() {
2095
+ return await this.#messageManager.getSavedAnimations();
2096
+ }
2097
+ /**
2098
+ * Get a list of saved chats.
2099
+ *
2100
+ * @method ms
2101
+ */
2102
+ async getSavedChats(params) {
2103
+ return await this.#messageManager.getSavedChats(params);
2104
+ }
2105
+ /**
2106
+ * Get messages saved from a specific chat.
2152
2107
  *
2153
2108
  * @method ms
2154
2109
  * @param chatId The identifier of a chat.
2155
- * @param messageId The identifier of the scheduled message to send.
2156
2110
  */
2157
- async sendScheduledMessage(chatId, messageId) {
2158
- return await this.#messageManager.sendScheduledMessage(chatId, messageId);
2111
+ async getSavedMessages(chatId, params) {
2112
+ return await this.#messageManager.getSavedMessages(chatId, params);
2113
+ }
2114
+ /**
2115
+ * Get the scheduled messages of a chat. User-only.
2116
+ *
2117
+ * @method ms
2118
+ * @param chatId The identifier of the chat including the scheduled messages.
2119
+ */
2120
+ async getScheduledMessages(chatId) {
2121
+ return await this.#messageManager.getScheduledMessages(chatId);
2122
+ }
2123
+ /**
2124
+ * Open a mini app. User-only.
2125
+ *
2126
+ * @method ms
2127
+ * @param botId The identifier of a bot with the mini app.
2128
+ * @param chatId The identifier of the chat from which the mini app is opened.
2129
+ * @cache
2130
+ */
2131
+ async openMiniApp(botId, chatId, params) {
2132
+ return await this.#messageManager.openMiniApp(botId, chatId, params);
2159
2133
  }
2160
2134
  /**
2161
2135
  * Pin a message in a chat.
@@ -2168,58 +2142,84 @@ export class Client extends Composer {
2168
2142
  await this.#messageManager.pinMessage(chatId, messageId, params);
2169
2143
  }
2170
2144
  /**
2171
- * Unpin a pinned message.
2145
+ * Mark messages as read. User-only.
2172
2146
  *
2173
2147
  * @method ms
2174
- * @param chatId The identifier of a chat.
2175
- * @param messageId The identifier of the message.
2148
+ * @param chatId The identifier of the chat which the messages belong to.
2149
+ * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
2176
2150
  */
2177
- async unpinMessage(chatId, messageId, params) {
2178
- await this.#messageManager.unpinMessage(chatId, messageId, params);
2151
+ async readMessages(chatId, untilMessageId) {
2152
+ await this.#messageManager.readMessages(chatId, untilMessageId);
2179
2153
  }
2180
2154
  /**
2181
- * Unpin all pinned messages.
2155
+ * Remove a sticker from favorites. User-only.
2182
2156
  *
2183
2157
  * @method ms
2184
- * @param chatId The identifier of a chat.
2158
+ * @param fileId The file identifier of the sticker.
2185
2159
  */
2186
- async unpinMessages(chatId, params) {
2187
- await this.#messageManager.unpinMessages(chatId, params);
2160
+ async removeStickerFromFavorites(fileId) {
2161
+ return await this.#messageManager.removeStickerFromFavorites(fileId);
2188
2162
  }
2189
2163
  /**
2190
- * Forward multiple messages.
2164
+ * Remove a sticker from recents. User-only.
2191
2165
  *
2192
2166
  * @method ms
2193
- * @param from The identifier of a chat to forward the messages from.
2194
- * @param to The identifier of a chat to forward the messages to.
2195
- * @param messageIds The identifiers of the messages to forward.
2196
- * @returns The forwarded messages.
2167
+ * @param fileId The file identifier of the sticker.
2197
2168
  */
2198
- async forwardMessages(from, to, messageIds, params) {
2199
- return await this.#messageManager.forwardMessages(from, to, messageIds, params);
2169
+ async removeStickerFromRecents(fileId) {
2170
+ return await this.#messageManager.removeStickerFromRecents(fileId);
2200
2171
  }
2201
2172
  /**
2202
- * Forward a single message.
2173
+ * Retrieve a message using its link.
2203
2174
  *
2204
2175
  * @method ms
2205
- * @param from The identifier of a chat to forward the message from.
2206
- * @param to The identifier of a chat to forward the message to.
2207
- * @param messageId The identifier of the message to forward.
2208
- * @returns The forwarded message.
2176
+ * @param link A message link.
2177
+ * @example ```ts
2178
+ * const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
2179
+ * ```
2180
+ * @returns The message that was linked to.
2209
2181
  */
2210
- async forwardMessage(from, to, messageId, params) {
2211
- return (await this.forwardMessages(from, to, [messageId], params))[0];
2182
+ async resolveMessageLink(link) {
2183
+ return await this.#messageManager.resolveMessageLink(link);
2212
2184
  }
2213
2185
  /**
2214
- * Stop a poll.
2186
+ * Save an animation. User-only.
2215
2187
  *
2216
2188
  * @method ms
2217
- * @param chatId The chat that includes the poll.
2218
- * @param messageId The identifier of the poll's message.
2219
- * @returns The new state of the poll.
2189
+ * @param fileId The file identifier of the animation.
2220
2190
  */
2221
- async stopPoll(chatId, messageId, params) {
2222
- return await this.#messageManager.stopPoll(chatId, messageId, params);
2191
+ async saveAnimation(fileId) {
2192
+ return await this.#messageManager.saveAnimation(fileId);
2193
+ }
2194
+ /**
2195
+ * Search for messages. User-only.
2196
+ *
2197
+ * @method ms
2198
+ */
2199
+ async searchMessages(params) {
2200
+ return await this.#messageManager.searchMessages(params);
2201
+ }
2202
+ /**
2203
+ * Send an animation.
2204
+ *
2205
+ * @method ms
2206
+ * @param chatId The identifier of a chat to send the animation to.
2207
+ * @param animation The animation to send.
2208
+ * @returns The sent animation.
2209
+ */
2210
+ async sendAnimation(chatId, animation, params) {
2211
+ return await this.#messageManager.sendAnimation(chatId, animation, params);
2212
+ }
2213
+ /**
2214
+ * Send an audio file.
2215
+ *
2216
+ * @method ms
2217
+ * @param chatId The identifier of a chat to send the audio file to.
2218
+ * @param audio The audio to send.
2219
+ * @returns The sent audio file.
2220
+ */
2221
+ async sendAudio(chatId, audio, params) {
2222
+ return await this.#messageManager.sendAudio(chatId, audio, params);
2223
2223
  }
2224
2224
  /**
2225
2225
  * Send a chat action.
@@ -2232,367 +2232,451 @@ export class Client extends Composer {
2232
2232
  await this.#messageManager.sendChatAction(chatId, action, params);
2233
2233
  }
2234
2234
  /**
2235
- * Search for messages. User-only.
2235
+ * Send a checklist.
2236
2236
  *
2237
2237
  * @method ms
2238
+ * @param chatId The identifier of a chat to send the checklist to.
2239
+ * @param title The checklist's title.
2240
+ * @param items The checklist's items.
2241
+ * @returns The sent checklist.
2238
2242
  */
2239
- async searchMessages(params) {
2240
- return await this.#messageManager.searchMessages(params);
2243
+ async sendChecklist(chatId, title, items, params) {
2244
+ return await this.#messageManager.sendChecklist(chatId, title, items, params);
2241
2245
  }
2242
2246
  /**
2243
- * Mark messages as read. User-only.
2247
+ * Send a contact.
2244
2248
  *
2245
2249
  * @method ms
2246
- * @param chatId The identifier of the chat which the messages belong to.
2247
- * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
2250
+ * @param chatId The identifier of a chat to send the contact to.
2251
+ * @param firstName The contact's first name.
2252
+ * @param phoneNumber The contact's phone number.
2253
+ * @returns The sent contact.
2248
2254
  */
2249
- async readMessages(chatId, untilMessageId) {
2250
- await this.#messageManager.readMessages(chatId, untilMessageId);
2255
+ async sendContact(chatId, firstName, phoneNumber, params) {
2256
+ return await this.#messageManager.sendContact(chatId, firstName, phoneNumber, params);
2251
2257
  }
2252
2258
  /**
2253
- * Start a bot. User-only.
2259
+ * Send a dice.
2254
2260
  *
2255
2261
  * @method ms
2256
- * @param botId The identifier of the bot to start.
2257
- * @returns The start message.
2262
+ * @param chatId The identifier of a chat to send the dice to.
2263
+ * @returns The sent dice.
2258
2264
  */
2259
- async startBot(botId, params) {
2260
- return await this.#messageManager.startBot(botId, params);
2265
+ async sendDice(chatId, params) {
2266
+ return await this.#messageManager.sendDice(chatId, params);
2261
2267
  }
2262
2268
  /**
2263
- * Transcribe a voice message. User-only.
2269
+ * Send a document.
2264
2270
  *
2265
2271
  * @method ms
2266
- * @param chatId The identifier of the chat which the message belongs to.
2267
- * @param messageId The identifier of the message.
2268
- * @cache
2272
+ * @param chatId The identifier of a chat to send the document to.
2273
+ * @param document The document to send.
2274
+ * @returns The sent document.
2269
2275
  */
2270
- async transcribeVoice(chatId, messageId) {
2271
- return await this.#messageManager.transcribeVoice(chatId, messageId);
2276
+ async sendDocument(chatId, document, params) {
2277
+ return await this.#messageManager.sendDocument(chatId, document, params);
2272
2278
  }
2273
- /*
2274
- * Get the link preview for a message that is about to be sent. User-only.
2279
+ /**
2280
+ * Send an invoice. Bot-only.
2275
2281
  *
2276
2282
  * @method ms
2277
- * @param text The message's text.
2283
+ * @param chatId The identifier of a chat to send the invoice to.
2284
+ * @param title The invoice's title.
2285
+ * @param description The invoice's description.
2286
+ * @param payload The invoice's payload.
2287
+ * @param currency The invoice's currency.
2288
+ * @param prices The invoice's price tags.
2289
+ * @returns The sent invoice.
2278
2290
  */
2279
- async getLinkPreview(text, params) {
2280
- return await this.#linkPreviewManager.getLinkPreview(text, params);
2291
+ async sendInvoice(chatId, title, description, payload, currency, prices, params) {
2292
+ return await this.#messageManager.sendInvoice(chatId, title, description, payload, currency, prices, params);
2281
2293
  }
2282
2294
  /**
2283
- * Open a mini app. User-only.
2295
+ * Send a live photo.
2284
2296
  *
2285
2297
  * @method ms
2286
- * @param botId The identifier of a bot with the mini app.
2287
- * @param chatId The identifier of the chat from which the mini app is opened.
2288
- * @cache
2298
+ * @param chatId The identifier of a chat to send the photo to.
2299
+ * @param photo The photo to send.
2300
+ * @param video The video version of the photo.
2301
+ * @returns The sent live photo.
2289
2302
  */
2290
- async openMiniApp(botId, chatId, params) {
2291
- return await this.#messageManager.openMiniApp(botId, chatId, params);
2303
+ async sendLivePhoto(chatId, photo, video, params) {
2304
+ return await this.#messageManager.sendLivePhoto(chatId, photo, video, params);
2305
+ }
2306
+ /**
2307
+ * Send a location.
2308
+ *
2309
+ * @method ms
2310
+ * @param chatId The identifier of a chat to send the location to.
2311
+ * @param latitude The location's latitude.
2312
+ * @param longitude The location's longitude.
2313
+ * @returns The sent location.
2314
+ */
2315
+ async sendLocation(chatId, latitude, longitude, params) {
2316
+ return await this.#messageManager.sendLocation(chatId, latitude, longitude, params);
2317
+ }
2318
+ /**
2319
+ * Send a media group.
2320
+ *
2321
+ * @method ms
2322
+ * @param chatId The identifier of a chat to send the media group to.
2323
+ * @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.
2324
+ * @returns The sent messages.
2325
+ */
2326
+ async sendMediaGroup(chatId, media, params) {
2327
+ return await this.#messageManager.sendMediaGroup(chatId, media, params);
2292
2328
  }
2293
2329
  /**
2294
- * Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
2330
+ * Send a text message.
2295
2331
  *
2296
2332
  * @method ms
2297
- * @cache
2333
+ * @param chatId The identifier of a chat to send the message to.
2334
+ * @param text The message's text.
2335
+ * @returns The sent text message.
2298
2336
  */
2299
- async getProgressId() {
2300
- return await this.#fileManager.getProgressId();
2337
+ async sendMessage(chatId, text, params) {
2338
+ return await this.#messageManager.sendMessage(chatId, text, params);
2301
2339
  }
2302
2340
  /**
2303
- * Get messages saved from a specific chat.
2341
+ * Stream a drafted text message. Bot-only.
2304
2342
  *
2305
2343
  * @method ms
2306
- * @param chatId The identifier of a chat.
2344
+ * @param chatId The identifier of a chat to send the message to.
2345
+ * @param draftId The identifier of the draft.
2346
+ * @param text The message's text.
2307
2347
  */
2308
- async getSavedMessages(chatId, params) {
2309
- return await this.#messageManager.getSavedMessages(chatId, params);
2348
+ async sendMessageDraft(chatId, draftId, text, params) {
2349
+ await this.#messageManager.sendMessageDraft(chatId, draftId, text, params);
2310
2350
  }
2311
2351
  /**
2312
- * Get a list of saved chats.
2352
+ * Send a photo.
2313
2353
  *
2314
2354
  * @method ms
2355
+ * @param chatId The identifier of a chat to send the photo to.
2356
+ * @param photo The photo to send.
2357
+ * @returns The sent photo.
2315
2358
  */
2316
- async getSavedChats(params) {
2317
- return await this.#messageManager.getSavedChats(params);
2359
+ async sendPhoto(chatId, photo, params) {
2360
+ return await this.#messageManager.sendPhoto(chatId, photo, params);
2318
2361
  }
2319
2362
  /**
2320
- * Get a list of reactions made to a message. User-only.
2363
+ * Send a poll.
2321
2364
  *
2322
- * @param chatId The identifier of a chat.
2323
- * @param messageId The identifier of the message.
2324
2365
  * @method ms
2366
+ * @param chatId The identifier of a chat to send the poll to.
2367
+ * @param question The poll's question.
2368
+ * @param options The poll's options.
2369
+ * @returns The sent poll.
2325
2370
  */
2326
- async getMessageReactions(chatId, messageId, params) {
2327
- return await this.#messageManager.getMessageReactions(chatId, messageId, params);
2371
+ async sendPoll(chatId, question, options, params) {
2372
+ return await this.#messageManager.sendPoll(chatId, question, options, params);
2328
2373
  }
2329
2374
  /**
2330
- * Set a reaction as default. User-only.
2375
+ * Send a rich text message.
2331
2376
  *
2332
2377
  * @method ms
2333
- * @param reaction The reaction to set as default.
2378
+ * @param chatId The identifier of a chat to send the message to.
2379
+ * @param richText The message's rich text.
2380
+ * @returns The sent rich text message.
2334
2381
  */
2335
- async setDefaultReaction(reaction) {
2336
- await this.#messageManager.setDefaultReaction(reaction);
2382
+ async sendRichText(chatId, richText, params) {
2383
+ return await this.#messageManager.sendRichText(chatId, richText, params);
2337
2384
  }
2338
2385
  /**
2339
- * Clear all message drafts. User-only.
2386
+ * Stream a drafted rich text message. Bot-only.
2340
2387
  *
2341
2388
  * @method ms
2389
+ * @param chatId The identifier of a chat to send the message to.
2390
+ * @param draftId The identifier of the draft.
2391
+ * @param richText The message's rich text.
2342
2392
  */
2343
- async clearDrafts() {
2344
- await this.#messageManager.clearDrafts();
2393
+ async sendRichTextDraft(chatId, draftId, richText, params) {
2394
+ return await this.#messageManager.sendRichTextDraft(chatId, draftId, richText, params);
2345
2395
  }
2346
2396
  /**
2347
- * Summarize a message's text. User-only.
2397
+ * Send a scheduled message before its schedule.
2348
2398
  *
2349
2399
  * @method ms
2350
2400
  * @param chatId The identifier of a chat.
2351
- * @param messageId The identifier of a message.
2401
+ * @param messageId The identifier of the scheduled message to send.
2352
2402
  */
2353
- async summarizeText(chatId, messageId, params) {
2354
- return await this.#messageManager.summarizeText(chatId, messageId, params);
2403
+ async sendScheduledMessage(chatId, messageId) {
2404
+ return await this.#messageManager.sendScheduledMessage(chatId, messageId);
2355
2405
  }
2356
2406
  /**
2357
- * View multiple messages. User-only.
2407
+ * Send multiple scheduled messages before their schedule.
2358
2408
  *
2359
2409
  * @method ms
2360
- * @param chatId The identifier of the chat including the messages.
2361
- * @param messageIds The identifiers of the messages.
2410
+ * @param chatId The identifier of a chat.
2411
+ * @param messageIds The identifiers of the scheduled messages to send.
2362
2412
  */
2363
- async viewMessages(chatId, messageIds) {
2364
- return await this.#messageManager.viewMessages(chatId, messageIds);
2413
+ async sendScheduledMessages(chatId, messageIds) {
2414
+ return await this.#messageManager.sendScheduledMessages(chatId, messageIds);
2365
2415
  }
2366
2416
  /**
2367
- * View a single message. User-only.
2417
+ * Send a screenshot notification. User-only.
2368
2418
  *
2369
2419
  * @method ms
2370
- * @param chatId The identifier of the chat including the message.
2371
- * @param messageId The identifier of the message.
2420
+ * @param chatId The identifier of a chat.
2421
+ * @param replyToMessageId The identifier of the message.
2372
2422
  */
2373
- async viewMessage(chatId, messageId) {
2374
- return await this.#messageManager.viewMessage(chatId, messageId);
2423
+ async sendScreenshotNotification(chatId, replyToMessageId) {
2424
+ return await this.#messageManager.sendScreenshotNotification(chatId, replyToMessageId);
2375
2425
  }
2376
2426
  /**
2377
- * Translate multiple texts. User-only.
2427
+ * Send a sticker.
2378
2428
  *
2379
2429
  * @method ms
2380
- * @param toLanguage The code of the language to translate into.
2381
- * @param texts The texts to translate.
2430
+ * @param chatId The identifier of a chat to send the sticker to.
2431
+ * @param sticker The sticker to send.
2432
+ * @returns The sent sticker.
2382
2433
  */
2383
- async translateTexts(toLanguage, texts, params) {
2384
- return await this.#messageManager.translateTexts(toLanguage, texts, params);
2434
+ async sendSticker(chatId, sticker, params) {
2435
+ return await this.#messageManager.sendSticker(chatId, sticker, params);
2385
2436
  }
2386
2437
  /**
2387
- * Translate a single text. User-only.
2438
+ * Send a venue.
2388
2439
  *
2389
2440
  * @method ms
2390
- * @param toLanguage The code of the language to translate into.
2391
- * @param text The text to translate.
2441
+ * @param chatId The identifier of a chat to send the venue to.
2442
+ * @param latitude The latitude of the venue.
2443
+ * @param longitude The longitude of the venue.
2444
+ * @param title The title of the venue.
2445
+ * @param address The written address of the venue.
2446
+ * @returns The sent venue.
2392
2447
  */
2393
- async translateText(toLanguage, text, params) {
2394
- return await this.#messageManager.translateText(toLanguage, text, params);
2448
+ async sendVenue(chatId, latitude, longitude, title, address, params) {
2449
+ return await this.#messageManager.sendVenue(chatId, latitude, longitude, title, address, params);
2395
2450
  }
2396
2451
  /**
2397
- * Translate multiple texts. User-only.
2452
+ * Send a video.
2398
2453
  *
2399
2454
  * @method ms
2400
- * @param toLanguage The code of the language to translate into.
2401
- * @param chatId The identifier of the chat including the messages.
2402
- * @param messageIds The identifiers of the messages to translate.
2455
+ * @param chatId The identifier of a chat to send the video to.
2456
+ * @param video The video to send.
2457
+ * @returns The sent video.
2403
2458
  */
2404
- async translateMessages(toLanguage, chatId, messageIds, params) {
2405
- return await this.#messageManager.translateMessages(toLanguage, chatId, messageIds, params);
2459
+ async sendVideo(chatId, video, params) {
2460
+ return await this.#messageManager.sendVideo(chatId, video, params);
2406
2461
  }
2407
2462
  /**
2408
- * Translate a single text. User-only.
2463
+ * Send a video note.
2409
2464
  *
2410
2465
  * @method ms
2411
- * @param toLanguage The code of the language to translate into.
2412
- * @param chatId The identifier of the chat including the message.
2413
- * @param messageId The identifier of the message to translate.
2466
+ * @param chatId The identifier of a chat to send the video note to.
2467
+ * @param videoNote The video note to send.
2468
+ * @returns The sent video note.
2414
2469
  */
2415
- async translateMessage(toLanguage, chatId, messageId, params) {
2416
- return await this.#messageManager.translateMessage(toLanguage, chatId, messageId, params);
2470
+ async sendVideoNote(chatId, videoNote, params) {
2471
+ return await this.#messageManager.sendVideoNote(chatId, videoNote, params);
2417
2472
  }
2418
2473
  /**
2419
- * Get the counters of multiple messages. User-only.
2474
+ * Send a voice message.
2420
2475
  *
2421
2476
  * @method ms
2422
- * @param chatId The identifier of the chat including the messages.
2423
- * @param messageIds The identifiers of the messages.
2477
+ * @param chatId The identifier of a chat to send the voice message to.
2478
+ * @param voice The voice to send.
2479
+ * @returns The sent voice message.
2424
2480
  */
2425
- async getMessagesCounters(chatId, messageIds) {
2426
- return await this.#messageManager.getMessagesCounters(chatId, messageIds);
2481
+ async sendVoice(chatId, voice, params) {
2482
+ return await this.#messageManager.sendVoice(chatId, voice, params);
2427
2483
  }
2428
2484
  /**
2429
- * Get the counters of a single message. User-only.
2485
+ * Set a reaction as default. User-only.
2430
2486
  *
2431
2487
  * @method ms
2432
- * @param chatId The identifier of the chat including the message.
2433
- * @param messageId The identifier of the message.
2488
+ * @param reaction The reaction to set as default.
2434
2489
  */
2435
- async getMessageCounters(chatId, messageId) {
2436
- return await this.#messageManager.getMessageCounters(chatId, messageId);
2490
+ async setDefaultReaction(reaction) {
2491
+ await this.#messageManager.setDefaultReaction(reaction);
2437
2492
  }
2438
2493
  /**
2439
- * Get a message's full rich text. User-only.
2494
+ * Start a bot. User-only.
2440
2495
  *
2441
2496
  * @method ms
2442
- * @param chatId The identifier of the chat including the message.
2443
- * @param messageId The identifier of the message.
2497
+ * @param botId The identifier of the bot to start.
2498
+ * @returns The start message.
2444
2499
  */
2445
- async getRichText(chatId, messageId) {
2446
- return await this.#messageManager.getRichText(chatId, messageId);
2500
+ async startBot(botId, params) {
2501
+ return await this.#messageManager.startBot(botId, params);
2447
2502
  }
2448
2503
  /**
2449
- * Get the scheduled messages of a chat. User-only.
2504
+ * Stop a poll.
2450
2505
  *
2451
2506
  * @method ms
2452
- * @param chatId The identifier of the chat including the scheduled messages.
2507
+ * @param chatId The chat that includes the poll.
2508
+ * @param messageId The identifier of the poll's message.
2509
+ * @returns The new state of the poll.
2453
2510
  */
2454
- async getScheduledMessages(chatId) {
2455
- return await this.#messageManager.getScheduledMessages(chatId);
2511
+ async stopPoll(chatId, messageId, params) {
2512
+ return await this.#messageManager.stopPoll(chatId, messageId, params);
2456
2513
  }
2457
2514
  /**
2458
- * Get favorite stickers. User-only.
2515
+ * Summarize a message's text. User-only.
2459
2516
  *
2460
2517
  * @method ms
2518
+ * @param chatId The identifier of a chat.
2519
+ * @param messageId The identifier of a message.
2461
2520
  */
2462
- async getFavoriteStickers() {
2463
- return await this.#messageManager.getFavoriteStickers();
2521
+ async summarizeText(chatId, messageId, params) {
2522
+ return await this.#messageManager.summarizeText(chatId, messageId, params);
2464
2523
  }
2465
2524
  /**
2466
- * Add a sticker to favorites. User-only.
2525
+ * Transcribe a voice message. User-only.
2467
2526
  *
2468
2527
  * @method ms
2469
- * @param fileId The file identifier of the sticker.
2528
+ * @param chatId The identifier of the chat which the message belongs to.
2529
+ * @param messageId The identifier of the message.
2530
+ * @cache
2470
2531
  */
2471
- async addStickerToFavorites(fileId) {
2472
- return await this.#messageManager.addStickerToFavorites(fileId);
2532
+ async transcribeVoice(chatId, messageId) {
2533
+ return await this.#messageManager.transcribeVoice(chatId, messageId);
2473
2534
  }
2474
2535
  /**
2475
- * Remove a sticker from favorites. User-only.
2536
+ * Translate a single text. User-only.
2476
2537
  *
2477
2538
  * @method ms
2478
- * @param fileId The file identifier of the sticker.
2539
+ * @param toLanguage The code of the language to translate into.
2540
+ * @param chatId The identifier of the chat including the message.
2541
+ * @param messageId The identifier of the message to translate.
2479
2542
  */
2480
- async removeStickerFromFavorites(fileId) {
2481
- return await this.#messageManager.removeStickerFromFavorites(fileId);
2543
+ async translateMessage(toLanguage, chatId, messageId, params) {
2544
+ return await this.#messageManager.translateMessage(toLanguage, chatId, messageId, params);
2482
2545
  }
2483
2546
  /**
2484
- * Add a sticker to recents. User-only.
2547
+ * Translate multiple texts. User-only.
2485
2548
  *
2486
2549
  * @method ms
2487
- * @param fileId The file identifier of the sticker.
2550
+ * @param toLanguage The code of the language to translate into.
2551
+ * @param chatId The identifier of the chat including the messages.
2552
+ * @param messageIds The identifiers of the messages to translate.
2488
2553
  */
2489
- async addStickerToRecents(fileId) {
2490
- return await this.#messageManager.addStickerToRecents(fileId);
2554
+ async translateMessages(toLanguage, chatId, messageIds, params) {
2555
+ return await this.#messageManager.translateMessages(toLanguage, chatId, messageIds, params);
2491
2556
  }
2492
2557
  /**
2493
- * Remove a sticker from recents. User-only.
2558
+ * Translate a single text. User-only.
2494
2559
  *
2495
2560
  * @method ms
2496
- * @param fileId The file identifier of the sticker.
2561
+ * @param toLanguage The code of the language to translate into.
2562
+ * @param text The text to translate.
2497
2563
  */
2498
- async removeStickerFromRecents(fileId) {
2499
- return await this.#messageManager.removeStickerFromRecents(fileId);
2564
+ async translateText(toLanguage, text, params) {
2565
+ return await this.#messageManager.translateText(toLanguage, text, params);
2500
2566
  }
2501
2567
  /**
2502
- * Get recent stickers. User-only.
2568
+ * Translate multiple texts. User-only.
2503
2569
  *
2504
2570
  * @method ms
2571
+ * @param toLanguage The code of the language to translate into.
2572
+ * @param texts The texts to translate.
2505
2573
  */
2506
- async getRecentStickers() {
2507
- return await this.#messageManager.getRecentStickers();
2574
+ async translateTexts(toLanguage, texts, params) {
2575
+ return await this.#messageManager.translateTexts(toLanguage, texts, params);
2508
2576
  }
2509
2577
  /**
2510
- * Clear recent stickers. User-only.
2578
+ * Unpin a pinned message.
2511
2579
  *
2512
2580
  * @method ms
2581
+ * @param chatId The identifier of a chat.
2582
+ * @param messageId The identifier of the message.
2513
2583
  */
2514
- async clearRecentStickers() {
2515
- return await this.#messageManager.clearRecentStickers();
2584
+ async unpinMessage(chatId, messageId, params) {
2585
+ await this.#messageManager.unpinMessage(chatId, messageId, params);
2516
2586
  }
2517
2587
  /**
2518
- * Get saved animations. User-only.
2588
+ * Unpin all pinned messages.
2519
2589
  *
2520
2590
  * @method ms
2591
+ * @param chatId The identifier of a chat.
2521
2592
  */
2522
- async getSavedAnimations() {
2523
- return await this.#messageManager.getSavedAnimations();
2593
+ async unpinMessages(chatId, params) {
2594
+ await this.#messageManager.unpinMessages(chatId, params);
2524
2595
  }
2525
2596
  /**
2526
- * Save an animation. User-only.
2597
+ * Unsave an animation. User-only.
2527
2598
  *
2528
2599
  * @method ms
2529
2600
  * @param fileId The file identifier of the animation.
2530
2601
  */
2531
- async saveAnimation(fileId) {
2532
- return await this.#messageManager.saveAnimation(fileId);
2602
+ async unsaveAnimation(fileId) {
2603
+ return await this.#messageManager.unsaveAnimation(fileId);
2533
2604
  }
2534
2605
  /**
2535
- * Unsave an animation. User-only.
2606
+ * View a single message. User-only.
2536
2607
  *
2537
2608
  * @method ms
2538
- * @param fileId The file identifier of the animation.
2609
+ * @param chatId The identifier of the chat including the message.
2610
+ * @param messageId The identifier of the message.
2539
2611
  */
2540
- async unsaveAnimation(fileId) {
2541
- return await this.#messageManager.unsaveAnimation(fileId);
2612
+ async viewMessage(chatId, messageId) {
2613
+ return await this.#messageManager.viewMessage(chatId, messageId);
2542
2614
  }
2543
2615
  /**
2544
- * Get a message's read date. User-only.
2616
+ * View multiple messages. User-only.
2545
2617
  *
2546
2618
  * @method ms
2547
- * @param chatId The identifier of a chat.
2548
- * @param messageId The identifier of the message.
2619
+ * @param chatId The identifier of the chat including the messages.
2620
+ * @param messageIds The identifiers of the messages.
2549
2621
  */
2550
- async getMessageReadDate(chatId, messageId) {
2551
- return await this.#messageManager.getMessageReadDate(chatId, messageId);
2622
+ async viewMessages(chatId, messageIds) {
2623
+ return await this.#messageManager.viewMessages(chatId, messageIds);
2552
2624
  }
2553
2625
  //
2554
2626
  // ========================= POLLS ========================= //
2555
2627
  //
2556
2628
  /**
2557
- * Cast a vote. User-only.
2629
+ * Add an option to a poll. User-only.
2558
2630
  *
2559
2631
  * @method pl
2560
2632
  * @param chatId The identifier of the chat that includes the poll.
2561
2633
  * @param messageId The identifier of the message that includes the poll.
2562
- * @param optionIndexes The indexes of the options to cast for.
2634
+ * @param option The option to add.
2563
2635
  */
2564
- async vote(chatId, messageId, optionIndexes) {
2565
- await this.#pollManager.vote(chatId, messageId, optionIndexes);
2636
+ async addPollOption(chatId, messageId, option) {
2637
+ await this.#pollManager.addPollOption(chatId, messageId, option);
2566
2638
  }
2567
2639
  /**
2568
- * Retract a vote. User-only.
2640
+ * Get poll voters. User-only.
2569
2641
  *
2570
2642
  * @method pl
2571
2643
  * @param chatId The identifier of the chat that includes the poll.
2572
2644
  * @param messageId The identifier of the message that includes the poll.
2573
2645
  */
2574
- async retractVote(chatId, messageId) {
2575
- await this.#pollManager.retractVote(chatId, messageId);
2646
+ async getPollVoters(chatId, messageId, params) {
2647
+ return await this.#pollManager.getPollVoters(chatId, messageId, params);
2576
2648
  }
2577
2649
  /**
2578
- * Add an option to a poll. User-only.
2650
+ * Remove an option from a poll. User-only.
2579
2651
  *
2652
+ * @method pl
2580
2653
  * @param chatId The identifier of the chat that includes the poll.
2581
2654
  * @param messageId The identifier of the message that includes the poll.
2582
- * @param option The option to add.
2655
+ * @param optionIndex The index of the option to remove.
2583
2656
  */
2584
- async addPollOption(chatId, messageId, option) {
2585
- await this.#pollManager.addPollOption(chatId, messageId, option);
2657
+ async removePollOption(chatId, messageId, optionIndex) {
2658
+ await this.#pollManager.removePollOption(chatId, messageId, optionIndex);
2586
2659
  }
2587
2660
  /**
2588
- * Remove an option from a poll. User-only.
2661
+ * Retract a vote. User-only.
2662
+ *
2663
+ * @method pl
2664
+ * @param chatId The identifier of the chat that includes the poll.
2665
+ * @param messageId The identifier of the message that includes the poll.
2666
+ */
2667
+ async retractVote(chatId, messageId) {
2668
+ await this.#pollManager.retractVote(chatId, messageId);
2669
+ }
2670
+ /**
2671
+ * Cast a vote. User-only.
2589
2672
  *
2673
+ * @method pl
2590
2674
  * @param chatId The identifier of the chat that includes the poll.
2591
2675
  * @param messageId The identifier of the message that includes the poll.
2592
- * @param optionId The identifier of the option to remove.
2676
+ * @param optionIndexes The indexes of the options to cast for.
2593
2677
  */
2594
- async removePollOption(chatId, messageId, optionId) {
2595
- await this.#pollManager.removePollOption(chatId, messageId, optionId);
2678
+ async vote(chatId, messageId, optionIndexes) {
2679
+ await this.#pollManager.vote(chatId, messageId, optionIndexes);
2596
2680
  }
2597
2681
  //
2598
2682
  // ========================= CHECKLISTS ========================= //
@@ -2609,14 +2693,15 @@ export class Client extends Composer {
2609
2693
  await this.#checklistManager.addToChecklist(chatId, messageId, items);
2610
2694
  }
2611
2695
  /**
2612
- * Update a checklist. User-only.
2696
+ * Check a single item of a checklist. User-only.
2613
2697
  *
2614
2698
  * @param chatId The identifier of a chat.
2615
2699
  * @param messageId The identifier of the checklist message.
2700
+ * @param item The identifier of the item to check.
2616
2701
  * @method cl
2617
2702
  */
2618
- async updateChecklist(chatId, messageId, params) {
2619
- await this.#checklistManager.updateChecklist(chatId, messageId, params);
2703
+ async checkChecklistItem(chatId, messageId, item) {
2704
+ await this.#checklistManager.checkChecklistItem(chatId, messageId, item);
2620
2705
  }
2621
2706
  /**
2622
2707
  * Check multiple items of a checklist. User-only.
@@ -2630,41 +2715,58 @@ export class Client extends Composer {
2630
2715
  await this.#checklistManager.checkChecklistItems(chatId, messageId, items);
2631
2716
  }
2632
2717
  /**
2633
- * Uncheck multiple items of a checklist. User-only.
2718
+ * Uncheck a single item of a checklist. User-only.
2634
2719
  *
2635
2720
  * @param chatId The identifier of a chat.
2636
2721
  * @param messageId The identifier of the checklist message.
2637
- * @param items The identifiers of the items to uncheck.
2722
+ * @param item The identifier of the item to uncheck.
2638
2723
  * @method cl
2639
2724
  */
2640
- async uncheckChecklistItems(chatId, messageId, items) {
2641
- await this.#checklistManager.uncheckChecklistItems(chatId, messageId, items);
2725
+ async uncheckChecklistItem(chatId, messageId, item) {
2726
+ await this.#checklistManager.uncheckChecklistItem(chatId, messageId, item);
2642
2727
  }
2643
2728
  /**
2644
- * Check a single item of a checklist. User-only.
2729
+ * Uncheck multiple items of a checklist. User-only.
2645
2730
  *
2646
2731
  * @param chatId The identifier of a chat.
2647
2732
  * @param messageId The identifier of the checklist message.
2648
- * @param item The identifier of the item to check.
2733
+ * @param items The identifiers of the items to uncheck.
2649
2734
  * @method cl
2650
2735
  */
2651
- async checkChecklistItem(chatId, messageId, item) {
2652
- await this.#checklistManager.checkChecklistItem(chatId, messageId, item);
2736
+ async uncheckChecklistItems(chatId, messageId, items) {
2737
+ await this.#checklistManager.uncheckChecklistItems(chatId, messageId, items);
2653
2738
  }
2654
2739
  /**
2655
- * Uncheck a single item of a checklist. User-only.
2740
+ * Update a checklist. User-only.
2656
2741
  *
2657
2742
  * @param chatId The identifier of a chat.
2658
2743
  * @param messageId The identifier of the checklist message.
2659
- * @param item The identifier of the item to uncheck.
2660
2744
  * @method cl
2661
2745
  */
2662
- async uncheckChecklistItem(chatId, messageId, item) {
2663
- await this.#checklistManager.uncheckChecklistItem(chatId, messageId, item);
2746
+ async updateChecklist(chatId, messageId, params) {
2747
+ await this.#checklistManager.updateChecklist(chatId, messageId, params);
2664
2748
  }
2665
2749
  //
2666
2750
  // ========================= FILES ========================= //
2667
2751
  //
2752
+ /**
2753
+ * Download a file.
2754
+ *
2755
+ * @method fs
2756
+ * @param fileId The identifier of the file to download.
2757
+ * @example ```ts
2758
+ * for await (const chunk of client.download(fileId, { chunkSize: 256 * 1024 })) {
2759
+ * await outFile.write(chunk);
2760
+ * }
2761
+ * ```
2762
+ * @returns A generator yielding the contents of the file.
2763
+ * @cache file
2764
+ */
2765
+ async *download(fileId, params) {
2766
+ for await (const chunk of this.#fileManager.download(fileId, params)) {
2767
+ yield chunk;
2768
+ }
2769
+ }
2668
2770
  /**
2669
2771
  * Download a chunk of a file.
2670
2772
  *
@@ -2684,24 +2786,6 @@ export class Client extends Composer {
2684
2786
  }
2685
2787
  unreachable();
2686
2788
  }
2687
- /**
2688
- * Download a file.
2689
- *
2690
- * @method fs
2691
- * @param fileId The identifier of the file to download.
2692
- * @example ```ts
2693
- * for await (const chunk of client.download(fileId, { chunkSize: 256 * 1024 })) {
2694
- * await outFile.write(chunk);
2695
- * }
2696
- * ```
2697
- * @returns A generator yielding the contents of the file.
2698
- * @cache file
2699
- */
2700
- async *download(fileId, params) {
2701
- for await (const chunk of this.#fileManager.download(fileId, params)) {
2702
- yield chunk;
2703
- }
2704
- }
2705
2789
  /**
2706
2790
  * Get custom emoji documents for download.
2707
2791
  *
@@ -2717,395 +2801,407 @@ export class Client extends Composer {
2717
2801
  // ========================= CHATS ========================= //
2718
2802
  //
2719
2803
  /**
2720
- * Get chats from a chat list. User-only.
2804
+ * Add a single user to a chat.
2721
2805
  *
2722
2806
  * @method ch
2807
+ * @param chatId The identifier of a chat to add the user to.
2808
+ * @param userId The identifier of the user to add to the chat.
2809
+ * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
2723
2810
  */
2724
- async getChats(params) {
2725
- return await this.#chatListManager.getChats(params?.from, params?.after, params?.limit);
2811
+ async addChatMember(chatId, userId, params) {
2812
+ return await this.#chatManager.addChatMember(chatId, userId, params);
2726
2813
  }
2727
2814
  /**
2728
- * Get pinned chats from a chat list. User-only.
2815
+ * Add multiple users at once to a channel or a supergroup.
2729
2816
  *
2730
2817
  * @method ch
2731
- * @param from The chat list to get the pinned chats from. Defaults to main.
2818
+ * @param chatId The identifier of the channel or supergroup to add the users to.
2819
+ * @param userIds The identifiers of the users to add to the channel or supergroup.
2820
+ * @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.
2732
2821
  */
2733
- async getPinnedChats(from) {
2734
- return await this.#chatListManager.getPinnedChats(from);
2822
+ async addChatMembers(chatId, userIds) {
2823
+ return await this.#chatManager.addChatMembers(chatId, userIds);
2735
2824
  }
2736
2825
  /**
2737
- * Get a chat.
2826
+ * Approve a join request.
2738
2827
  *
2739
2828
  * @method ch
2740
- * @cache
2829
+ * @param chatId The identifier of a chat with the join request.
2830
+ * @param userId The user who made the join request.
2741
2831
  */
2742
- async getChat(chatId) {
2743
- return await this.#chatListManager.getChat(chatId);
2832
+ async approveJoinRequest(chatId, userId) {
2833
+ await this.#chatManager.approveJoinRequest(chatId, userId);
2744
2834
  }
2745
2835
  /**
2746
- * Get chat history. User-only.
2836
+ * Approve all join requests. User-only.
2747
2837
  *
2748
2838
  * @method ch
2749
- * @param chatId The identifier of a chat.
2839
+ * @param chatId The identifier of a chat with the join requests.
2750
2840
  */
2751
- async getHistory(chatId, params) {
2752
- return await this.#messageManager.getHistory(chatId, params);
2841
+ async approveJoinRequests(chatId, params) {
2842
+ await this.#chatManager.approveJoinRequests(chatId, params);
2753
2843
  }
2754
2844
  /**
2755
- * Set a chat's available reactions. User-only.
2845
+ * Archive a single chat. User-only.
2756
2846
  *
2757
2847
  * @method ch
2758
2848
  * @param chatId The identifier of a chat.
2759
- * @param availableReactions The new available reactions.
2760
2849
  */
2761
- async setAvailableReactions(chatId, availableReactions) {
2762
- await this.#chatManager.setAvailableReactions(chatId, availableReactions);
2850
+ async archiveChat(chatId) {
2851
+ await this.#chatListManager.archiveChat(chatId);
2763
2852
  }
2764
2853
  /**
2765
- * Set a chat's photo.
2854
+ * Archive multiple chats. User-only.
2766
2855
  *
2767
2856
  * @method ch
2768
- * @param chatId The identifier of a chat.
2769
- * @param photo A photo to set as the chat's photo.
2857
+ * @param chatIds The identifiers of the chats to archive.
2770
2858
  */
2771
- async setChatPhoto(chatId, photo, params) {
2772
- await this.#chatManager.setChatPhoto(chatId, photo, params);
2859
+ async archiveChats(chatIds) {
2860
+ await this.#chatListManager.archiveChats(chatIds);
2773
2861
  }
2774
2862
  /**
2775
- * Delete a chat's photo.
2863
+ * Ban a member from a chat.
2776
2864
  *
2777
2865
  * @method ch
2778
2866
  * @param chatId The identifier of a chat.
2867
+ * @param memberId The identifier of the member.
2779
2868
  */
2780
- async deleteChatPhoto(chatId) {
2781
- await this.#chatManager.deleteChatPhoto(chatId);
2869
+ async banChatMember(chatId, memberId, params) {
2870
+ await this.#chatManager.banChatMember(chatId, memberId, params);
2782
2871
  }
2783
2872
  /**
2784
- * Ban a member from a chat.
2873
+ * Close a chat previously opened by openChat.
2874
+ *
2875
+ * @method ch
2876
+ * @param chatId The identifier of a chat to close.
2877
+ */
2878
+ async closeChat(chatId) {
2879
+ await this.#updateManager.closeChat(chatId);
2880
+ }
2881
+ /**
2882
+ * Close a forum topic.
2785
2883
  *
2786
2884
  * @method ch
2787
2885
  * @param chatId The identifier of a chat.
2788
- * @param memberId The identifier of the member.
2886
+ * @param topicId The identifier of the topic.
2789
2887
  */
2790
- async banChatMember(chatId, memberId, params) {
2791
- await this.#chatManager.banChatMember(chatId, memberId, params);
2888
+ async closeTopic(chatId, topicId) {
2889
+ await this.#forumManager.closeTopic(chatId, topicId);
2792
2890
  }
2793
2891
  /**
2794
- * Unban a member from a chat.
2892
+ * Create a channel. User-only.
2795
2893
  *
2796
2894
  * @method ch
2797
- * @param chatId The identifier of a chat. Must be a supergroup.
2798
- * @param memberId The identifier of the member.
2895
+ * @param title The title of the channel.
2896
+ * @returns The created channel.
2799
2897
  */
2800
- async unbanChatMember(chatId, memberId) {
2801
- await this.#chatManager.unbanChatMember(chatId, memberId);
2898
+ async createChannel(title, params) {
2899
+ return await this.#chatListManager.createChannel(title, params);
2802
2900
  }
2803
2901
  /**
2804
- * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
2902
+ * Create a group. User-only.
2805
2903
  *
2806
2904
  * @method ch
2807
- * @param chatId The identifier of a chat. Must be a supergroup.
2808
- * @param memberId The identifier of the member.
2905
+ * @param title The title of the group.
2906
+ * @returns The created group.
2809
2907
  */
2810
- async kickChatMember(chatId, memberId) {
2811
- await this.#chatManager.banChatMember(chatId, memberId);
2812
- await this.#chatManager.unbanChatMember(chatId, memberId);
2908
+ async createGroup(title, params) {
2909
+ return await this.#chatListManager.createGroup(title, params);
2813
2910
  }
2814
2911
  /**
2815
- * Set the rights of a chat member.
2912
+ * Create an invite link.
2816
2913
  *
2817
2914
  * @method ch
2818
- * @param chatId The identifier of a chat. Must be a supergroup.
2819
- * @param memberId The identifier of the member.
2915
+ * @param chatId The identifier of a chat to create the invite link for.
2916
+ * @returns The newly created invite link.
2820
2917
  */
2821
- async setChatMemberRights(chatId, memberId, params) {
2822
- await this.#chatManager.setChatMemberRights(chatId, memberId, params);
2918
+ async createInviteLink(chatId, params) {
2919
+ return await this.#chatManager.createInviteLink(chatId, params);
2823
2920
  }
2824
2921
  /**
2825
- * Get the administrators of a chat.
2922
+ * Create a supergroup. User-only.
2826
2923
  *
2827
2924
  * @method ch
2828
- * @param chatId The identifier of a chat.
2829
- * @returns The chat's administrators.
2925
+ * @param title The title of the supergroup.
2926
+ * @returns The created supergroup.
2830
2927
  */
2831
- async getChatAdministrators(chatId) {
2832
- return await this.#chatListManager.getChatAdministrators(chatId);
2928
+ async createSupergroup(title, params) {
2929
+ return await this.#chatListManager.createSupergroup(title, params);
2833
2930
  }
2834
2931
  /**
2835
- * Enable join requests in a chat. User-only.
2932
+ * Create a forum topic.
2836
2933
  *
2837
2934
  * @method ch
2838
- * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2935
+ * @param chatId The identifier of a chat.
2936
+ * @param title The title of the topic.
2937
+ * @returns The created topic.
2839
2938
  */
2840
- async enableJoinRequests(chatId) {
2841
- await this.#chatManager.enableJoinRequests(chatId);
2939
+ async createTopic(chatId, title, params) {
2940
+ return await this.#forumManager.createTopic(chatId, title, params);
2842
2941
  }
2843
2942
  /**
2844
- * Disable join requests in a chat. User-only.
2943
+ * Decline a join request.
2845
2944
  *
2846
2945
  * @method ch
2847
- * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2946
+ * @param chatId The identifier of a chat with the join request.
2947
+ * @param userId The user who made the join request.
2848
2948
  */
2849
- async disableJoinRequests(chatId) {
2850
- await this.#chatManager.disableJoinRequests(chatId);
2949
+ async declineJoinRequest(chatId, userId) {
2950
+ await this.#chatManager.declineJoinRequest(chatId, userId);
2851
2951
  }
2852
2952
  /**
2853
- * Get inactive chats. User-only.
2953
+ * Decline all join requests. User-only.
2854
2954
  *
2855
2955
  * @method ch
2856
- * @returns A list of inactive chats the current user is a member of.
2956
+ * @param chatId The identifier of a chat with the join requests.
2857
2957
  */
2858
- async getInactiveChats() {
2859
- return await this.#accountManager.getInactiveChats();
2958
+ async declineJoinRequests(chatId, params) {
2959
+ await this.#chatManager.declineJoinRequests(chatId, params);
2860
2960
  }
2861
2961
  /**
2862
- * Get the invite links created for a chat. User-only.
2962
+ * Delete a chat. User-only.
2863
2963
  *
2864
2964
  * @method ch
2865
2965
  * @param chatId The identifier of a chat.
2866
- * @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.
2867
2966
  */
2868
- async getCreatedInviteLinks(chatId, params) {
2869
- return await this.#chatManager.getCreatedInviteLinks(chatId, params);
2967
+ async deleteChat(chatId) {
2968
+ await this.#chatManager.deleteChat(chatId);
2870
2969
  }
2871
2970
  /**
2872
- * Join a chat. User-only.
2971
+ * Delete a chat's photo.
2873
2972
  *
2874
2973
  * @method ch
2875
2974
  * @param chatId The identifier of a chat.
2876
2975
  */
2877
- async joinChat(chatId) {
2878
- await this.#chatManager.joinChat(chatId);
2976
+ async deleteChatPhoto(chatId) {
2977
+ await this.#chatManager.deleteChatPhoto(chatId);
2879
2978
  }
2880
2979
  /**
2881
- * Leave a chat.
2980
+ * Delete a chat's sticker set.
2882
2981
  *
2883
2982
  * @method ch
2884
- * @param chatId The identifier of a chat.
2983
+ * @param chatId The identifier of a chat. Must be a supergroup.
2885
2984
  */
2886
- async leaveChat(chatId) {
2887
- await this.#chatManager.leaveChat(chatId);
2985
+ async deleteChatStickerSet(chatId) {
2986
+ await this.#messageManager.deleteChatStickerSet(chatId);
2888
2987
  }
2889
2988
  /**
2890
- * Get information on a user's chat membership.
2989
+ * Disable automatic anti-spam in a group. User-only.
2891
2990
  *
2892
2991
  * @method ch
2893
- * @param chatId The identifier of a chat.
2894
- * @param userId The identifier of the user.
2992
+ * @param chatId The identifier of the group.
2895
2993
  */
2896
- async getChatMember(chatId, userId) {
2897
- return await this.#chatListManager.getChatMember(chatId, userId);
2994
+ async disableAntispam(chatId) {
2995
+ await this.#chatManager.disableAntispam(chatId);
2898
2996
  }
2899
2997
  /**
2900
- * Get the members of a chat.
2998
+ * Disable business bots in a private chat. User-only.
2901
2999
  *
2902
3000
  * @method ch
2903
- * @param chatId The identifier of a chat.
3001
+ * @param chatId The identifier of the private chat to disable business bots in.
2904
3002
  */
2905
- async getChatMembers(chatId, params) {
2906
- return await this.#chatListManager.getChatMembers(chatId, params);
3003
+ async disableBusinessBots(chatId) {
3004
+ await this.#chatListManager.disableBusinessBots(chatId);
2907
3005
  }
2908
3006
  /**
2909
- * Set a chat's sticker set.
3007
+ * Disable chat history for new members. User-only.
2910
3008
  *
2911
3009
  * @method ch
2912
- * @param chatId The identifier of a chat. Must be a supergroup.
2913
- * @param setName The name of the set.
3010
+ * @param chatId The identifier of a chat.
2914
3011
  */
2915
- async setChatStickerSet(chatId, setName) {
2916
- await this.#messageManager.setChatStickerSet(chatId, setName);
3012
+ async disableChatHistoryForNewMembers(chatId) {
3013
+ await this.#chatManager.disableChatHistoryForNewMembers(chatId);
2917
3014
  }
2918
3015
  /**
2919
- * Delete a chat's sticker set.
3016
+ * Disable join requests in a chat. User-only.
2920
3017
  *
2921
3018
  * @method ch
2922
- * @param chatId The identifier of a chat. Must be a supergroup.
3019
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2923
3020
  */
2924
- async deleteChatStickerSet(chatId) {
2925
- await this.#messageManager.deleteChatStickerSet(chatId);
3021
+ async disableJoinRequests(chatId) {
3022
+ await this.#chatManager.disableJoinRequests(chatId);
2926
3023
  }
2927
3024
  /**
2928
- * Set the number of boosts required to circumvent a chat's default restrictions. User-only.
3025
+ * Disable sharing in a chat. User-only.
2929
3026
  *
2930
3027
  * @method ch
2931
3028
  * @param chatId The identifier of a chat.
2932
- * @param boosts The number of boosts required to circumvent its restrictions.
2933
3029
  */
2934
- async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
2935
- await this.#chatManager.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
3030
+ async disableSharing(chatId) {
3031
+ await this.#chatManager.disableSharing(chatId);
2936
3032
  }
2937
3033
  /**
2938
- * Create an invite link.
3034
+ * Disable post signatures in a channel. User-only.
2939
3035
  *
2940
3036
  * @method ch
2941
- * @param chatId The identifier of a chat to create the invite link for.
2942
- * @returns The newly created invite link.
3037
+ * @param chatId The identifier of the channel.
2943
3038
  */
2944
- async createInviteLink(chatId, params) {
2945
- return await this.#chatManager.createInviteLink(chatId, params);
3039
+ async disableSignatures(chatId) {
3040
+ await this.#chatManager.disableSignatures(chatId);
2946
3041
  }
2947
3042
  /**
2948
- * Approve a join request.
3043
+ * Disable slow mode in a group. User-only.
2949
3044
  *
2950
3045
  * @method ch
2951
- * @param chatId The identifier of a chat with the join request.
2952
- * @param userId The user who made the join request.
3046
+ * @param chatId The identifier of the group to disable slow mode in.
2953
3047
  */
2954
- async approveJoinRequest(chatId, userId) {
2955
- await this.#chatManager.approveJoinRequest(chatId, userId);
3048
+ async disableSlowMode(chatId) {
3049
+ await this.#chatManager.disableSlowMode(chatId);
2956
3050
  }
2957
3051
  /**
2958
- * Decline a join request.
3052
+ * Disable topics in a group. User-only.
2959
3053
  *
2960
3054
  * @method ch
2961
- * @param chatId The identifier of a chat with the join request.
2962
- * @param userId The user who made the join request.
3055
+ * @param chatId The identifier of the group.
2963
3056
  */
2964
- async declineJoinRequest(chatId, userId) {
2965
- await this.#chatManager.declineJoinRequest(chatId, userId);
3057
+ async disableTopics(chatId) {
3058
+ await this.#chatManager.disableTopics(chatId);
2966
3059
  }
2967
3060
  /**
2968
- * Approve all join requests. User-only.
3061
+ * Edit a forum topic.
2969
3062
  *
2970
3063
  * @method ch
2971
- * @param chatId The identifier of a chat with the join requests.
3064
+ * @param chatId The identifier of a chat.
3065
+ * @param topicId The identifier of the topic.
3066
+ * @param title The new title of the topic.
3067
+ * @returns The new topic.
2972
3068
  */
2973
- async approveJoinRequests(chatId, params) {
2974
- await this.#chatManager.approveJoinRequests(chatId, params);
3069
+ async editTopic(chatId, topicId, title, params) {
3070
+ return await this.#forumManager.editTopic(chatId, topicId, title, params);
2975
3071
  }
2976
3072
  /**
2977
- * Decline all join requests. User-only.
3073
+ * Enable automatic anti-spam in a group. User-only.
2978
3074
  *
2979
3075
  * @method ch
2980
- * @param chatId The identifier of a chat with the join requests.
3076
+ * @param chatId The identifier of the group.
2981
3077
  */
2982
- async declineJoinRequests(chatId, params) {
2983
- await this.#chatManager.declineJoinRequests(chatId, params);
3078
+ async enableAntispam(chatId) {
3079
+ await this.#chatManager.enableAntispam(chatId);
2984
3080
  }
2985
3081
  /**
2986
- * Get pending join requests in a chat. User-only.
3082
+ * Enable business bots in a private chat. User-only.
2987
3083
  *
2988
3084
  * @method ch
2989
- * @param chatId The identifier of a chat with the join requests.
3085
+ * @param chatId The identifier of the private chat to enable business bots in.
2990
3086
  */
2991
- async getJoinRequests(chatId, params) {
2992
- return await this.#chatManager.getJoinRequests(chatId, params);
3087
+ async enableBusinessBots(chatId) {
3088
+ await this.#chatListManager.enableBusinessBots(chatId);
2993
3089
  }
2994
3090
  /**
2995
- * Add a single user to a chat.
3091
+ * Enable chat history for new members. User-only.
2996
3092
  *
2997
3093
  * @method ch
2998
- * @param chatId The identifier of a chat to add the user to.
2999
- * @param userId The identifier of the user to add to the chat.
3000
- * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
3094
+ * @param chatId The identifier of a chat.
3001
3095
  */
3002
- async addChatMember(chatId, userId, params) {
3003
- return await this.#chatManager.addChatMember(chatId, userId, params);
3096
+ async enableChatHistoryForNewMembers(chatId) {
3097
+ await this.#chatManager.enableChatHistoryForNewMembers(chatId);
3004
3098
  }
3005
3099
  /**
3006
- * Add multiple users at once to a channel or a supergroup.
3100
+ * Enable join requests in a chat. User-only.
3007
3101
  *
3008
3102
  * @method ch
3009
- * @param chatId The identifier of the channel or supergroup to add the users to.
3010
- * @param userIds The identifiers of the users to add to the channel or supergroup.
3011
- * @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.
3103
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
3012
3104
  */
3013
- async addChatMembers(chatId, userIds) {
3014
- return await this.#chatManager.addChatMembers(chatId, userIds);
3105
+ async enableJoinRequests(chatId) {
3106
+ await this.#chatManager.enableJoinRequests(chatId);
3015
3107
  }
3016
3108
  /**
3017
- * Open a chat.
3109
+ * Enable sharing in a chat. User-only.
3018
3110
  *
3019
3111
  * @method ch
3020
- * @param chatId The identifier of a chat to open.
3112
+ * @param chatId The identifier of a chat.
3021
3113
  */
3022
- async openChat(chatId, params) {
3023
- await this.#updateManager.openChat(chatId, params);
3114
+ async enableSharing(chatId) {
3115
+ await this.#chatManager.enableSharing(chatId);
3024
3116
  }
3025
3117
  /**
3026
- * Close a chat previously opened by openChat.
3118
+ * Enable post signatures in a channel. User-only.
3027
3119
  *
3028
3120
  * @method ch
3029
- * @param chatId The identifier of a chat to close.
3121
+ * @param chatId The identifier of the channel.
3030
3122
  */
3031
- async closeChat(chatId) {
3032
- await this.#updateManager.closeChat(chatId);
3123
+ async enableSignatures(chatId, params) {
3124
+ await this.#chatManager.enableSignatures(chatId, params);
3033
3125
  }
3034
3126
  /**
3035
- * Create a group. User-only.
3127
+ * Enable topics in a group. User-only.
3036
3128
  *
3037
3129
  * @method ch
3038
- * @param title The title of the group.
3039
- * @returns The created group.
3130
+ * @param chatId The identifier of the group.
3131
+ * @param isShownAsTabs Whether topics should be displayed as tabs.
3040
3132
  */
3041
- async createGroup(title, params) {
3042
- return await this.#chatListManager.createGroup(title, params);
3133
+ async enableTopics(chatId, isShownAsTabs) {
3134
+ await this.#chatManager.enableTopics(chatId, isShownAsTabs);
3043
3135
  }
3044
3136
  /**
3045
- * Create a supergroup. User-only.
3137
+ * Get a chat.
3046
3138
  *
3047
3139
  * @method ch
3048
- * @param title The title of the supergroup.
3049
- * @returns The created supergroup.
3140
+ * @cache
3050
3141
  */
3051
- async createSupergroup(title, params) {
3052
- return await this.#chatListManager.createSupergroup(title, params);
3142
+ async getChat(chatId) {
3143
+ return await this.#chatListManager.getChat(chatId);
3053
3144
  }
3054
3145
  /**
3055
- * Create a channel. User-only.
3146
+ * Get the administrators of a chat.
3056
3147
  *
3057
3148
  * @method ch
3058
- * @param title The title of the channel.
3059
- * @returns The created channel.
3149
+ * @param chatId The identifier of a chat.
3150
+ * @returns The chat's administrators.
3060
3151
  */
3061
- async createChannel(title, params) {
3062
- return await this.#chatListManager.createChannel(title, params);
3152
+ async getChatAdministrators(chatId) {
3153
+ return await this.#chatListManager.getChatAdministrators(chatId);
3063
3154
  }
3064
3155
  /**
3065
- * Set the time to live of the messages of a chat. User-only.
3156
+ * Get information on a user's chat membership.
3066
3157
  *
3067
3158
  * @method ch
3068
3159
  * @param chatId The identifier of a chat.
3069
- * @param messageTtl The time to live of the messages in seconds.
3160
+ * @param userId The identifier of the user.
3070
3161
  */
3071
- async setMessageTtl(chatId, messageTtl) {
3072
- await this.#chatListManager.setMessageTtl(chatId, messageTtl);
3162
+ async getChatMember(chatId, userId) {
3163
+ return await this.#chatListManager.getChatMember(chatId, userId);
3073
3164
  }
3074
3165
  /**
3075
- * Archive multiple chats. User-only.
3166
+ * Get the members of a chat.
3076
3167
  *
3077
3168
  * @method ch
3078
- * @param chatIds The identifiers of the chats to archive.
3169
+ * @param chatId The identifier of a chat.
3079
3170
  */
3080
- async archiveChats(chatIds) {
3081
- await this.#chatListManager.archiveChats(chatIds);
3171
+ async getChatMembers(chatId, params) {
3172
+ return await this.#chatListManager.getChatMembers(chatId, params);
3082
3173
  }
3083
3174
  /**
3084
- * Archive a single chat. User-only.
3175
+ * Get a partial chat.
3085
3176
  *
3086
3177
  * @method ch
3087
- * @param chatId The identifier of a chat.
3178
+ * @cache
3088
3179
  */
3089
- async archiveChat(chatId) {
3090
- await this.#chatListManager.archiveChat(chatId);
3180
+ async getChatP(chatId) {
3181
+ const inputPeer = await this.getInputPeer(chatId);
3182
+ const peer = await this.#inputPeerToPeer(inputPeer);
3183
+ const chatP = await this[getPeer](peer);
3184
+ if (chatP === null) {
3185
+ throw new InputError("Chat not found.");
3186
+ }
3187
+ return chatP[0];
3091
3188
  }
3092
3189
  /**
3093
- * Unarchive multiple chats. User-only.
3190
+ * Get chats from a chat list. User-only.
3094
3191
  *
3095
3192
  * @method ch
3096
- * @param chatIds The identifiers of the chats to unarchive.
3097
3193
  */
3098
- async unarchiveChats(chatIds) {
3099
- await this.#chatListManager.unarchiveChats(chatIds);
3194
+ async getChats(params) {
3195
+ return await this.#chatListManager.getChats(params?.from, params?.after, params?.limit);
3100
3196
  }
3101
3197
  /**
3102
- * Unarchive a single chat. User-only.
3198
+ * Get the settings of a chat. User-only.
3103
3199
  *
3104
3200
  * @method ch
3105
3201
  * @param chatId The identifier of a chat.
3106
3202
  */
3107
- async unarchiveChat(chatId) {
3108
- await this.#chatListManager.unarchiveChat(chatId);
3203
+ async getChatSettings(chatId) {
3204
+ return await this.#chatListManager.getChatSettings(chatId);
3109
3205
  }
3110
3206
  /**
3111
3207
  * Get common chats between a user and the current one. User-only.
@@ -3117,272 +3213,260 @@ export class Client extends Composer {
3117
3213
  return await this.#chatListManager.getCommonChats(userId, params);
3118
3214
  }
3119
3215
  /**
3120
- * Get the settings of a chat. User-only.
3216
+ * Get the invite links created for a chat. User-only.
3121
3217
  *
3122
3218
  * @method ch
3123
3219
  * @param chatId The identifier of a chat.
3220
+ * @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.
3124
3221
  */
3125
- async getChatSettings(chatId) {
3126
- return await this.#chatListManager.getChatSettings(chatId);
3127
- }
3128
- /**
3129
- * Disable business bots in a private chat. User-only.
3130
- *
3131
- * @method ch
3132
- * @param chatId The identifier of the private chat to disable business bots in.
3133
- */
3134
- async disableBusinessBots(chatId) {
3135
- await this.#chatListManager.disableBusinessBots(chatId);
3222
+ async getCreatedInviteLinks(chatId, params) {
3223
+ return await this.#chatManager.getCreatedInviteLinks(chatId, params);
3136
3224
  }
3137
3225
  /**
3138
- * Enable business bots in a private chat. User-only.
3226
+ * Get discussion chat suggestions. User-only.
3139
3227
  *
3140
3228
  * @method ch
3141
- * @param chatId The identifier of the private chat to enable business bots in.
3142
3229
  */
3143
- async enableBusinessBots(chatId) {
3144
- await this.#chatListManager.enableBusinessBots(chatId);
3230
+ async getDiscussionChatSuggestions() {
3231
+ return await this.#chatManager.getDiscussionChatSuggestions();
3145
3232
  }
3146
3233
  /**
3147
- * Disable slow mode in a group. User-only.
3234
+ * Get chat history. User-only.
3148
3235
  *
3149
3236
  * @method ch
3150
- * @param chatId The identifier of the group to disable slow mode in.
3237
+ * @param chatId The identifier of a chat.
3151
3238
  */
3152
- async disableSlowMode(chatId) {
3153
- await this.#chatManager.disableSlowMode(chatId);
3239
+ async getHistory(chatId, params) {
3240
+ return await this.#messageManager.getHistory(chatId, params);
3154
3241
  }
3155
3242
  /**
3156
- * Change slow mode in a group. User-only.
3243
+ * Get inactive chats. User-only.
3157
3244
  *
3158
3245
  * @method ch
3159
- * @param chatId The identifier of the group to change slow mode in.
3160
- * @param duration New slow mode duration.
3246
+ * @returns A list of inactive chats the current user is a member of.
3161
3247
  */
3162
- async setSlowMode(chatId, duration) {
3163
- await this.#chatManager.setSlowMode(chatId, duration);
3248
+ async getInactiveChats() {
3249
+ return await this.#accountManager.getInactiveChats();
3164
3250
  }
3165
3251
  /**
3166
- * Change the title of a chat.
3252
+ * Get pending join requests in a chat. User-only.
3167
3253
  *
3168
3254
  * @method ch
3169
- * @param chatId The identifier of a chat.
3170
- * @param title The new title.
3255
+ * @param chatId The identifier of a chat with the join requests.
3171
3256
  */
3172
- async setChatTitle(chatId, title) {
3173
- await this.#chatManager.setChatTitle(chatId, title);
3257
+ async getJoinRequests(chatId, params) {
3258
+ return await this.#chatManager.getJoinRequests(chatId, params);
3174
3259
  }
3175
3260
  /**
3176
- * Change the description of a chat.
3261
+ * Get the count of online members in a chat. User-only.
3177
3262
  *
3178
3263
  * @method ch
3179
3264
  * @param chatId The identifier of a chat.
3180
- * @param description The new description.
3265
+ * @returns The count of online members in the chat.
3181
3266
  */
3182
- async setChatDescription(chatId, description) {
3183
- await this.#chatManager.setChatDescription(chatId, description);
3267
+ async getOnlineCount(chatId) {
3268
+ return await this.#chatManager.getOnlineCount(chatId);
3184
3269
  }
3185
3270
  /**
3186
- * Hide the member list of a group to non-admins. User-only.
3271
+ * Get pinned chats from a chat list. User-only.
3187
3272
  *
3188
3273
  * @method ch
3189
- * @param chatId The identifier of the group.
3274
+ * @param from The chat list to get the pinned chats from. Defaults to main.
3190
3275
  */
3191
- async hideMemberList(chatId) {
3192
- await this.#chatManager.hideMemberList(chatId);
3276
+ async getPinnedChats(from) {
3277
+ return await this.#chatListManager.getPinnedChats(from);
3193
3278
  }
3194
3279
  /**
3195
- * Show the member list of a group to non-admins. User-only.
3280
+ * Get recommended channels. User-only.
3196
3281
  *
3197
3282
  * @method ch
3198
- * @param chatId The identifier of the group.
3283
+ * @returns A list of recommended channels.
3199
3284
  */
3200
- async showMemberList(chatId) {
3201
- await this.#chatManager.showMemberList(chatId);
3285
+ async getRecommendedChannels() {
3286
+ return await this.#chatManager.getRecommendedChannels();
3202
3287
  }
3203
3288
  /**
3204
- * Enable topics in a group. User-only.
3289
+ * Get similar bots. User-only.
3205
3290
  *
3206
3291
  * @method ch
3207
- * @param chatId The identifier of the group.
3208
- * @param isShownAsTabs Whether topics should be displayed as tabs.
3292
+ * @param chatId The identifier of a bot to get similar bots for.
3293
+ * @returns A list of similar bots.
3209
3294
  */
3210
- async enableTopics(chatId, isShownAsTabs) {
3211
- await this.#chatManager.enableTopics(chatId, isShownAsTabs);
3295
+ async getSimilarBots(chatId) {
3296
+ return await this.#chatManager.getSimilarBots(chatId);
3212
3297
  }
3213
3298
  /**
3214
- * Disable topics in a group. User-only.
3299
+ * Get similar channels. User-only.
3215
3300
  *
3216
3301
  * @method ch
3217
- * @param chatId The identifier of the group.
3302
+ * @param chatId The identifier of a channel to get similar channels for.
3303
+ * @returns A list of similar channels.
3218
3304
  */
3219
- async disableTopics(chatId) {
3220
- await this.#chatManager.disableTopics(chatId);
3305
+ async getSimilarChannels(chatId) {
3306
+ return await this.#chatManager.getSimilarChannels(chatId);
3221
3307
  }
3222
3308
  /**
3223
- * Enable automatic anti-spam in a group. User-only.
3309
+ * Hide the general forum topic.
3224
3310
  *
3225
3311
  * @method ch
3226
- * @param chatId The identifier of the group.
3312
+ * @param chatId The identifier of a chat.
3227
3313
  */
3228
- async enableAntispam(chatId) {
3229
- await this.#chatManager.enableAntispam(chatId);
3314
+ async hideGeneralTopic(chatId) {
3315
+ await this.#forumManager.hideGeneralTopic(chatId);
3230
3316
  }
3231
3317
  /**
3232
- * Disable automatic anti-spam in a group. User-only.
3318
+ * Hide the member list of a group to non-admins. User-only.
3233
3319
  *
3234
3320
  * @method ch
3235
3321
  * @param chatId The identifier of the group.
3236
3322
  */
3237
- async disableAntispam(chatId) {
3238
- await this.#chatManager.disableAntispam(chatId);
3323
+ async hideMemberList(chatId) {
3324
+ await this.#chatManager.hideMemberList(chatId);
3239
3325
  }
3240
3326
  /**
3241
- * Enable post signatures in a channel. User-only.
3327
+ * Join a chat. User-only.
3242
3328
  *
3243
3329
  * @method ch
3244
- * @param chatId The identifier of the channel.
3330
+ * @param chatId The identifier of a chat.
3245
3331
  */
3246
- async enableSignatures(chatId, params) {
3247
- await this.#chatManager.enableSignatures(chatId, params);
3332
+ async joinChat(chatId) {
3333
+ await this.#chatManager.joinChat(chatId);
3248
3334
  }
3249
3335
  /**
3250
- * Disable post signatures in a channel. User-only.
3336
+ * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
3251
3337
  *
3252
3338
  * @method ch
3253
- * @param chatId The identifier of the channel.
3339
+ * @param chatId The identifier of a chat. Must be a supergroup.
3340
+ * @param memberId The identifier of the member.
3254
3341
  */
3255
- async disableSignatures(chatId) {
3256
- await this.#chatManager.disableSignatures(chatId);
3342
+ async kickChatMember(chatId, memberId) {
3343
+ await this.#chatManager.banChatMember(chatId, memberId);
3344
+ await this.#chatManager.unbanChatMember(chatId, memberId);
3257
3345
  }
3258
3346
  /**
3259
- * Delete a chat. User-only.
3347
+ * Leave a chat.
3260
3348
  *
3261
3349
  * @method ch
3262
3350
  * @param chatId The identifier of a chat.
3263
3351
  */
3264
- async deleteChat(chatId) {
3265
- await this.#chatManager.deleteChat(chatId);
3352
+ async leaveChat(chatId) {
3353
+ await this.#chatManager.leaveChat(chatId);
3266
3354
  }
3267
3355
  /**
3268
- * Get discussion chat suggestions. User-only.
3356
+ * Mark all mentions in a chat as read. User-only.
3269
3357
  *
3270
3358
  * @method ch
3359
+ * @param chatId The identifier of the chat.
3271
3360
  */
3272
- async getDiscussionChatSuggestions() {
3273
- return await this.#chatManager.getDiscussionChatSuggestions();
3361
+ async markAllMentionsAsRead(chatId, params) {
3362
+ return await this.#chatManager.markAllMentionsAsRead(chatId, params);
3274
3363
  }
3275
3364
  /**
3276
- * Set a channel's discussion chat. User-only.
3365
+ * Mark a chat as read. User-only.
3277
3366
  *
3278
3367
  * @method ch
3279
- * @param chatId The identifier of a channel.
3280
- * @param discussionChatId The identifier of a chat to use as discussion for the channel.
3368
+ * @param chatId The identifier of a chat.
3281
3369
  */
3282
- async setDiscussionChat(chatId, discussionChatId) {
3283
- await this.#chatManager.setDiscussionChat(chatId, discussionChatId);
3370
+ async markChatAsRead(chatId) {
3371
+ return await this.#chatManager.markChatAsRead(chatId);
3284
3372
  }
3285
3373
  /**
3286
- * Transfer the ownership of a chat. User-only.
3374
+ * Mark a chat as unread. User-only.
3287
3375
  *
3288
3376
  * @method ch
3289
3377
  * @param chatId The identifier of a chat.
3290
- * @param userId The identifier of the new owner.
3291
- * @param password The password of the current account.
3292
3378
  */
3293
- async transferChatOwnership(chatId, userId, password) {
3294
- await this.#chatManager.transferChatOwnership(chatId, userId, password);
3379
+ async markChatAsUnread(chatId) {
3380
+ return await this.#chatManager.markChatAsUnread(chatId);
3295
3381
  }
3296
3382
  /**
3297
- * Create a forum topic.
3383
+ * Open a chat.
3298
3384
  *
3299
3385
  * @method ch
3300
- * @param chatId The identifier of a chat.
3301
- * @param title The title of the topic.
3302
- * @returns The created topic.
3386
+ * @param chatId The identifier of a chat to open.
3303
3387
  */
3304
- async createTopic(chatId, title, params) {
3305
- return await this.#forumManager.createTopic(chatId, title, params);
3388
+ async openChat(chatId, params) {
3389
+ await this.#updateManager.openChat(chatId, params);
3306
3390
  }
3307
3391
  /**
3308
- * Edit a forum topic.
3392
+ * Pin a forum topic.
3309
3393
  *
3310
3394
  * @method ch
3311
3395
  * @param chatId The identifier of a chat.
3312
3396
  * @param topicId The identifier of the topic.
3313
- * @param title The new title of the topic.
3314
- * @returns The new topic.
3315
3397
  */
3316
- async editTopic(chatId, topicId, title, params) {
3317
- return await this.#forumManager.editTopic(chatId, topicId, title, params);
3398
+ async pinTopic(chatId, topicId) {
3399
+ await this.#forumManager.pinTopic(chatId, topicId);
3318
3400
  }
3319
3401
  /**
3320
- * Hide the general forum topic.
3402
+ * Promote a chat member.
3321
3403
  *
3322
3404
  * @method ch
3323
3405
  * @param chatId The identifier of a chat.
3406
+ * @param userId The identifier of the user to promote.
3324
3407
  */
3325
- async hideGeneralTopic(chatId) {
3326
- await this.#forumManager.hideGeneralTopic(chatId);
3408
+ async promoteChatMember(chatId, userId, params) {
3409
+ await this.#chatManager.promoteChatMember(chatId, userId, params);
3327
3410
  }
3328
3411
  /**
3329
- * Show the general forum topic.
3412
+ * Reopen a forum topic.
3330
3413
  *
3331
3414
  * @method ch
3332
3415
  * @param chatId The identifier of a chat.
3416
+ * @param topicId The identifier of the topic.
3333
3417
  */
3334
- async showGeneralTopic(chatId) {
3335
- await this.#forumManager.showGeneralTopic(chatId);
3418
+ async reopenTopic(chatId, topicId) {
3419
+ await this.#forumManager.reopenTopic(chatId, topicId);
3336
3420
  }
3337
3421
  /**
3338
- * Close a forum topic.
3422
+ * Report a chat. User-only.
3339
3423
  *
3340
3424
  * @method ch
3341
- * @param chatId The identifier of a chat.
3342
- * @param topicId The identifier of the topic.
3425
+ * @param chatId The identifier of a chat to report.
3426
+ * @param reason The reason of the report.
3343
3427
  */
3344
- async closeTopic(chatId, topicId) {
3345
- await this.#forumManager.closeTopic(chatId, topicId);
3428
+ async reportChat(chatId, reason, params) {
3429
+ return await this.#chatManager.reportChat(chatId, reason, params);
3346
3430
  }
3347
3431
  /**
3348
- * Reopen a forum topic.
3432
+ * Set a chat's available reactions. User-only.
3349
3433
  *
3350
3434
  * @method ch
3351
3435
  * @param chatId The identifier of a chat.
3352
- * @param topicId The identifier of the topic.
3436
+ * @param availableReactions The new available reactions.
3353
3437
  */
3354
- async reopenTopic(chatId, topicId) {
3355
- await this.#forumManager.reopenTopic(chatId, topicId);
3438
+ async setAvailableReactions(chatId, availableReactions) {
3439
+ await this.#chatManager.setAvailableReactions(chatId, availableReactions);
3356
3440
  }
3357
3441
  /**
3358
- * Pin a forum topic.
3442
+ * Set the number of boosts required to circumvent a chat's default restrictions. User-only.
3359
3443
  *
3360
3444
  * @method ch
3361
3445
  * @param chatId The identifier of a chat.
3362
- * @param topicId The identifier of the topic.
3446
+ * @param boosts The number of boosts required to circumvent its restrictions.
3363
3447
  */
3364
- async pinTopic(chatId, topicId) {
3365
- await this.#forumManager.pinTopic(chatId, topicId);
3448
+ async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
3449
+ await this.#chatManager.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
3366
3450
  }
3367
3451
  /**
3368
- * Unpin a forum topic.
3452
+ * Change the description of a chat.
3369
3453
  *
3370
3454
  * @method ch
3371
3455
  * @param chatId The identifier of a chat.
3372
- * @param topicId The identifier of the topic.
3456
+ * @param description The new description.
3373
3457
  */
3374
- async unpinTopic(chatId, topicId) {
3375
- await this.#forumManager.unpinTopic(chatId, topicId);
3458
+ async setChatDescription(chatId, description) {
3459
+ await this.#chatManager.setChatDescription(chatId, description);
3376
3460
  }
3377
3461
  /**
3378
- * Promote a chat member.
3462
+ * Set the rights of a chat member.
3379
3463
  *
3380
3464
  * @method ch
3381
- * @param chatId The identifier of a chat.
3382
- * @param userId The identifier of the user to promote.
3465
+ * @param chatId The identifier of a chat. Must be a supergroup.
3466
+ * @param memberId The identifier of the member.
3383
3467
  */
3384
- async promoteChatMember(chatId, userId, params) {
3385
- await this.#chatManager.promoteChatMember(chatId, userId, params);
3468
+ async setChatMemberRights(chatId, memberId, params) {
3469
+ await this.#chatManager.setChatMemberRights(chatId, memberId, params);
3386
3470
  }
3387
3471
  /**
3388
3472
  * Change the tag of a chat member.
@@ -3395,121 +3479,154 @@ export class Client extends Composer {
3395
3479
  await this.#chatManager.setChatMemberTag(chatId, userId, params);
3396
3480
  }
3397
3481
  /**
3398
- * Enable sharing in a chat. User-only.
3482
+ * Set a chat's photo.
3399
3483
  *
3400
3484
  * @method ch
3401
3485
  * @param chatId The identifier of a chat.
3486
+ * @param photo A photo to set as the chat's photo.
3402
3487
  */
3403
- async enableSharing(chatId) {
3404
- await this.#chatManager.enableSharing(chatId);
3488
+ async setChatPhoto(chatId, photo, params) {
3489
+ await this.#chatManager.setChatPhoto(chatId, photo, params);
3405
3490
  }
3406
3491
  /**
3407
- * Disable sharing in a chat. User-only.
3492
+ * Set a chat's sticker set.
3493
+ *
3494
+ * @method ch
3495
+ * @param chatId The identifier of a chat. Must be a supergroup.
3496
+ * @param setName The name of the set.
3497
+ */
3498
+ async setChatStickerSet(chatId, setName) {
3499
+ await this.#messageManager.setChatStickerSet(chatId, setName);
3500
+ }
3501
+ /**
3502
+ * Change the title of a chat.
3408
3503
  *
3409
3504
  * @method ch
3410
3505
  * @param chatId The identifier of a chat.
3506
+ * @param title The new title.
3411
3507
  */
3412
- async disableSharing(chatId) {
3413
- await this.#chatManager.disableSharing(chatId);
3508
+ async setChatTitle(chatId, title) {
3509
+ await this.#chatManager.setChatTitle(chatId, title);
3414
3510
  }
3415
3511
  /**
3416
- * Get recommended channels. User-only.
3512
+ * Set the default send as chat of a chat. User-only.
3417
3513
  *
3418
3514
  * @method ch
3419
- * @returns A list of recommended channels.
3515
+ * @param chatId The identifier of a chat.
3516
+ * @param sendAs The new default send as chat.
3420
3517
  */
3421
- async getRecommendedChannels() {
3422
- return await this.#chatManager.getRecommendedChannels();
3518
+ async setDefaultSendAs(chatId, sendAs) {
3519
+ await this.#chatManager.setDefaultSendAs(chatId, sendAs);
3423
3520
  }
3424
3521
  /**
3425
- * Get similar channels. User-only.
3522
+ * Set a channel's discussion chat. User-only.
3426
3523
  *
3427
3524
  * @method ch
3428
- * @param chatId The identifier of a channel to get similar channels for.
3429
- * @returns A list of similar channels.
3525
+ * @param chatId The identifier of a channel.
3526
+ * @param discussionChatId The identifier of a chat to use as discussion for the channel.
3430
3527
  */
3431
- async getSimilarChannels(chatId) {
3432
- return await this.#chatManager.getSimilarChannels(chatId);
3528
+ async setDiscussionChat(chatId, discussionChatId) {
3529
+ await this.#chatManager.setDiscussionChat(chatId, discussionChatId);
3433
3530
  }
3434
3531
  /**
3435
- * Get similar bots. User-only.
3532
+ * Set the time to live of the messages of a chat. User-only.
3436
3533
  *
3437
3534
  * @method ch
3438
- * @param chatId The identifier of a bot to get similar bots for.
3439
- * @returns A list of similar bots.
3535
+ * @param chatId The identifier of a chat.
3536
+ * @param messageTtl The time to live of the messages in seconds.
3440
3537
  */
3441
- async getSimilarBots(chatId) {
3442
- return await this.#chatManager.getSimilarBots(chatId);
3538
+ async setMessageTtl(chatId, messageTtl) {
3539
+ await this.#chatListManager.setMessageTtl(chatId, messageTtl);
3443
3540
  }
3444
3541
  /**
3445
- * Get the count of online members in a chat. User-only.
3542
+ * Change slow mode in a group. User-only.
3543
+ *
3544
+ * @method ch
3545
+ * @param chatId The identifier of the group to change slow mode in.
3546
+ * @param duration New slow mode duration.
3547
+ */
3548
+ async setSlowMode(chatId, duration) {
3549
+ await this.#chatManager.setSlowMode(chatId, duration);
3550
+ }
3551
+ /**
3552
+ * Show the general forum topic.
3446
3553
  *
3447
3554
  * @method ch
3448
3555
  * @param chatId The identifier of a chat.
3449
- * @returns The count of online members in the chat.
3450
3556
  */
3451
- async getOnlineCount(chatId) {
3452
- return await this.#chatManager.getOnlineCount(chatId);
3557
+ async showGeneralTopic(chatId) {
3558
+ await this.#forumManager.showGeneralTopic(chatId);
3453
3559
  }
3454
3560
  /**
3455
- * Enable chat history for new members. User-only.
3561
+ * Show the member list of a group to non-admins. User-only.
3456
3562
  *
3457
3563
  * @method ch
3458
- * @param chatId The identifier of a chat.
3564
+ * @param chatId The identifier of the group.
3459
3565
  */
3460
- async enableChatHistoryForNewMembers(chatId) {
3461
- await this.#chatManager.enableChatHistoryForNewMembers(chatId);
3566
+ async showMemberList(chatId) {
3567
+ await this.#chatManager.showMemberList(chatId);
3462
3568
  }
3463
3569
  /**
3464
- * Disable chat history for new members. User-only.
3570
+ * Transfer the ownership of a chat. User-only.
3465
3571
  *
3466
3572
  * @method ch
3467
3573
  * @param chatId The identifier of a chat.
3574
+ * @param userId The identifier of the new owner.
3575
+ * @param password The password of the current account.
3468
3576
  */
3469
- async disableChatHistoryForNewMembers(chatId) {
3470
- await this.#chatManager.disableChatHistoryForNewMembers(chatId);
3577
+ async transferChatOwnership(chatId, userId, password) {
3578
+ await this.#chatManager.transferChatOwnership(chatId, userId, password);
3471
3579
  }
3472
3580
  /**
3473
- * Set the default send as chat of a chat. User-only.
3581
+ * Unarchive a single chat. User-only.
3474
3582
  *
3475
3583
  * @method ch
3476
3584
  * @param chatId The identifier of a chat.
3477
- * @param sendAs The new default send as chat.
3478
3585
  */
3479
- async setDefaultSendAs(chatId, sendAs) {
3480
- await this.#chatManager.setDefaultSendAs(chatId, sendAs);
3586
+ async unarchiveChat(chatId) {
3587
+ await this.#chatListManager.unarchiveChat(chatId);
3481
3588
  }
3482
3589
  /**
3483
- * Report a chat. User-only.
3590
+ * Unarchive multiple chats. User-only.
3484
3591
  *
3485
3592
  * @method ch
3486
- * @param chatId The identifier of a chat to report.
3487
- * @param reason The reason of the report.
3593
+ * @param chatIds The identifiers of the chats to unarchive.
3488
3594
  */
3489
- async reportChat(chatId, reason, params) {
3490
- return await this.#chatManager.reportChat(chatId, reason, params);
3595
+ async unarchiveChats(chatIds) {
3596
+ await this.#chatListManager.unarchiveChats(chatIds);
3491
3597
  }
3492
3598
  /**
3493
- * Mark a chat as unread. User-only.
3599
+ * Unban a member from a chat.
3494
3600
  *
3495
3601
  * @method ch
3496
- * @param chatId The identifier of a chat.
3602
+ * @param chatId The identifier of a chat. Must be a supergroup.
3603
+ * @param memberId The identifier of the member.
3497
3604
  */
3498
- async markChatAsUnread(chatId) {
3499
- return await this.#chatManager.markChatAsUnread(chatId);
3605
+ async unbanChatMember(chatId, memberId) {
3606
+ await this.#chatManager.unbanChatMember(chatId, memberId);
3500
3607
  }
3501
3608
  /**
3502
- * Mark a chat as read. User-only.
3609
+ * Unpin a forum topic.
3503
3610
  *
3504
3611
  * @method ch
3505
3612
  * @param chatId The identifier of a chat.
3613
+ * @param topicId The identifier of the topic.
3506
3614
  */
3507
- async markChatAsRead(chatId) {
3508
- return await this.#chatManager.markChatAsRead(chatId);
3615
+ async unpinTopic(chatId, topicId) {
3616
+ await this.#forumManager.unpinTopic(chatId, topicId);
3509
3617
  }
3510
3618
  //
3511
3619
  // ========================= CALLBACK QUERIES ========================= //
3512
3620
  //
3621
+ /**
3622
+ * Answer a callback query. Bot-only.
3623
+ *
3624
+ * @method cq
3625
+ * @param id ID of the callback query to answer.
3626
+ */
3627
+ async answerCallbackQuery(id, params) {
3628
+ await this.#callbackQueryManager.answerCallbackQuery(id, params);
3629
+ }
3513
3630
  /**
3514
3631
  * Send a callback query. User-only.
3515
3632
  *
@@ -3523,18 +3640,19 @@ export class Client extends Composer {
3523
3640
  async sendCallbackQuery(botId, messageId, question) {
3524
3641
  return await this.#callbackQueryManager.sendCallbackQuery(botId, messageId, question);
3525
3642
  }
3643
+ //
3644
+ // ========================= INLINE QUERIES ========================= //
3645
+ //
3526
3646
  /**
3527
- * Answer a callback query. Bot-only.
3647
+ * Answer an inline query. Bot-only.
3528
3648
  *
3529
- * @method cq
3530
- * @param id ID of the callback query to answer.
3649
+ * @method iq
3650
+ * @param id The identifier of the inline query to answer.
3651
+ * @param results The results to answer with.
3531
3652
  */
3532
- async answerCallbackQuery(id, params) {
3533
- await this.#callbackQueryManager.answerCallbackQuery(id, params);
3653
+ async answerInlineQuery(id, results, params) {
3654
+ await this.#inlineQueryManager.answerInlineQuery(id, results, params);
3534
3655
  }
3535
- //
3536
- // ========================= INLINE QUERIES ========================= //
3537
- //
3538
3656
  /**
3539
3657
  * Send an inline query. User-only.
3540
3658
  *
@@ -3547,42 +3665,17 @@ export class Client extends Composer {
3547
3665
  async sendInlineQuery(botId, chatId, params) {
3548
3666
  return await this.#inlineQueryManager.sendInlineQuery(botId, chatId, params);
3549
3667
  }
3550
- /**
3551
- * Answer an inline query. Bot-only.
3552
- *
3553
- * @method iq
3554
- * @param id The identifier of the inline query to answer.
3555
- * @param results The results to answer with.
3556
- */
3557
- async answerInlineQuery(id, results, params) {
3558
- await this.#inlineQueryManager.answerInlineQuery(id, results, params);
3559
- }
3560
3668
  //
3561
3669
  // ========================= BOTS ========================= //
3562
3670
  //
3563
3671
  /**
3564
- * Set the bot's description in the given language. Bot-only.
3565
- *
3566
- * @method bo
3567
- */
3568
- async setMyDescription(params) {
3569
- await this.#botInfoManager.setMyDescription(params);
3570
- }
3571
- /**
3572
- * Set the bot's name in the given language. Bot-only.
3573
- *
3574
- * @method bo
3575
- */
3576
- async setMyName(params) {
3577
- await this.#botInfoManager.setMyName(params);
3578
- }
3579
- /**
3580
- * Set the bot's short description in the given language. Bot-only.
3672
+ * Get the bot's commands in the given scope and/or language. Bot-only.
3581
3673
  *
3582
3674
  * @method bo
3675
+ * @returns The current bot's commands in the specified language.
3583
3676
  */
3584
- async setMyShortDescription(params) {
3585
- await this.#botInfoManager.setMyShortDescription(params);
3677
+ async getMyCommands(params) {
3678
+ return await this.#botInfoManager.getMyCommands(params);
3586
3679
  }
3587
3680
  /**
3588
3681
  * Get the bot's description in the given language. Bot-only.
@@ -3621,28 +3714,32 @@ export class Client extends Composer {
3621
3714
  await this.#botInfoManager.setMyCommands(commands, params);
3622
3715
  }
3623
3716
  /**
3624
- * Get the bot's commands in the given scope and/or language. Bot-only.
3717
+ * Set the bot's description in the given language. Bot-only.
3625
3718
  *
3626
3719
  * @method bo
3627
- * @returns The current bot's commands in the specified language.
3628
3720
  */
3629
- async getMyCommands(params) {
3630
- return await this.#botInfoManager.getMyCommands(params);
3721
+ async setMyDescription(params) {
3722
+ await this.#botInfoManager.setMyDescription(params);
3631
3723
  }
3632
- //
3633
- // ========================= REACTIONS ========================= //
3634
- //
3635
3724
  /**
3636
- * Change reactions made to a message.
3725
+ * Set the bot's name in the given language. Bot-only.
3637
3726
  *
3638
- * @method re
3639
- * @param chatId The identifier of the chat which the message belongs to.
3640
- * @param messageId The identifier of the message to add the reaction to.
3641
- * @param reactions The new reactions.
3727
+ * @method bo
3642
3728
  */
3643
- async setReactions(chatId, messageId, reactions, params) {
3644
- await this.#messageManager.setReactions(chatId, messageId, reactions, params);
3729
+ async setMyName(params) {
3730
+ await this.#botInfoManager.setMyName(params);
3645
3731
  }
3732
+ /**
3733
+ * Set the bot's short description in the given language. Bot-only.
3734
+ *
3735
+ * @method bo
3736
+ */
3737
+ async setMyShortDescription(params) {
3738
+ await this.#botInfoManager.setMyShortDescription(params);
3739
+ }
3740
+ //
3741
+ // ========================= REACTIONS ========================= //
3742
+ //
3646
3743
  /**
3647
3744
  * Make a reaction to a message.
3648
3745
  *
@@ -3654,6 +3751,14 @@ export class Client extends Composer {
3654
3751
  async addReaction(chatId, messageId, reaction, params) {
3655
3752
  await this.#messageManager.addReaction(chatId, messageId, reaction, params);
3656
3753
  }
3754
+ /**
3755
+ * Clear recent reactions. User-only.
3756
+ *
3757
+ * @method re
3758
+ */
3759
+ async clearRecentReactions() {
3760
+ return await this.#messageManager.clearRecentReactions();
3761
+ }
3657
3762
  /**
3658
3763
  * Undo a reaction made to a message.
3659
3764
  *
@@ -3687,50 +3792,48 @@ export class Client extends Composer {
3687
3792
  return await this.#messageManager.removeUserReactions(chatId, userId);
3688
3793
  }
3689
3794
  /**
3690
- * Clear recent reactions. User-only.
3795
+ * Change reactions made to a message.
3691
3796
  *
3692
3797
  * @method re
3798
+ * @param chatId The identifier of the chat which the message belongs to.
3799
+ * @param messageId The identifier of the message to add the reaction to.
3800
+ * @param reactions The new reactions.
3693
3801
  */
3694
- async clearRecentReactions() {
3695
- return await this.#messageManager.clearRecentReactions();
3802
+ async setReactions(chatId, messageId, reactions, params) {
3803
+ await this.#messageManager.setReactions(chatId, messageId, reactions, params);
3696
3804
  }
3697
3805
  //
3698
3806
  // ========================= STORIES ========================= //
3699
3807
  //
3700
3808
  /**
3701
- * Create a story. User-only.
3809
+ * Add multiple stories to highlights. User-only.
3702
3810
  *
3703
3811
  * @method st
3704
- * @param content The content of the story.
3705
- * @returns The created story.
3812
+ * @param chatId The identifier of a chat.
3813
+ * @param storyIds The identifiers of the stories to add to highlights.
3706
3814
  */
3707
- async createStory(chatId, content, params) {
3708
- return await this.#storyManager.createStory(chatId, content, params);
3815
+ async addStoriesToHighlights(chatId, storyIds) {
3816
+ await this.#storyManager.addStoriesToHighlights(chatId, storyIds);
3709
3817
  }
3710
3818
  /**
3711
- * Retrieve multiple stories. User-only.
3819
+ * Add a single story to highlights. User-only.
3712
3820
  *
3713
3821
  * @method st
3714
3822
  * @param chatId The identifier of a chat.
3715
- * @param storyIds The identifiers of the stories to retrieve.
3716
- * @returns The retrieved stories.
3823
+ * @param storyId The identifier of the story to add to highlights.
3717
3824
  */
3718
- async getStories(chatId, storyIds) {
3719
- if (!storyIds.length) {
3720
- return [];
3721
- }
3722
- return await this.#storyManager.getStories(chatId, storyIds);
3825
+ async addStoryToHighlights(chatId, storyId) {
3826
+ await this.#storyManager.addStoryToHighlights(chatId, storyId);
3723
3827
  }
3724
3828
  /**
3725
- * Retrieve a single story. User-only.
3829
+ * Create a story. User-only.
3726
3830
  *
3727
3831
  * @method st
3728
- * @param chatId The identifier of a chat.
3729
- * @param storyId The identifier of the story to retrieve.
3730
- * @returns The retrieved story.
3832
+ * @param content The content of the story.
3833
+ * @returns The created story.
3731
3834
  */
3732
- async getStory(chatId, storyId) {
3733
- return await this.#storyManager.getStory(chatId, storyId);
3835
+ async createStory(chatId, content, params) {
3836
+ return await this.#storyManager.createStory(chatId, content, params);
3734
3837
  }
3735
3838
  /**
3736
3839
  * Delete multiple stories. User-only.
@@ -3753,24 +3856,29 @@ export class Client extends Composer {
3753
3856
  await this.#storyManager.deleteStory(chatId, storyId);
3754
3857
  }
3755
3858
  /**
3756
- * Add multiple stories to highlights. User-only.
3859
+ * Retrieve multiple stories. User-only.
3757
3860
  *
3758
3861
  * @method st
3759
3862
  * @param chatId The identifier of a chat.
3760
- * @param storyIds The identifiers of the stories to add to highlights.
3863
+ * @param storyIds The identifiers of the stories to retrieve.
3864
+ * @returns The retrieved stories.
3761
3865
  */
3762
- async addStoriesToHighlights(chatId, storyIds) {
3763
- await this.#storyManager.addStoriesToHighlights(chatId, storyIds);
3866
+ async getStories(chatId, storyIds) {
3867
+ if (!storyIds.length) {
3868
+ return [];
3869
+ }
3870
+ return await this.#storyManager.getStories(chatId, storyIds);
3764
3871
  }
3765
3872
  /**
3766
- * Add a single story to highlights. User-only.
3873
+ * Retrieve a single story. User-only.
3767
3874
  *
3768
3875
  * @method st
3769
3876
  * @param chatId The identifier of a chat.
3770
- * @param storyId The identifier of the story to add to highlights.
3877
+ * @param storyId The identifier of the story to retrieve.
3878
+ * @returns The retrieved story.
3771
3879
  */
3772
- async addStoryToHighlights(chatId, storyId) {
3773
- await this.#storyManager.addStoryToHighlights(chatId, storyId);
3880
+ async getStory(chatId, storyId) {
3881
+ return await this.#storyManager.getStory(chatId, storyId);
3774
3882
  }
3775
3883
  /**
3776
3884
  * Remove multiple stories from highlights. User-only.
@@ -3792,16 +3900,6 @@ export class Client extends Composer {
3792
3900
  async removeStoryFromHighlights(chatId, storyId) {
3793
3901
  await this.#storyManager.removeStoryFromHighlights(chatId, storyId);
3794
3902
  }
3795
- /**
3796
- * Report a single story. User-only.
3797
- *
3798
- * @method st
3799
- * @param chatId The identifier of a chat that posted the story.
3800
- * @param storyId The identifier of the story to report.
3801
- */
3802
- async reportStory(chatId, storyId, params) {
3803
- return await this.#storyManager.reportStory(chatId, storyId, params);
3804
- }
3805
3903
  /**
3806
3904
  * Report multiple stories. User-only.
3807
3905
  *
@@ -3812,52 +3910,70 @@ export class Client extends Composer {
3812
3910
  async reportStories(chatId, storyIds, params) {
3813
3911
  return await this.#storyManager.reportStories(chatId, storyIds, params);
3814
3912
  }
3913
+ /**
3914
+ * Report a single story. User-only.
3915
+ *
3916
+ * @method st
3917
+ * @param chatId The identifier of a chat that posted the story.
3918
+ * @param storyId The identifier of the story to report.
3919
+ */
3920
+ async reportStory(chatId, storyId, params) {
3921
+ return await this.#storyManager.reportStory(chatId, storyId, params);
3922
+ }
3815
3923
  //
3816
3924
  // ========================= STORY ALBUMS ========================= //
3817
3925
  //
3818
3926
  /**
3819
- * Create a story album. User-only.
3927
+ * Add multiple stories to an album. User-only.
3820
3928
  *
3821
3929
  * @method sa
3822
- * @param chatId The identifier of the chat to create the album in.
3823
- * @param name The name of the album.
3824
- * @param storyIds The initial stories inside the album.
3930
+ * @param chatId The identifier of the chat including the album.
3931
+ * @param albumId The identifier of an album.
3932
+ * @param storyIds The identifiers of the stories to add.
3825
3933
  */
3826
- async createStoryAlbum(chatId, name, storyIds) {
3827
- return await this.#storyAlbumManager.createStoryAlbum(chatId, name, storyIds);
3934
+ async addStoriesToAlbum(chatId, albumId, storyIds) {
3935
+ return await this.#storyAlbumManager.addStoriesToAlbum(chatId, albumId, storyIds);
3828
3936
  }
3829
3937
  /**
3830
- * Set the name of a story album. User-only.
3938
+ * Add a single story to an album. User-only.
3831
3939
  *
3832
3940
  * @method sa
3833
3941
  * @param chatId The identifier of the chat including the album.
3834
- * @param albumId The identifier of the album to rename.
3835
- * @param name The new name of the album.
3942
+ * @param albumId The identifier of an album.
3943
+ * @param storyId The identifier of the story to add.
3944
+ */
3945
+ async addStoryToAlbum(chatId, albumId, storyId) {
3946
+ return await this.#storyAlbumManager.addStoryToAlbum(chatId, albumId, storyId);
3947
+ }
3948
+ /**
3949
+ * Create a story album. User-only.
3950
+ *
3951
+ * @method sa
3952
+ * @param chatId The identifier of the chat to create the album in.
3953
+ * @param name The name of the album.
3954
+ * @param storyIds The initial stories inside the album.
3836
3955
  */
3837
- async setStoryAlbumName(chatId, albumId, name) {
3838
- return await this.#storyAlbumManager.setStoryAlbumName(chatId, albumId, name);
3956
+ async createStoryAlbum(chatId, name, storyIds) {
3957
+ return await this.#storyAlbumManager.createStoryAlbum(chatId, name, storyIds);
3839
3958
  }
3840
3959
  /**
3841
- * Add multiple stories to an album. User-only.
3960
+ * Get stories inside an album. User-only.
3842
3961
  *
3843
3962
  * @method sa
3844
- * @param chatId The identifier of the chat including the album.
3963
+ * @param chatId The identifier of the chat including albums.
3845
3964
  * @param albumId The identifier of an album.
3846
- * @param storyIds The identifiers of the stories to add.
3847
3965
  */
3848
- async addStoriesToAlbum(chatId, albumId, storyIds) {
3849
- return await this.#storyAlbumManager.addStoriesToAlbum(chatId, albumId, storyIds);
3966
+ async getStoriesInAlbum(chatId, albumId) {
3967
+ return await this.#storyAlbumManager.getStoriesInAlbum(chatId, albumId);
3850
3968
  }
3851
3969
  /**
3852
- * Add a single story to an album. User-only.
3970
+ * Get story albums in a chat. User-only.
3853
3971
  *
3854
3972
  * @method sa
3855
- * @param chatId The identifier of the chat including the album.
3856
- * @param albumId The identifier of an album.
3857
- * @param storyId The identifier of the story to add.
3973
+ * @param chatId The identifier of a chat including albums.
3858
3974
  */
3859
- async addStoryToAlbum(chatId, albumId, storyId) {
3860
- return await this.#storyAlbumManager.addStoryToAlbum(chatId, albumId, storyId);
3975
+ async getStoryAlbums(chatId) {
3976
+ return await this.#storyAlbumManager.getStoryAlbums(chatId);
3861
3977
  }
3862
3978
  /**
3863
3979
  * Remove multiple stories from an album. User-only.
@@ -3893,23 +4009,15 @@ export class Client extends Composer {
3893
4009
  return await this.#storyAlbumManager.reorderStoriesInAlbum(chatId, albumId, storyIds);
3894
4010
  }
3895
4011
  /**
3896
- * Get story albums in a chat. User-only.
3897
- *
3898
- * @method sa
3899
- * @param chatId The identifier of a chat including albums.
3900
- */
3901
- async getStoryAlbums(chatId) {
3902
- return await this.#storyAlbumManager.getStoryAlbums(chatId);
3903
- }
3904
- /**
3905
- * Get stories inside an album. User-only.
4012
+ * Set the name of a story album. User-only.
3906
4013
  *
3907
4014
  * @method sa
3908
- * @param chatId The identifier of the chat including albums.
3909
- * @param albumId The identifier of an album.
4015
+ * @param chatId The identifier of the chat including the album.
4016
+ * @param albumId The identifier of the album to rename.
4017
+ * @param name The new name of the album.
3910
4018
  */
3911
- async getStoriesInAlbum(chatId, albumId) {
3912
- return await this.#storyAlbumManager.getStoriesInAlbum(chatId, albumId);
4019
+ async setStoryAlbumName(chatId, albumId, name) {
4020
+ return await this.#storyAlbumManager.setStoryAlbumName(chatId, albumId, name);
3913
4021
  }
3914
4022
  //
3915
4023
  // ========================= NETWORK STATISTICS ========================= //
@@ -3926,85 +4034,85 @@ export class Client extends Composer {
3926
4034
  // ========================= VIDEO CHATS ========================= //
3927
4035
  //
3928
4036
  /**
3929
- * Start a video chat. User-only.
4037
+ * Download a live stream segment. User-only.
3930
4038
  *
3931
4039
  * @method vc
3932
- * @param chatId The identifier of a chat to start the video chat in.
3933
- * @returns The started video chat.
4040
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
4041
+ * @param channelId Stream channel ID.
4042
+ * @param scale Stream channel scale.
4043
+ * @param timestamp Millisecond timestamp of the chunk to download.
3934
4044
  */
3935
- async startVideoChat(chatId, params) {
3936
- return await this.#videoChatManager.startVideoChat(chatId, params);
4045
+ async downloadLiveStreamSegment(id, channelId, scale, timestamp, params) {
4046
+ return await this.#videoChatManager.downloadLiveStreamSegment(id, channelId, scale, timestamp, params);
3937
4047
  }
3938
4048
  /**
3939
- * Schedule a video chat. User-only.
4049
+ * Get live stream channels. User-only.
3940
4050
  *
3941
4051
  * @method vc
3942
- * @param chatId The identifier of a chat to schedule the video chat in.
3943
- * @param startAt A point in time in the future when the video chat will be started.
3944
- * @returns The scheduled video chat.
4052
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3945
4053
  */
3946
- async scheduleVideoChat(chatId, startAt, params) {
3947
- return await this.#videoChatManager.scheduleVideoChat(chatId, startAt, params);
4054
+ async getLiveStreamChannels(id) {
4055
+ return await this.#videoChatManager.getLiveStreamChannels(id);
3948
4056
  }
3949
4057
  /**
3950
- * Join a video chat. User-only.
4058
+ * Get a video chat. User-only.
3951
4059
  *
3952
4060
  * @method vc
3953
4061
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3954
- * @param params_ WebRTC connection parameters.
3955
- * @returns Parameters to be passed to the used WebRTC library.
4062
+ * @cache
3956
4063
  */
3957
- async joinVideoChat(id, params_, params) {
3958
- return await this.#videoChatManager.joinVideoChat(id, params_, params);
4064
+ async getVideoChat(id) {
4065
+ return await this.#videoChatManager.getVideoChat(id);
3959
4066
  }
3960
4067
  /**
3961
- * Leave a video chat. User-only.
4068
+ * Join a live stream. User-only.
3962
4069
  *
3963
4070
  * @method vc
3964
4071
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3965
4072
  */
3966
- async leaveVideoChat(id) {
3967
- await this.#videoChatManager.leaveVideoChat(id);
4073
+ async joinLiveStream(id) {
4074
+ await this.#videoChatManager.joinLiveStream(id);
3968
4075
  }
3969
4076
  /**
3970
- * Join a live stream. User-only.
4077
+ * Join a video chat. User-only.
3971
4078
  *
3972
4079
  * @method vc
3973
4080
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
4081
+ * @param params_ WebRTC connection parameters.
4082
+ * @returns Parameters to be passed to the used WebRTC library.
3974
4083
  */
3975
- async joinLiveStream(id) {
3976
- await this.#videoChatManager.joinLiveStream(id);
4084
+ async joinVideoChat(id, params_, params) {
4085
+ return await this.#videoChatManager.joinVideoChat(id, params_, params);
3977
4086
  }
3978
4087
  /**
3979
- * Get a video chat. User-only.
4088
+ * Leave a video chat. User-only.
3980
4089
  *
3981
4090
  * @method vc
3982
4091
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3983
- * @cache
3984
4092
  */
3985
- async getVideoChat(id) {
3986
- return await this.#videoChatManager.getVideoChat(id);
4093
+ async leaveVideoChat(id) {
4094
+ await this.#videoChatManager.leaveVideoChat(id);
3987
4095
  }
3988
4096
  /**
3989
- * Get live stream channels. User-only.
4097
+ * Schedule a video chat. User-only.
3990
4098
  *
3991
4099
  * @method vc
3992
- * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
4100
+ * @param chatId The identifier of a chat to schedule the video chat in.
4101
+ * @param startAt A point in time in the future when the video chat will be started.
4102
+ * @returns The scheduled video chat.
3993
4103
  */
3994
- async getLiveStreamChannels(id) {
3995
- return await this.#videoChatManager.getLiveStreamChannels(id);
4104
+ async scheduleVideoChat(chatId, startAt, params) {
4105
+ return await this.#videoChatManager.scheduleVideoChat(chatId, startAt, params);
3996
4106
  }
3997
4107
  /**
3998
- * Download a live stream segment. User-only.
4108
+ * Start a video chat. User-only.
3999
4109
  *
4000
4110
  * @method vc
4001
- * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
4002
- * @param channelId Stream channel ID.
4003
- * @param scale Stream channel scale.
4004
- * @param timestamp Millisecond timestamp of the chunk to download.
4111
+ * @param chatId The identifier of a chat to start the video chat in.
4112
+ * @returns The started video chat.
4005
4113
  */
4006
- async downloadLiveStreamSegment(id, channelId, scale, timestamp, params) {
4007
- return await this.#videoChatManager.downloadLiveStreamSegment(id, channelId, scale, timestamp, params);
4114
+ async startVideoChat(chatId, params) {
4115
+ return await this.#videoChatManager.startVideoChat(chatId, params);
4008
4116
  }
4009
4117
  //
4010
4118
  // ========================= PAYMENTS ========================= //
@@ -4020,23 +4128,22 @@ export class Client extends Composer {
4020
4128
  await this.#paymentManager.answerPreCheckoutQuery(preCheckoutQueryId, ok, params);
4021
4129
  }
4022
4130
  /**
4023
- * Refund a star payment. Bot-only.
4131
+ * Get the star balance of a chat.
4024
4132
  *
4025
4133
  * @method pa
4026
- * @param userId The identifier of the user that was charged.
4027
- * @param telegramPaymentChargeId The identifier of the charge.
4134
+ * @param chatId The identifier of the chat to get the star balance for.
4028
4135
  */
4029
- async refundStarPayment(userId, telegramPaymentChargeId) {
4030
- await this.#paymentManager.refundStarPayment(userId, telegramPaymentChargeId);
4136
+ async getStarBalance(chatId) {
4137
+ return await this.#paymentManager.getStarBalance(chatId);
4031
4138
  }
4032
4139
  /**
4033
- * Get the star balance of a chat.
4140
+ * Get star transactions.
4034
4141
  *
4035
4142
  * @method pa
4036
- * @param chatId The identifier of the chat to get the star balance for.
4143
+ * @param chatId The identifier of the chat to get star transactions for.
4037
4144
  */
4038
- async getStarBalance(chatId) {
4039
- return await this.#paymentManager.getStarBalance(chatId);
4145
+ async getStarTransactions(chatId, params) {
4146
+ return await this.#paymentManager.getStarTransactions(chatId, params);
4040
4147
  }
4041
4148
  /**
4042
4149
  * Get the TON balance of a chat.
@@ -4048,52 +4155,53 @@ export class Client extends Composer {
4048
4155
  return await this.#paymentManager.getTonBalance(chatId);
4049
4156
  }
4050
4157
  /**
4051
- * Get star transactions.
4158
+ * Refund a star payment. Bot-only.
4052
4159
  *
4053
4160
  * @method pa
4054
- * @param chatId The identifier of the chat to get star transactions for.
4161
+ * @param userId The identifier of the user that was charged.
4162
+ * @param telegramPaymentChargeId The identifier of the charge.
4055
4163
  */
4056
- async getStarTransactions(chatId, params) {
4057
- return await this.#paymentManager.getStarTransactions(chatId, params);
4164
+ async refundStarPayment(userId, telegramPaymentChargeId) {
4165
+ await this.#paymentManager.refundStarPayment(userId, telegramPaymentChargeId);
4058
4166
  }
4059
4167
  //
4060
4168
  // ========================= CONTACTS ========================= //
4061
4169
  //
4062
4170
  /**
4063
- * Get contacts. User-only.
4171
+ * Add a contact. User-only.
4064
4172
  *
4065
4173
  * @method co
4174
+ * @param userId The identifier of the user to add as contact.
4175
+ * @param firstName The contact's first name.
4066
4176
  */
4067
- async getContacts() {
4068
- return await this.#contactManager.getContacts();
4177
+ async addContact(userId, firstName, params) {
4178
+ await this.#contactManager.addContact(userId, firstName, params);
4069
4179
  }
4070
4180
  /**
4071
- * Delete multiple contacts. User-only.
4181
+ * Delete a single contact. User-only.
4072
4182
  *
4073
4183
  * @method co
4074
- * @param userIds The identifiers of contacts to delete.
4184
+ * @param userId The identifier of the contact to delete.
4075
4185
  */
4076
- async deleteContacts(userIds) {
4077
- await this.#contactManager.deleteContacts(userIds);
4186
+ async deleteContact(userId) {
4187
+ await this.#contactManager.deleteContact(userId);
4078
4188
  }
4079
4189
  /**
4080
- * Delete a single contact. User-only.
4190
+ * Delete multiple contacts. User-only.
4081
4191
  *
4082
4192
  * @method co
4083
- * @param userId The identifier of the contact to delete.
4193
+ * @param userIds The identifiers of contacts to delete.
4084
4194
  */
4085
- async deleteContact(userId) {
4086
- await this.#contactManager.deleteContact(userId);
4195
+ async deleteContacts(userIds) {
4196
+ await this.#contactManager.deleteContacts(userIds);
4087
4197
  }
4088
4198
  /**
4089
- * Add a contact. User-only.
4199
+ * Get contacts. User-only.
4090
4200
  *
4091
4201
  * @method co
4092
- * @param userId The identifier of the user to add as contact.
4093
- * @param firstName The contact's first name.
4094
4202
  */
4095
- async addContact(userId, firstName, params) {
4096
- await this.#contactManager.addContact(userId, firstName, params);
4203
+ async getContacts() {
4204
+ return await this.#contactManager.getContacts();
4097
4205
  }
4098
4206
  /**
4099
4207
  * Set a contact note.
@@ -4120,12 +4228,13 @@ export class Client extends Composer {
4120
4228
  // ========================= GIFTS ========================= //
4121
4229
  //
4122
4230
  /**
4123
- * Get available gifts.
4231
+ * Craft gifts.
4124
4232
  *
4125
4233
  * @method gf
4234
+ * @param gifts The gifts to craft.
4126
4235
  */
4127
- async getGifts() {
4128
- return await this.#giftManager.getGifts();
4236
+ async craftGifts(gifts) {
4237
+ await this.#giftManager.craftGifts(gifts);
4129
4238
  }
4130
4239
  /**
4131
4240
  * Get gifts claimed by a user or a channel. User-only.
@@ -4137,73 +4246,74 @@ export class Client extends Composer {
4137
4246
  return await this.#giftManager.getClaimedGifts(chatId, params);
4138
4247
  }
4139
4248
  /**
4140
- * Send a gift.
4249
+ * Get a gift using its slug.
4141
4250
  *
4142
4251
  * @method gf
4143
- * @param chatId The identifier of a user or a channel to send the gift to.
4144
- * @param giftId The identifier of the gift to send.
4252
+ * @param slug The slug of a gift.
4145
4253
  */
4146
- async sendGift(chatId, giftId, params) {
4147
- await this.#giftManager.sendGift(chatId, giftId, params);
4254
+ async getGift(slug) {
4255
+ return await this.#giftManager.getGift(slug);
4148
4256
  }
4149
4257
  /**
4150
- * Sell a gift.
4258
+ * Get available gifts.
4151
4259
  *
4152
4260
  * @method gf
4153
- * @param gift The gift to sell.
4154
4261
  */
4155
- async sellGift(gift) {
4156
- await this.#giftManager.sellGift(gift);
4262
+ async getGifts() {
4263
+ return await this.#giftManager.getGifts();
4157
4264
  }
4158
4265
  /**
4159
- * Craft gifts.
4266
+ * Gift a Telegram Premium subscription. Bot-only.
4160
4267
  *
4161
4268
  * @method gf
4162
- * @param gifts The gifts to craft.
4269
+ * @param userId The identifier of a user to gift the Telegram Premium subscription to.
4270
+ * @param duration The duration of the subscription.
4163
4271
  */
4164
- async craftGifts(gifts) {
4165
- await this.#giftManager.craftGifts(gifts);
4272
+ async giftPremiumSubscription(userId, duration, params) {
4273
+ return await this.#giftManager.giftPremiumSubscription(userId, duration, params);
4166
4274
  }
4167
4275
  /**
4168
- * Get a gift using its slug.
4276
+ * Sell a gift.
4169
4277
  *
4170
4278
  * @method gf
4171
- * @param slug The slug of a gift.
4279
+ * @param gift The gift to sell.
4172
4280
  */
4173
- async getGift(slug) {
4174
- return await this.#giftManager.getGift(slug);
4281
+ async sellGift(gift) {
4282
+ await this.#giftManager.sellGift(gift);
4175
4283
  }
4176
4284
  /**
4177
- * Transfer a gift. User-only.
4285
+ * Send a gift.
4178
4286
  *
4179
4287
  * @method gf
4180
- * @param chatId The identifier of a chat to transfer the gift to.
4181
- * @param gift The gift to transfer.
4288
+ * @param chatId The identifier of a user or a channel to send the gift to.
4289
+ * @param giftId The identifier of the gift to send.
4182
4290
  */
4183
- async transferGift(chatId, gift) {
4184
- return await this.#giftManager.transferGift(chatId, gift);
4291
+ async sendGift(chatId, giftId, params) {
4292
+ await this.#giftManager.sendGift(chatId, giftId, params);
4185
4293
  }
4186
4294
  /**
4187
- * Gift a Telegram Premium subscription. Bot-only.
4295
+ * Transfer a gift. User-only.
4188
4296
  *
4189
4297
  * @method gf
4190
- * @param userId The identifier of a user to gift the Telegram Premium subscription to.
4191
- * @param duration The duration of the subscription.
4298
+ * @param chatId The identifier of a chat to transfer the gift to.
4299
+ * @param gift The gift to transfer.
4192
4300
  */
4193
- async giftPremiumSubscription(userId, duration, params) {
4194
- return await this.#giftManager.giftPremiumSubscription(userId, duration, params);
4301
+ async transferGift(chatId, gift) {
4302
+ return await this.#giftManager.transferGift(chatId, gift);
4195
4303
  }
4196
4304
  //
4197
4305
  // ========================= GIFT COLLECTIONS ========================= //
4198
4306
  //
4199
4307
  /**
4200
- * Get gift collections of a chat. User-only.
4308
+ * Add gifts to a gift collection. User-only.
4201
4309
  *
4202
4310
  * @method gc
4203
- * @param chatId The identifier of a chat to get gift collections for.
4311
+ * @param chatId The identifier of the chat that includes the gift collection.
4312
+ * @param collectionId The identifier of a gift collection.
4313
+ * @param gifts The gifts to add to the collection.
4204
4314
  */
4205
- async getGiftCollections(chatId) {
4206
- return await this.#giftCollectionManager.getGiftCollections(chatId);
4315
+ async addGiftsToCollection(chatId, collectionId, gifts) {
4316
+ return await this.#giftCollectionManager.addGiftsToCollection(chatId, collectionId, gifts);
4207
4317
  }
4208
4318
  /**
4209
4319
  * Create a gift collection. User-only.
@@ -4217,26 +4327,23 @@ export class Client extends Composer {
4217
4327
  return await this.#giftCollectionManager.createGiftCollection(chatId, name, gifts);
4218
4328
  }
4219
4329
  /**
4220
- * Set the name of a gift collection. User-only.
4330
+ * Delete a gift collection. User-only.
4221
4331
  *
4222
4332
  * @method gc
4223
4333
  * @param chatId The identifier of the chat that includes the gift collection.
4224
4334
  * @param collectionId The identifier of a gift collection.
4225
- * @param name The gift collection's new name.
4226
4335
  */
4227
- async setGiftCollectionName(chatId, collectionId, name) {
4228
- return await this.#giftCollectionManager.setGiftCollectionName(chatId, collectionId, name);
4336
+ async deleteGiftCollection(chatId, collectionId) {
4337
+ return await this.#giftCollectionManager.deleteGiftCollection(chatId, collectionId);
4229
4338
  }
4230
4339
  /**
4231
- * Add gifts to a gift collection. User-only.
4340
+ * Get gift collections of a chat. User-only.
4232
4341
  *
4233
4342
  * @method gc
4234
- * @param chatId The identifier of the chat that includes the gift collection.
4235
- * @param collectionId The identifier of a gift collection.
4236
- * @param gifts The gifts to add to the collection.
4343
+ * @param chatId The identifier of a chat to get gift collections for.
4237
4344
  */
4238
- async addGiftsToCollection(chatId, collectionId, gifts) {
4239
- return await this.#giftCollectionManager.addGiftsToCollection(chatId, collectionId, gifts);
4345
+ async getGiftCollections(chatId) {
4346
+ return await this.#giftCollectionManager.getGiftCollections(chatId);
4240
4347
  }
4241
4348
  /**
4242
4349
  * Remove gifts from a gift collection. User-only.
@@ -4261,27 +4368,19 @@ export class Client extends Composer {
4261
4368
  return await this.#giftCollectionManager.reorderGiftsInCollection(chatId, collectionId, gifts);
4262
4369
  }
4263
4370
  /**
4264
- * Delete a gift collection. User-only.
4371
+ * Set the name of a gift collection. User-only.
4265
4372
  *
4266
4373
  * @method gc
4267
4374
  * @param chatId The identifier of the chat that includes the gift collection.
4268
4375
  * @param collectionId The identifier of a gift collection.
4376
+ * @param name The gift collection's new name.
4269
4377
  */
4270
- async deleteGiftCollection(chatId, collectionId) {
4271
- return await this.#giftCollectionManager.deleteGiftCollection(chatId, collectionId);
4378
+ async setGiftCollectionName(chatId, collectionId, name) {
4379
+ return await this.#giftCollectionManager.setGiftCollectionName(chatId, collectionId, name);
4272
4380
  }
4273
4381
  //
4274
4382
  // ========================= TAKEOUTS ========================= //
4275
4383
  //
4276
- /**
4277
- * Start a takeout session. User-only.
4278
- *
4279
- * @method to
4280
- * @returns The identifier of the takeout session.
4281
- */
4282
- async startTakeoutSession(params) {
4283
- return await this.#takeoutManager.startTakeoutSession(params);
4284
- }
4285
4384
  /**
4286
4385
  * End a takeout session. User-only.
4287
4386
  *
@@ -4300,26 +4399,37 @@ export class Client extends Composer {
4300
4399
  async getLeftChannels(takeoutId, params) {
4301
4400
  return await this.#takeoutManager.getLeftChannels(takeoutId, params);
4302
4401
  }
4402
+ /**
4403
+ * Start a takeout session. User-only.
4404
+ *
4405
+ * @method to
4406
+ * @returns The identifier of the takeout session.
4407
+ */
4408
+ async startTakeoutSession(params) {
4409
+ return await this.#takeoutManager.startTakeoutSession(params);
4410
+ }
4303
4411
  //
4304
4412
  // ========================= STICKER SETS ========================= //
4305
4413
  //
4306
4414
  /**
4307
- * Get a sticker set.
4415
+ * Add a sticker to a sticker set.
4308
4416
  *
4309
4417
  * @method ss
4310
4418
  * @param slug The slug of the sticker set or its link.
4419
+ * @param sticker The sticker to add.
4311
4420
  */
4312
- async getStickerSet(slug) {
4313
- return await this.#stickerSetManager.getStickerSet(slug);
4421
+ async addStickerToStickerSet(slug, sticker, params) {
4422
+ return await this.#stickerSetManager.addStickerToStickerSet(slug, sticker, params);
4314
4423
  }
4315
4424
  /**
4316
- * Get a dice sticker set.
4425
+ * Change the position of a sticker in its set.
4317
4426
  *
4318
4427
  * @method ss
4319
- * @param emoji The emoji of the dice.
4428
+ * @param fileId The identifier of the sticker.
4429
+ * @param position The new position of the sticker.
4320
4430
  */
4321
- async getDiceStickerSet(emoji) {
4322
- return await this.#stickerSetManager.getDiceStickerSet(emoji);
4431
+ async changeStickerPositionInStickerSet(fileId, position) {
4432
+ return await this.#stickerSetManager.changeStickerPositionInStickerSet(fileId, position);
4323
4433
  }
4324
4434
  /**
4325
4435
  * Check the availability of a sticker set slug.
@@ -4331,16 +4441,6 @@ export class Client extends Composer {
4331
4441
  async checkStickerSetSlug(slug) {
4332
4442
  return await this.#stickerSetManager.checkStickerSetSlug(slug);
4333
4443
  }
4334
- /**
4335
- * Suggest a sticker set slug from its title.
4336
- *
4337
- * @method ss
4338
- * @param title A title of a sticker set.
4339
- * @returns The suggested slug.
4340
- */
4341
- async suggestStickerSetSlug(title) {
4342
- return await this.#stickerSetManager.suggestStickerSetSlug(title);
4343
- }
4344
4444
  /**
4345
4445
  * Create a sticker set.
4346
4446
  *
@@ -4353,14 +4453,31 @@ export class Client extends Composer {
4353
4453
  return await this.#stickerSetManager.createStickerSet(name, slug, stickers, params);
4354
4454
  }
4355
4455
  /**
4356
- * Add a sticker to a sticker set.
4456
+ * Delete a sticker set.
4357
4457
  *
4358
4458
  * @method ss
4359
4459
  * @param slug The slug of the sticker set or its link.
4360
- * @param sticker The sticker to add.
4361
4460
  */
4362
- async addStickerToStickerSet(slug, sticker, params) {
4363
- return await this.#stickerSetManager.addStickerToStickerSet(slug, sticker, params);
4461
+ async deleteStickerSet(slug) {
4462
+ return await this.#stickerSetManager.deleteStickerSet(slug);
4463
+ }
4464
+ /**
4465
+ * Get a dice sticker set.
4466
+ *
4467
+ * @method ss
4468
+ * @param emoji The emoji of the dice.
4469
+ */
4470
+ async getDiceStickerSet(emoji) {
4471
+ return await this.#stickerSetManager.getDiceStickerSet(emoji);
4472
+ }
4473
+ /**
4474
+ * Get a sticker set.
4475
+ *
4476
+ * @method ss
4477
+ * @param slug The slug of the sticker set or its link.
4478
+ */
4479
+ async getStickerSet(slug) {
4480
+ return await this.#stickerSetManager.getStickerSet(slug);
4364
4481
  }
4365
4482
  /**
4366
4483
  * Remove a sticker from its set.
@@ -4392,57 +4509,57 @@ export class Client extends Composer {
4392
4509
  return await this.#stickerSetManager.replaceStickerInStickerSet(currentStickerFileId, newSticker, params);
4393
4510
  }
4394
4511
  /**
4395
- * Delete a sticker set.
4512
+ * Set a custom emoji as a sticker set's thumbnail.
4396
4513
  *
4397
4514
  * @method ss
4398
4515
  * @param slug The slug of the sticker set or its link.
4516
+ * @param customEmojiId The identifier of the custom emoji to use as thumbnail.
4399
4517
  */
4400
- async deleteStickerSet(slug) {
4401
- return await this.#stickerSetManager.deleteStickerSet(slug);
4518
+ async setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId) {
4519
+ return await this.#stickerSetManager.setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId);
4402
4520
  }
4403
4521
  /**
4404
- * Set the title of a sticker set.
4522
+ * Set a sticker set's thumbnail.
4405
4523
  *
4406
4524
  * @method ss
4407
4525
  * @param slug The slug of the sticker set or its link.
4408
- * @param title The sticker set's new title.
4409
- */
4410
- async setStickerSetTitle(slug, title) {
4411
- return await this.#stickerSetManager.setStickerSetTitle(slug, title);
4412
- }
4413
- /**
4414
- * Change the position of a sticker in its set.
4415
- *
4416
- * @method ss
4417
- * @param fileId The identifier of the sticker.
4418
- * @param position The new position of the sticker.
4526
+ * @param thumbnail The new thumbnail of the sticker set.
4419
4527
  */
4420
- async changeStickerPositionInStickerSet(fileId, position) {
4421
- return await this.#stickerSetManager.changeStickerPositionInStickerSet(fileId, position);
4528
+ async setStickerSetThumbnail(slug, thumbnail) {
4529
+ return await this.#stickerSetManager.setStickerSetThumbnail(slug, thumbnail);
4422
4530
  }
4423
4531
  /**
4424
- * Set a sticker set's thumbnail.
4532
+ * Set the title of a sticker set.
4425
4533
  *
4426
4534
  * @method ss
4427
4535
  * @param slug The slug of the sticker set or its link.
4428
- * @param thumbnail The new thumbnail of the sticker set.
4536
+ * @param title The sticker set's new title.
4429
4537
  */
4430
- async setStickerSetThumbnail(slug, thumbnail) {
4431
- return await this.#stickerSetManager.setStickerSetThumbnail(slug, thumbnail);
4538
+ async setStickerSetTitle(slug, title) {
4539
+ return await this.#stickerSetManager.setStickerSetTitle(slug, title);
4432
4540
  }
4433
4541
  /**
4434
- * Set a custom emoji as a sticker set's thumbnail.
4542
+ * Suggest a sticker set slug from its title.
4435
4543
  *
4436
4544
  * @method ss
4437
- * @param slug The slug of the sticker set or its link.
4438
- * @param customEmojiId The identifier of the custom emoji to use as thumbnail.
4545
+ * @param title A title of a sticker set.
4546
+ * @returns The suggested slug.
4439
4547
  */
4440
- async setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId) {
4441
- return await this.#stickerSetManager.setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId);
4548
+ async suggestStickerSetSlug(title) {
4549
+ return await this.#stickerSetManager.suggestStickerSetSlug(title);
4442
4550
  }
4443
4551
  //
4444
4552
  // ========================= MANAGED BOTS ========================= //
4445
4553
  //
4554
+ /**
4555
+ * Set the access settings of a managed bot. Bot-only.
4556
+ *
4557
+ * @method mb
4558
+ * @param userId The identifier of the bot user.
4559
+ */
4560
+ async getManagedBotAccessSettings(userId) {
4561
+ return await this.#managedBotManager.getManagedBotAccessSettings(userId);
4562
+ }
4446
4563
  /**
4447
4564
  * Get the token of a managed bot. Bot-only.
4448
4565
  *
@@ -4473,15 +4590,6 @@ export class Client extends Composer {
4473
4590
  async setManagedBotAccessSettings(userId, isAccessRestricted, params) {
4474
4591
  return await this.#managedBotManager.setManagedBotAccessSettings(userId, isAccessRestricted, params);
4475
4592
  }
4476
- /**
4477
- * Set the access settings of a managed bot. Bot-only.
4478
- *
4479
- * @method mb
4480
- * @param userId The identifier of the bot user.
4481
- */
4482
- async getManagedBotAccessSettings(userId) {
4483
- return await this.#managedBotManager.getManagedBotAccessSettings(userId);
4484
- }
4485
4593
  //
4486
4594
  // ========================= GUEST QUERIES ========================= //
4487
4595
  //
@@ -4498,15 +4606,6 @@ export class Client extends Composer {
4498
4606
  //
4499
4607
  // ========================= SECRET CHATS ========================= //
4500
4608
  //
4501
- /**
4502
- * Request a secret chat. User-only.
4503
- *
4504
- * @method sc
4505
- * @param chatId The identifier of a chat.
4506
- */
4507
- async requestSecretChat(chatId) {
4508
- return await this.#secretChatManager.requestSecretChat(chatId);
4509
- }
4510
4609
  /**
4511
4610
  * Accept a secret chat. User-only.
4512
4611
  *
@@ -4526,38 +4625,43 @@ export class Client extends Composer {
4526
4625
  return await this.#secretChatManager.endSecretChat(id, params);
4527
4626
  }
4528
4627
  /**
4529
- * Send a message to a secret chat. User-only.
4628
+ * Request a secret chat. User-only.
4629
+ *
4630
+ * @method sc
4631
+ * @param chatId The identifier of a chat.
4632
+ */
4633
+ async requestSecretChat(chatId) {
4634
+ return await this.#secretChatManager.requestSecretChat(chatId);
4635
+ }
4636
+ /**
4637
+ * Send an animation to a secret chat. User-only.
4530
4638
  *
4531
4639
  * @method sc
4532
4640
  * @param id The identifier of the secret chat.
4533
- * @param text The message's text.
4641
+ * @param animation The animation to send.
4534
4642
  */
4535
- async sendSecretMessage(id, text, params) {
4536
- return await this.#secretChatManager.sendSecretMessage(id, text, params);
4643
+ async sendSecretAnimation(id, animation, params) {
4644
+ return await this.#secretChatManager.sendSecretAnimation(id, animation, params);
4537
4645
  }
4538
4646
  /**
4539
- * Send a location to a secret chat. User-only.
4647
+ * Send an audio file to a secret chat. User-only.
4540
4648
  *
4541
4649
  * @method sc
4542
4650
  * @param id The identifier of the secret chat.
4543
- * @param latitude The location's latitude.
4544
- * @param longitude The location's longitude.
4651
+ * @param audio The audio file to send.
4545
4652
  */
4546
- async sendSecretLocation(id, latitude, longitude, params) {
4547
- return await this.#secretChatManager.sendSecretLocation(id, latitude, longitude, params);
4653
+ async sendSecretAudio(id, audio, params) {
4654
+ return await this.#secretChatManager.sendSecretAudio(id, audio, params);
4548
4655
  }
4549
4656
  /**
4550
- * Send a venue to a secret chat. User-only.
4657
+ * Send a secret chat action. User-only.
4551
4658
  *
4552
4659
  * @method sc
4553
4660
  * @param id The identifier of the secret chat.
4554
- * @param latitude The latitude of the venue.
4555
- * @param longitude The longitude of the venue.
4556
- * @param title The title of the venue.
4557
- * @param address The written address of the venue.
4661
+ * @param action The type of action to send.
4558
4662
  */
4559
- async sendSecretVenue(id, latitude, longitude, title, address, params) {
4560
- return await this.#secretChatManager.sendSecretVenue(id, latitude, longitude, title, address, params);
4663
+ async sendSecretChatAction(id, action) {
4664
+ return await this.#secretChatManager.sendSecretChatAction(id, action);
4561
4665
  }
4562
4666
  /**
4563
4667
  * Send a contact to a secret chat. User-only.
@@ -4580,6 +4684,27 @@ export class Client extends Composer {
4580
4684
  async sendSecretDocument(id, document, params) {
4581
4685
  return await this.#secretChatManager.sendSecretDocument(id, document, params);
4582
4686
  }
4687
+ /**
4688
+ * Send a location to a secret chat. User-only.
4689
+ *
4690
+ * @method sc
4691
+ * @param id The identifier of the secret chat.
4692
+ * @param latitude The location's latitude.
4693
+ * @param longitude The location's longitude.
4694
+ */
4695
+ async sendSecretLocation(id, latitude, longitude, params) {
4696
+ return await this.#secretChatManager.sendSecretLocation(id, latitude, longitude, params);
4697
+ }
4698
+ /**
4699
+ * Send a message to a secret chat. User-only.
4700
+ *
4701
+ * @method sc
4702
+ * @param id The identifier of the secret chat.
4703
+ * @param text The message's text.
4704
+ */
4705
+ async sendSecretMessage(id, text, params) {
4706
+ return await this.#secretChatManager.sendSecretMessage(id, text, params);
4707
+ }
4583
4708
  /**
4584
4709
  * Send a photo to a secret chat. User-only.
4585
4710
  *
@@ -4591,63 +4716,66 @@ export class Client extends Composer {
4591
4716
  return await this.#secretChatManager.sendSecretPhoto(id, photo, params);
4592
4717
  }
4593
4718
  /**
4594
- * Send a video to a secret chat. User-only.
4719
+ * Send a secret chat screenshot notification. User-only.
4595
4720
  *
4596
4721
  * @method sc
4597
4722
  * @param id The identifier of the secret chat.
4598
- * @param video The video to send.
4723
+ * @param messageIds Identifiers of messages.
4599
4724
  */
4600
- async sendSecretVideo(id, video, params) {
4601
- return await this.#secretChatManager.sendSecretVideo(id, video, params);
4725
+ async sendSecretScreenshotNotification(id, messageIds) {
4726
+ return await this.#secretChatManager.sendSecretScreenshotNotification(id, messageIds);
4602
4727
  }
4603
4728
  /**
4604
- * Send a video note to a secret chat. User-only.
4729
+ * Send a sticker to a secret chat. User-only.
4605
4730
  *
4606
4731
  * @method sc
4607
4732
  * @param id The identifier of the secret chat.
4608
- * @param videoNote The video note to send.
4733
+ * @param sticker The sticker to send.
4609
4734
  */
4610
- async sendSecretVideoNote(id, videoNote, params) {
4611
- return await this.#secretChatManager.sendSecretVideoNote(id, videoNote, params);
4735
+ async sendSecretSticker(id, sticker, params) {
4736
+ return await this.#secretChatManager.sendSecretSticker(id, sticker, params);
4612
4737
  }
4613
4738
  /**
4614
- * Send an animation to a secret chat. User-only.
4739
+ * Send a venue to a secret chat. User-only.
4615
4740
  *
4616
4741
  * @method sc
4617
4742
  * @param id The identifier of the secret chat.
4618
- * @param animation The animation to send.
4743
+ * @param latitude The latitude of the venue.
4744
+ * @param longitude The longitude of the venue.
4745
+ * @param title The title of the venue.
4746
+ * @param address The written address of the venue.
4619
4747
  */
4620
- async sendSecretAnimation(id, animation, params) {
4621
- return await this.#secretChatManager.sendSecretAnimation(id, animation, params);
4748
+ async sendSecretVenue(id, latitude, longitude, title, address, params) {
4749
+ return await this.#secretChatManager.sendSecretVenue(id, latitude, longitude, title, address, params);
4622
4750
  }
4623
4751
  /**
4624
- * Send an audio file to a secret chat. User-only.
4752
+ * Send a video to a secret chat. User-only.
4625
4753
  *
4626
4754
  * @method sc
4627
4755
  * @param id The identifier of the secret chat.
4628
- * @param audio The audio file to send.
4756
+ * @param video The video to send.
4629
4757
  */
4630
- async sendSecretAudio(id, audio, params) {
4631
- return await this.#secretChatManager.sendSecretAudio(id, audio, params);
4758
+ async sendSecretVideo(id, video, params) {
4759
+ return await this.#secretChatManager.sendSecretVideo(id, video, params);
4632
4760
  }
4633
4761
  /**
4634
- * Send a voice message to a secret chat. User-only.
4762
+ * Send a video note to a secret chat. User-only.
4635
4763
  *
4636
4764
  * @method sc
4637
4765
  * @param id The identifier of the secret chat.
4638
- * @param voice The voice message to send.
4766
+ * @param videoNote The video note to send.
4639
4767
  */
4640
- async sendSecretVoice(id, voice, params) {
4641
- return await this.#secretChatManager.sendSecretVoice(id, voice, params);
4768
+ async sendSecretVideoNote(id, videoNote, params) {
4769
+ return await this.#secretChatManager.sendSecretVideoNote(id, videoNote, params);
4642
4770
  }
4643
4771
  /**
4644
- * Send a sticker to a secret chat. User-only.
4772
+ * Send a voice message to a secret chat. User-only.
4645
4773
  *
4646
4774
  * @method sc
4647
4775
  * @param id The identifier of the secret chat.
4648
- * @param sticker The sticker to send.
4776
+ * @param voice The voice message to send.
4649
4777
  */
4650
- async sendSecretSticker(id, sticker, params) {
4651
- return await this.#secretChatManager.sendSecretSticker(id, sticker, params);
4778
+ async sendSecretVoice(id, voice, params) {
4779
+ return await this.#secretChatManager.sendSecretVoice(id, voice, params);
4652
4780
  }
4653
4781
  }