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