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