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