@mtkruto/node 0.190.0 → 0.192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/3_types.d.ts +6 -2
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +6 -2
- package/esm/client/0_params.d.ts +10 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +1168 -1075
- 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 +4 -1
- package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
- package/esm/client/3_secret_chat_manager.js +31 -0
- package/esm/client/4_context.d.ts +12 -2
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +25 -0
- package/esm/client/4_forum_manager.d.ts +4 -1
- package/esm/client/4_forum_manager.d.ts.map +1 -1
- package/esm/client/4_forum_manager.js +33 -1
- package/esm/client/6_client.d.ts +1166 -1075
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +1528 -1413
- package/esm/client/6_client_dispatcher.d.ts +1168 -1075
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +1502 -1391
- package/esm/types/0_report_reason.d.ts +1 -0
- package/esm/types/0_report_reason.d.ts.map +1 -1
- 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/0_story_report_option.d.ts +3 -0
- package/esm/types/0_story_report_option.d.ts.map +1 -1
- 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_story_report_result.d.ts +17 -3
- package/esm/types/1_story_report_result.d.ts.map +1 -1
- package/esm/types/2_secret_message.d.ts +1 -0
- package/esm/types/2_secret_message.d.ts.map +1 -1
- package/esm/types/3_bot_access_settings.d.ts +3 -0
- package/esm/types/3_bot_access_settings.d.ts.map +1 -1
- package/esm/types/3_connected_website.d.ts +45 -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 +2 -1
- package/esm/types/3_poll_voter_list.d.ts.map +1 -1
- package/esm/types/3_text_to_translate.d.ts +3 -0
- package/esm/types/3_text_to_translate.d.ts.map +1 -1
- package/esm/types/3_translated_text.d.ts +3 -0
- package/esm/types/3_translated_text.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/A_topic.d.ts +20 -3
- package/esm/types/A_topic.d.ts.map +1 -1
- package/esm/types/A_topic.js +37 -0
- package/esm/types/B_topic_list_item.d.ts +7 -0
- package/esm/types/B_topic_list_item.d.ts.map +1 -0
- package/esm/types/B_topic_list_item.js +1 -0
- package/esm/types/B_update.d.ts +16 -1
- package/esm/types/B_update.d.ts.map +1 -1
- package/esm/types/C_topic_list.d.ts +14 -0
- package/esm/types/C_topic_list.d.ts.map +1 -0
- package/esm/types/C_topic_list.js +9 -0
- package/package.json +1 -1
- package/script/3_types.d.ts +6 -2
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +6 -2
- package/script/client/0_params.d.ts +10 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +1168 -1075
- 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 +4 -1
- package/script/client/3_secret_chat_manager.d.ts.map +1 -1
- package/script/client/3_secret_chat_manager.js +31 -0
- package/script/client/4_context.d.ts +12 -2
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +25 -0
- package/script/client/4_forum_manager.d.ts +4 -1
- package/script/client/4_forum_manager.d.ts.map +1 -1
- package/script/client/4_forum_manager.js +32 -0
- package/script/client/6_client.d.ts +1166 -1075
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +1528 -1413
- package/script/client/6_client_dispatcher.d.ts +1168 -1075
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +1502 -1391
- package/script/types/0_report_reason.d.ts +1 -0
- package/script/types/0_report_reason.d.ts.map +1 -1
- 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/0_story_report_option.d.ts +3 -0
- package/script/types/0_story_report_option.d.ts.map +1 -1
- 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_story_report_result.d.ts +17 -3
- package/script/types/1_story_report_result.d.ts.map +1 -1
- package/script/types/2_secret_message.d.ts +1 -0
- package/script/types/2_secret_message.d.ts.map +1 -1
- package/script/types/3_bot_access_settings.d.ts +3 -0
- package/script/types/3_bot_access_settings.d.ts.map +1 -1
- package/script/types/3_connected_website.d.ts +45 -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 +2 -1
- package/script/types/3_poll_voter_list.d.ts.map +1 -1
- package/script/types/3_text_to_translate.d.ts +3 -0
- package/script/types/3_text_to_translate.d.ts.map +1 -1
- package/script/types/3_translated_text.d.ts +3 -0
- package/script/types/3_translated_text.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/A_topic.d.ts +20 -3
- package/script/types/A_topic.d.ts.map +1 -1
- package/script/types/A_topic.js +38 -0
- package/script/types/B_topic_list_item.d.ts +7 -0
- package/script/types/B_topic_list_item.d.ts.map +1 -0
- package/script/types/B_topic_list_item.js +2 -0
- package/script/types/B_update.d.ts +16 -1
- package/script/types/B_update.d.ts.map +1 -1
- package/script/types/C_topic_list.d.ts +14 -0
- package/script/types/C_topic_list.d.ts.map +1 -0
- package/script/types/C_topic_list.js +12 -0
|
@@ -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.
|
|
1123
1084
|
*
|
|
1124
1085
|
* @method ms
|
|
1125
|
-
* @param chatId The identifier of
|
|
1126
|
-
* @param
|
|
1127
|
-
* @example ```ts
|
|
1128
|
-
* const message = await client.getMessage("@MTKruto", 212);
|
|
1129
|
-
* ```
|
|
1130
|
-
* @returns The retrieved message.
|
|
1131
|
-
* @cache
|
|
1086
|
+
* @param chatId The identifier of the chat including the messages.
|
|
1087
|
+
* @param messageIds The identifiers of the messages.
|
|
1132
1088
|
*/
|
|
1133
|
-
async
|
|
1134
|
-
return await this.#dispatch("
|
|
1089
|
+
async getMessagesCounters(chatId, messageIds) {
|
|
1090
|
+
return await this.#dispatch("getMessagesCounters", chatId, messageIds);
|
|
1135
1091
|
}
|
|
1136
1092
|
/**
|
|
1137
|
-
*
|
|
1093
|
+
* Get a message's viewers. User-only.
|
|
1138
1094
|
*
|
|
1139
1095
|
* @method ms
|
|
1140
|
-
* @param
|
|
1141
|
-
* @
|
|
1142
|
-
*
|
|
1143
|
-
* ```
|
|
1144
|
-
* @returns The message that was linked to.
|
|
1096
|
+
* @param chatId The identifier of a chat.
|
|
1097
|
+
* @param messageId The identifier of the message.
|
|
1098
|
+
* @returns The message's viewers.
|
|
1145
1099
|
*/
|
|
1146
|
-
async
|
|
1147
|
-
return await this.#dispatch("
|
|
1100
|
+
async getMessageViewers(chatId, messageId) {
|
|
1101
|
+
return await this.#dispatch("getMessageViewers", chatId, messageId);
|
|
1148
1102
|
}
|
|
1149
1103
|
/**
|
|
1150
|
-
*
|
|
1104
|
+
* Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
|
|
1151
1105
|
*
|
|
1152
1106
|
* @method ms
|
|
1153
|
-
* @
|
|
1154
|
-
* @param messageIds The identifiers of the messages to delete.
|
|
1107
|
+
* @cache
|
|
1155
1108
|
*/
|
|
1156
|
-
async
|
|
1157
|
-
return await this.#dispatch("
|
|
1109
|
+
async getProgressId() {
|
|
1110
|
+
return await this.#dispatch("getProgressId");
|
|
1158
1111
|
}
|
|
1159
1112
|
/**
|
|
1160
|
-
*
|
|
1113
|
+
* Get recent stickers. User-only.
|
|
1161
1114
|
*
|
|
1162
1115
|
* @method ms
|
|
1163
|
-
* @param chatId The identifier of the chat which the message belongs to.
|
|
1164
|
-
* @param messageId The identifier of the message to delete.
|
|
1165
1116
|
*/
|
|
1166
|
-
async
|
|
1167
|
-
return await this.#dispatch("
|
|
1117
|
+
async getRecentStickers() {
|
|
1118
|
+
return await this.#dispatch("getRecentStickers");
|
|
1168
1119
|
}
|
|
1169
1120
|
/**
|
|
1170
|
-
*
|
|
1121
|
+
* Get a message's full rich text. User-only.
|
|
1171
1122
|
*
|
|
1172
1123
|
* @method ms
|
|
1173
|
-
* @param chatId The identifier of
|
|
1174
|
-
* @param
|
|
1124
|
+
* @param chatId The identifier of the chat including the message.
|
|
1125
|
+
* @param messageId The identifier of the message.
|
|
1175
1126
|
*/
|
|
1176
|
-
async
|
|
1177
|
-
return await this.#dispatch("
|
|
1127
|
+
async getRichText(chatId, messageId) {
|
|
1128
|
+
return await this.#dispatch("getRichText", chatId, messageId);
|
|
1178
1129
|
}
|
|
1179
1130
|
/**
|
|
1180
|
-
*
|
|
1131
|
+
* Get saved animations. User-only.
|
|
1181
1132
|
*
|
|
1182
1133
|
* @method ms
|
|
1183
|
-
* @param chatId The identifier of a chat.
|
|
1184
|
-
* @param messageIds The identifiers of the scheduled messages to delete.
|
|
1185
1134
|
*/
|
|
1186
|
-
async
|
|
1187
|
-
return await this.#dispatch("
|
|
1135
|
+
async getSavedAnimations() {
|
|
1136
|
+
return await this.#dispatch("getSavedAnimations");
|
|
1188
1137
|
}
|
|
1189
1138
|
/**
|
|
1190
|
-
*
|
|
1139
|
+
* Get a list of saved chats.
|
|
1191
1140
|
*
|
|
1192
1141
|
* @method ms
|
|
1193
|
-
* @param chatId The identifier of a chat.
|
|
1194
|
-
* @param messageId The identifier of the scheduled message to delete.
|
|
1195
1142
|
*/
|
|
1196
|
-
async
|
|
1197
|
-
return await this.#dispatch("
|
|
1143
|
+
async getSavedChats(params) {
|
|
1144
|
+
return await this.#dispatch("getSavedChats", params);
|
|
1198
1145
|
}
|
|
1199
1146
|
/**
|
|
1200
|
-
*
|
|
1147
|
+
* Get messages saved from a specific chat.
|
|
1201
1148
|
*
|
|
1202
1149
|
* @method ms
|
|
1203
1150
|
* @param chatId The identifier of a chat.
|
|
1204
|
-
* @param messageIds The identifiers of the scheduled messages to send.
|
|
1205
1151
|
*/
|
|
1206
|
-
async
|
|
1207
|
-
return await this.#dispatch("
|
|
1152
|
+
async getSavedMessages(chatId, params) {
|
|
1153
|
+
return await this.#dispatch("getSavedMessages", chatId, params);
|
|
1208
1154
|
}
|
|
1209
1155
|
/**
|
|
1210
|
-
*
|
|
1156
|
+
* Get the scheduled messages of a chat. User-only.
|
|
1211
1157
|
*
|
|
1212
1158
|
* @method ms
|
|
1213
|
-
* @param chatId The identifier of
|
|
1214
|
-
* @param messageId The identifier of the scheduled message to send.
|
|
1159
|
+
* @param chatId The identifier of the chat including the scheduled messages.
|
|
1215
1160
|
*/
|
|
1216
|
-
async
|
|
1217
|
-
return await this.#dispatch("
|
|
1161
|
+
async getScheduledMessages(chatId) {
|
|
1162
|
+
return await this.#dispatch("getScheduledMessages", chatId);
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Open a mini app. User-only.
|
|
1166
|
+
*
|
|
1167
|
+
* @method ms
|
|
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
|
|
1171
|
+
*/
|
|
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.
|
|
1357
1355
|
*/
|
|
1358
|
-
async
|
|
1359
|
-
return await this.#dispatch("
|
|
1356
|
+
async sendLocation(chatId, latitude, longitude, params) {
|
|
1357
|
+
return await this.#dispatch("sendLocation", chatId, latitude, longitude, params);
|
|
1360
1358
|
}
|
|
1361
1359
|
/**
|
|
1362
|
-
*
|
|
1360
|
+
* Send a media group.
|
|
1363
1361
|
*
|
|
1364
1362
|
* @method ms
|
|
1365
|
-
* @param chatId The identifier of a chat.
|
|
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.
|
|
1366
1366
|
*/
|
|
1367
|
-
async
|
|
1368
|
-
return await this.#dispatch("
|
|
1367
|
+
async sendMediaGroup(chatId, media, params) {
|
|
1368
|
+
return await this.#dispatch("sendMediaGroup", chatId, media, params);
|
|
1369
1369
|
}
|
|
1370
1370
|
/**
|
|
1371
|
-
*
|
|
1371
|
+
* Send a text message.
|
|
1372
1372
|
*
|
|
1373
1373
|
* @method ms
|
|
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.
|
|
1374
1377
|
*/
|
|
1375
|
-
async
|
|
1376
|
-
return await this.#dispatch("
|
|
1378
|
+
async sendMessage(chatId, text, params) {
|
|
1379
|
+
return await this.#dispatch("sendMessage", chatId, text, params);
|
|
1377
1380
|
}
|
|
1378
1381
|
/**
|
|
1379
|
-
*
|
|
1382
|
+
* Stream a drafted text message. Bot-only.
|
|
1380
1383
|
*
|
|
1381
1384
|
* @method ms
|
|
1382
|
-
* @param chatId The identifier of a chat.
|
|
1383
|
-
* @param
|
|
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.
|
|
1384
1388
|
*/
|
|
1385
|
-
async
|
|
1386
|
-
return await this.#dispatch("
|
|
1389
|
+
async sendMessageDraft(chatId, draftId, text, params) {
|
|
1390
|
+
return await this.#dispatch("sendMessageDraft", chatId, draftId, text, params);
|
|
1387
1391
|
}
|
|
1388
1392
|
/**
|
|
1389
|
-
*
|
|
1393
|
+
* Send a photo.
|
|
1394
|
+
*
|
|
1395
|
+
* @method ms
|
|
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.
|
|
1399
|
+
*/
|
|
1400
|
+
async sendPhoto(chatId, photo, params) {
|
|
1401
|
+
return await this.#dispatch("sendPhoto", chatId, photo, params);
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
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,63 +1644,53 @@ 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
1652
|
*/
|
|
1609
|
-
async
|
|
1610
|
-
return await this.#dispatch("
|
|
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
|
-
*/
|
|
1644
|
-
async
|
|
1645
|
-
return await this.#dispatch("
|
|
1646
|
-
}
|
|
1647
|
-
/**
|
|
1648
|
-
* Add an option to a poll. User-only.
|
|
1649
|
-
*
|
|
1650
|
-
* @param chatId The identifier of the chat that includes the poll.
|
|
1651
|
-
* @param messageId The identifier of the message that includes the poll.
|
|
1652
|
-
* @param option The option to add.
|
|
1653
|
-
*/
|
|
1654
|
-
async addPollOption(chatId, messageId, option) {
|
|
1655
|
-
return await this.#dispatch("addPollOption", chatId, messageId, option);
|
|
1686
|
+
*/
|
|
1687
|
+
async getPollVoters(chatId, messageId, params) {
|
|
1688
|
+
return await this.#dispatch("getPollVoters", chatId, messageId, params);
|
|
1656
1689
|
}
|
|
1657
1690
|
/**
|
|
1658
1691
|
* Remove an option from a poll. User-only.
|
|
1659
1692
|
*
|
|
1693
|
+
* @method pl
|
|
1660
1694
|
* @param chatId The identifier of the chat that includes the poll.
|
|
1661
1695
|
* @param messageId The identifier of the message that includes the poll.
|
|
1662
1696
|
* @param optionIndex The index of the option to remove.
|
|
@@ -1665,14 +1699,25 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
1665
1699
|
return await this.#dispatch("removePollOption", chatId, messageId, optionIndex);
|
|
1666
1700
|
}
|
|
1667
1701
|
/**
|
|
1668
|
-
*
|
|
1702
|
+
* Retract a vote. User-only.
|
|
1669
1703
|
*
|
|
1670
1704
|
* @method pl
|
|
1671
1705
|
* @param chatId The identifier of the chat that includes the poll.
|
|
1672
1706
|
* @param messageId The identifier of the message that includes the poll.
|
|
1673
1707
|
*/
|
|
1674
|
-
async
|
|
1675
|
-
return await this.#dispatch("
|
|
1708
|
+
async retractVote(chatId, messageId) {
|
|
1709
|
+
return await this.#dispatch("retractVote", chatId, messageId);
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* Cast a vote. User-only.
|
|
1713
|
+
*
|
|
1714
|
+
* @method pl
|
|
1715
|
+
* @param chatId The identifier of the chat that includes the poll.
|
|
1716
|
+
* @param messageId The identifier of the message that includes the poll.
|
|
1717
|
+
* @param optionIndexes The indexes of the options to cast for.
|
|
1718
|
+
*/
|
|
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,807 +1846,854 @@ 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.
|
|
1968
|
+
*
|
|
1969
|
+
* @method ch
|
|
1970
|
+
* @param title The title of the supergroup.
|
|
1971
|
+
* @returns The created supergroup.
|
|
1972
|
+
*/
|
|
1973
|
+
async createSupergroup(title, params) {
|
|
1974
|
+
return await this.#dispatch("createSupergroup", title, params);
|
|
1975
|
+
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Create a forum topic.
|
|
1909
1978
|
*
|
|
1910
1979
|
* @method ch
|
|
1911
1980
|
* @param chatId The identifier of a chat.
|
|
1912
|
-
* @
|
|
1981
|
+
* @param title The title of the topic.
|
|
1982
|
+
* @returns The created topic.
|
|
1913
1983
|
*/
|
|
1914
|
-
async
|
|
1915
|
-
return await this.#dispatch("
|
|
1984
|
+
async createTopic(chatId, title, params) {
|
|
1985
|
+
return await this.#dispatch("createTopic", chatId, title, params);
|
|
1916
1986
|
}
|
|
1917
1987
|
/**
|
|
1918
|
-
*
|
|
1988
|
+
* Decline a join request.
|
|
1919
1989
|
*
|
|
1920
1990
|
* @method ch
|
|
1921
|
-
* @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.
|
|
1922
1993
|
*/
|
|
1923
|
-
async
|
|
1924
|
-
return await this.#dispatch("
|
|
1994
|
+
async declineJoinRequest(chatId, userId) {
|
|
1995
|
+
return await this.#dispatch("declineJoinRequest", chatId, userId);
|
|
1925
1996
|
}
|
|
1926
1997
|
/**
|
|
1927
|
-
*
|
|
1998
|
+
* Decline all join requests. User-only.
|
|
1928
1999
|
*
|
|
1929
2000
|
* @method ch
|
|
1930
|
-
* @param chatId The identifier of a chat
|
|
2001
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
1931
2002
|
*/
|
|
1932
|
-
async
|
|
1933
|
-
return await this.#dispatch("
|
|
2003
|
+
async declineJoinRequests(chatId, params) {
|
|
2004
|
+
return await this.#dispatch("declineJoinRequests", chatId, params);
|
|
1934
2005
|
}
|
|
1935
2006
|
/**
|
|
1936
|
-
*
|
|
2007
|
+
* Delete a chat. User-only.
|
|
1937
2008
|
*
|
|
1938
2009
|
* @method ch
|
|
1939
|
-
* @
|
|
2010
|
+
* @param chatId The identifier of a chat.
|
|
1940
2011
|
*/
|
|
1941
|
-
async
|
|
1942
|
-
return await this.#dispatch("
|
|
2012
|
+
async deleteChat(chatId) {
|
|
2013
|
+
return await this.#dispatch("deleteChat", chatId);
|
|
2014
|
+
}
|
|
2015
|
+
/**
|
|
2016
|
+
* Delete a chat's photo.
|
|
2017
|
+
*
|
|
2018
|
+
* @method ch
|
|
2019
|
+
* @param chatId The identifier of a chat.
|
|
2020
|
+
*/
|
|
2021
|
+
async deleteChatPhoto(chatId) {
|
|
2022
|
+
return await this.#dispatch("deleteChatPhoto", chatId);
|
|
2023
|
+
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Delete a chat's sticker set.
|
|
2026
|
+
*
|
|
2027
|
+
* @method ch
|
|
2028
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2029
|
+
*/
|
|
2030
|
+
async deleteChatStickerSet(chatId) {
|
|
2031
|
+
return await this.#dispatch("deleteChatStickerSet", chatId);
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
* Disable automatic anti-spam in a group. User-only.
|
|
2035
|
+
*
|
|
2036
|
+
* @method ch
|
|
2037
|
+
* @param chatId The identifier of the group.
|
|
2038
|
+
*/
|
|
2039
|
+
async disableAntispam(chatId) {
|
|
2040
|
+
return await this.#dispatch("disableAntispam", chatId);
|
|
1943
2041
|
}
|
|
1944
2042
|
/**
|
|
1945
|
-
*
|
|
2043
|
+
* Disable business bots in a private chat. User-only.
|
|
1946
2044
|
*
|
|
1947
2045
|
* @method ch
|
|
1948
|
-
* @param chatId The identifier of
|
|
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.
|
|
2046
|
+
* @param chatId The identifier of the private chat to disable business bots in.
|
|
1950
2047
|
*/
|
|
1951
|
-
async
|
|
1952
|
-
return await this.#dispatch("
|
|
2048
|
+
async disableBusinessBots(chatId) {
|
|
2049
|
+
return await this.#dispatch("disableBusinessBots", chatId);
|
|
1953
2050
|
}
|
|
1954
2051
|
/**
|
|
1955
|
-
*
|
|
2052
|
+
* Disable chat history for new members. User-only.
|
|
1956
2053
|
*
|
|
1957
2054
|
* @method ch
|
|
1958
2055
|
* @param chatId The identifier of a chat.
|
|
1959
2056
|
*/
|
|
1960
|
-
async
|
|
1961
|
-
return await this.#dispatch("
|
|
2057
|
+
async disableChatHistoryForNewMembers(chatId) {
|
|
2058
|
+
return await this.#dispatch("disableChatHistoryForNewMembers", chatId);
|
|
1962
2059
|
}
|
|
1963
2060
|
/**
|
|
1964
|
-
*
|
|
2061
|
+
* Disable join requests in a chat. User-only.
|
|
1965
2062
|
*
|
|
1966
2063
|
* @method ch
|
|
1967
|
-
* @param chatId The identifier of a chat.
|
|
2064
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
1968
2065
|
*/
|
|
1969
|
-
async
|
|
1970
|
-
return await this.#dispatch("
|
|
2066
|
+
async disableJoinRequests(chatId) {
|
|
2067
|
+
return await this.#dispatch("disableJoinRequests", chatId);
|
|
1971
2068
|
}
|
|
1972
2069
|
/**
|
|
1973
|
-
*
|
|
2070
|
+
* Disable sharing in a chat. User-only.
|
|
1974
2071
|
*
|
|
1975
2072
|
* @method ch
|
|
1976
2073
|
* @param chatId The identifier of a chat.
|
|
1977
|
-
* @param userId The identifier of the user.
|
|
1978
2074
|
*/
|
|
1979
|
-
async
|
|
1980
|
-
return await this.#dispatch("
|
|
2075
|
+
async disableSharing(chatId) {
|
|
2076
|
+
return await this.#dispatch("disableSharing", chatId);
|
|
1981
2077
|
}
|
|
1982
2078
|
/**
|
|
1983
|
-
*
|
|
2079
|
+
* Disable post signatures in a channel. User-only.
|
|
1984
2080
|
*
|
|
1985
2081
|
* @method ch
|
|
1986
|
-
* @param chatId The identifier of
|
|
2082
|
+
* @param chatId The identifier of the channel.
|
|
1987
2083
|
*/
|
|
1988
|
-
async
|
|
1989
|
-
return await this.#dispatch("
|
|
2084
|
+
async disableSignatures(chatId) {
|
|
2085
|
+
return await this.#dispatch("disableSignatures", chatId);
|
|
1990
2086
|
}
|
|
1991
2087
|
/**
|
|
1992
|
-
*
|
|
2088
|
+
* Disable slow mode in a group. User-only.
|
|
1993
2089
|
*
|
|
1994
2090
|
* @method ch
|
|
1995
|
-
* @param chatId The identifier of
|
|
1996
|
-
* @param setName The name of the set.
|
|
2091
|
+
* @param chatId The identifier of the group to disable slow mode in.
|
|
1997
2092
|
*/
|
|
1998
|
-
async
|
|
1999
|
-
return await this.#dispatch("
|
|
2093
|
+
async disableSlowMode(chatId) {
|
|
2094
|
+
return await this.#dispatch("disableSlowMode", chatId);
|
|
2000
2095
|
}
|
|
2001
2096
|
/**
|
|
2002
|
-
*
|
|
2097
|
+
* Disable topics in a group. User-only.
|
|
2003
2098
|
*
|
|
2004
2099
|
* @method ch
|
|
2005
|
-
* @param chatId The identifier of
|
|
2100
|
+
* @param chatId The identifier of the group.
|
|
2006
2101
|
*/
|
|
2007
|
-
async
|
|
2008
|
-
return await this.#dispatch("
|
|
2102
|
+
async disableTopics(chatId) {
|
|
2103
|
+
return await this.#dispatch("disableTopics", chatId);
|
|
2009
2104
|
}
|
|
2010
2105
|
/**
|
|
2011
|
-
*
|
|
2106
|
+
* Edit a forum topic.
|
|
2012
2107
|
*
|
|
2013
2108
|
* @method ch
|
|
2014
2109
|
* @param chatId The identifier of a chat.
|
|
2015
|
-
* @param
|
|
2110
|
+
* @param topicId The identifier of the topic.
|
|
2111
|
+
* @param title The new title of the topic.
|
|
2112
|
+
* @returns The new topic.
|
|
2016
2113
|
*/
|
|
2017
|
-
async
|
|
2018
|
-
return await this.#dispatch("
|
|
2114
|
+
async editTopic(chatId, topicId, title, params) {
|
|
2115
|
+
return await this.#dispatch("editTopic", chatId, topicId, title, params);
|
|
2019
2116
|
}
|
|
2020
2117
|
/**
|
|
2021
|
-
*
|
|
2118
|
+
* Enable automatic anti-spam in a group. User-only.
|
|
2022
2119
|
*
|
|
2023
2120
|
* @method ch
|
|
2024
|
-
* @param chatId The identifier of
|
|
2025
|
-
* @returns The newly created invite link.
|
|
2121
|
+
* @param chatId The identifier of the group.
|
|
2026
2122
|
*/
|
|
2027
|
-
async
|
|
2028
|
-
return await this.#dispatch("
|
|
2123
|
+
async enableAntispam(chatId) {
|
|
2124
|
+
return await this.#dispatch("enableAntispam", chatId);
|
|
2029
2125
|
}
|
|
2030
2126
|
/**
|
|
2031
|
-
*
|
|
2127
|
+
* Enable business bots in a private chat. User-only.
|
|
2032
2128
|
*
|
|
2033
2129
|
* @method ch
|
|
2034
|
-
* @param chatId The identifier of
|
|
2035
|
-
* @param userId The user who made the join request.
|
|
2130
|
+
* @param chatId The identifier of the private chat to enable business bots in.
|
|
2036
2131
|
*/
|
|
2037
|
-
async
|
|
2038
|
-
return await this.#dispatch("
|
|
2132
|
+
async enableBusinessBots(chatId) {
|
|
2133
|
+
return await this.#dispatch("enableBusinessBots", chatId);
|
|
2039
2134
|
}
|
|
2040
2135
|
/**
|
|
2041
|
-
*
|
|
2136
|
+
* Enable chat history for new members. User-only.
|
|
2042
2137
|
*
|
|
2043
2138
|
* @method ch
|
|
2044
|
-
* @param chatId The identifier of a chat
|
|
2045
|
-
* @param userId The user who made the join request.
|
|
2139
|
+
* @param chatId The identifier of a chat.
|
|
2046
2140
|
*/
|
|
2047
|
-
async
|
|
2048
|
-
return await this.#dispatch("
|
|
2141
|
+
async enableChatHistoryForNewMembers(chatId) {
|
|
2142
|
+
return await this.#dispatch("enableChatHistoryForNewMembers", chatId);
|
|
2049
2143
|
}
|
|
2050
2144
|
/**
|
|
2051
|
-
*
|
|
2145
|
+
* Enable join requests in a chat. User-only.
|
|
2052
2146
|
*
|
|
2053
2147
|
* @method ch
|
|
2054
|
-
* @param chatId The identifier of a chat
|
|
2148
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
2055
2149
|
*/
|
|
2056
|
-
async
|
|
2057
|
-
return await this.#dispatch("
|
|
2150
|
+
async enableJoinRequests(chatId) {
|
|
2151
|
+
return await this.#dispatch("enableJoinRequests", chatId);
|
|
2058
2152
|
}
|
|
2059
2153
|
/**
|
|
2060
|
-
*
|
|
2154
|
+
* Enable sharing in a chat. User-only.
|
|
2061
2155
|
*
|
|
2062
2156
|
* @method ch
|
|
2063
|
-
* @param chatId The identifier of a chat
|
|
2157
|
+
* @param chatId The identifier of a chat.
|
|
2064
2158
|
*/
|
|
2065
|
-
async
|
|
2066
|
-
return await this.#dispatch("
|
|
2159
|
+
async enableSharing(chatId) {
|
|
2160
|
+
return await this.#dispatch("enableSharing", chatId);
|
|
2067
2161
|
}
|
|
2068
2162
|
/**
|
|
2069
|
-
*
|
|
2163
|
+
* Enable post signatures in a channel. User-only.
|
|
2070
2164
|
*
|
|
2071
2165
|
* @method ch
|
|
2072
|
-
* @param chatId The identifier of
|
|
2166
|
+
* @param chatId The identifier of the channel.
|
|
2073
2167
|
*/
|
|
2074
|
-
async
|
|
2075
|
-
return await this.#dispatch("
|
|
2168
|
+
async enableSignatures(chatId, params) {
|
|
2169
|
+
return await this.#dispatch("enableSignatures", chatId, params);
|
|
2076
2170
|
}
|
|
2077
2171
|
/**
|
|
2078
|
-
*
|
|
2172
|
+
* Enable topics in a group. User-only.
|
|
2079
2173
|
*
|
|
2080
2174
|
* @method ch
|
|
2081
|
-
* @param chatId The identifier of
|
|
2082
|
-
* @param
|
|
2083
|
-
* @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
|
|
2175
|
+
* @param chatId The identifier of the group.
|
|
2176
|
+
* @param isShownAsTabs Whether topics should be displayed as tabs.
|
|
2084
2177
|
*/
|
|
2085
|
-
async
|
|
2086
|
-
return await this.#dispatch("
|
|
2178
|
+
async enableTopics(chatId, isShownAsTabs) {
|
|
2179
|
+
return await this.#dispatch("enableTopics", chatId, isShownAsTabs);
|
|
2087
2180
|
}
|
|
2088
2181
|
/**
|
|
2089
|
-
*
|
|
2182
|
+
* Get a chat.
|
|
2090
2183
|
*
|
|
2091
2184
|
* @method ch
|
|
2092
|
-
* @
|
|
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.
|
|
2185
|
+
* @cache
|
|
2095
2186
|
*/
|
|
2096
|
-
async
|
|
2097
|
-
return await this.#dispatch("
|
|
2187
|
+
async getChat(chatId) {
|
|
2188
|
+
return await this.#dispatch("getChat", chatId);
|
|
2098
2189
|
}
|
|
2099
2190
|
/**
|
|
2100
|
-
*
|
|
2191
|
+
* Get the administrators of a chat.
|
|
2101
2192
|
*
|
|
2102
2193
|
* @method ch
|
|
2103
|
-
* @param chatId The identifier of a chat
|
|
2194
|
+
* @param chatId The identifier of a chat.
|
|
2195
|
+
* @returns The chat's administrators.
|
|
2104
2196
|
*/
|
|
2105
|
-
async
|
|
2106
|
-
return await this.#dispatch("
|
|
2197
|
+
async getChatAdministrators(chatId) {
|
|
2198
|
+
return await this.#dispatch("getChatAdministrators", chatId);
|
|
2107
2199
|
}
|
|
2108
2200
|
/**
|
|
2109
|
-
*
|
|
2201
|
+
* Get information on a user's chat membership.
|
|
2110
2202
|
*
|
|
2111
2203
|
* @method ch
|
|
2112
|
-
* @param chatId The identifier of a chat
|
|
2204
|
+
* @param chatId The identifier of a chat.
|
|
2205
|
+
* @param userId The identifier of the user.
|
|
2113
2206
|
*/
|
|
2114
|
-
async
|
|
2115
|
-
return await this.#dispatch("
|
|
2207
|
+
async getChatMember(chatId, userId) {
|
|
2208
|
+
return await this.#dispatch("getChatMember", chatId, userId);
|
|
2116
2209
|
}
|
|
2117
2210
|
/**
|
|
2118
|
-
*
|
|
2211
|
+
* Get the members of a chat.
|
|
2119
2212
|
*
|
|
2120
2213
|
* @method ch
|
|
2121
|
-
* @param
|
|
2122
|
-
* @returns The created group.
|
|
2214
|
+
* @param chatId The identifier of a chat.
|
|
2123
2215
|
*/
|
|
2124
|
-
async
|
|
2125
|
-
return await this.#dispatch("
|
|
2216
|
+
async getChatMembers(chatId, params) {
|
|
2217
|
+
return await this.#dispatch("getChatMembers", chatId, params);
|
|
2126
2218
|
}
|
|
2127
2219
|
/**
|
|
2128
|
-
*
|
|
2220
|
+
* Get a partial chat.
|
|
2129
2221
|
*
|
|
2130
2222
|
* @method ch
|
|
2131
|
-
* @
|
|
2132
|
-
* @returns The created supergroup.
|
|
2223
|
+
* @cache
|
|
2133
2224
|
*/
|
|
2134
|
-
async
|
|
2135
|
-
return await this.#dispatch("
|
|
2225
|
+
async getChatP(chatId) {
|
|
2226
|
+
return await this.#dispatch("getChatP", chatId);
|
|
2136
2227
|
}
|
|
2137
2228
|
/**
|
|
2138
|
-
*
|
|
2229
|
+
* Get chats from a chat list. User-only.
|
|
2139
2230
|
*
|
|
2140
2231
|
* @method ch
|
|
2141
|
-
* @param title The title of the channel.
|
|
2142
|
-
* @returns The created channel.
|
|
2143
2232
|
*/
|
|
2144
|
-
async
|
|
2145
|
-
return await this.#dispatch("
|
|
2233
|
+
async getChats(params) {
|
|
2234
|
+
return await this.#dispatch("getChats", params);
|
|
2146
2235
|
}
|
|
2147
2236
|
/**
|
|
2148
|
-
*
|
|
2237
|
+
* Get the settings of a chat. User-only.
|
|
2149
2238
|
*
|
|
2150
2239
|
* @method ch
|
|
2151
2240
|
* @param chatId The identifier of a chat.
|
|
2152
|
-
* @param messageTtl The time to live of the messages in seconds.
|
|
2153
2241
|
*/
|
|
2154
|
-
async
|
|
2155
|
-
return await this.#dispatch("
|
|
2242
|
+
async getChatSettings(chatId) {
|
|
2243
|
+
return await this.#dispatch("getChatSettings", chatId);
|
|
2156
2244
|
}
|
|
2157
2245
|
/**
|
|
2158
|
-
*
|
|
2246
|
+
* Get common chats between a user and the current one. User-only.
|
|
2159
2247
|
*
|
|
2160
2248
|
* @method ch
|
|
2161
|
-
* @param
|
|
2249
|
+
* @param userId The identifier of the user to get the common chats with them.
|
|
2162
2250
|
*/
|
|
2163
|
-
async
|
|
2164
|
-
return await this.#dispatch("
|
|
2251
|
+
async getCommonChats(userId, params) {
|
|
2252
|
+
return await this.#dispatch("getCommonChats", userId, params);
|
|
2165
2253
|
}
|
|
2166
2254
|
/**
|
|
2167
|
-
*
|
|
2255
|
+
* Get the invite links created for a chat. User-only.
|
|
2168
2256
|
*
|
|
2169
2257
|
* @method ch
|
|
2170
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.
|
|
2171
2260
|
*/
|
|
2172
|
-
async
|
|
2173
|
-
return await this.#dispatch("
|
|
2261
|
+
async getCreatedInviteLinks(chatId, params) {
|
|
2262
|
+
return await this.#dispatch("getCreatedInviteLinks", chatId, params);
|
|
2174
2263
|
}
|
|
2175
2264
|
/**
|
|
2176
|
-
*
|
|
2265
|
+
* Get discussion chat suggestions. User-only.
|
|
2177
2266
|
*
|
|
2178
2267
|
* @method ch
|
|
2179
|
-
* @param chatIds The identifiers of the chats to unarchive.
|
|
2180
2268
|
*/
|
|
2181
|
-
async
|
|
2182
|
-
return await this.#dispatch("
|
|
2269
|
+
async getDiscussionChatSuggestions() {
|
|
2270
|
+
return await this.#dispatch("getDiscussionChatSuggestions");
|
|
2183
2271
|
}
|
|
2184
2272
|
/**
|
|
2185
|
-
*
|
|
2273
|
+
* Get chat history. User-only.
|
|
2186
2274
|
*
|
|
2187
2275
|
* @method ch
|
|
2188
2276
|
* @param chatId The identifier of a chat.
|
|
2189
2277
|
*/
|
|
2190
|
-
async
|
|
2191
|
-
return await this.#dispatch("
|
|
2278
|
+
async getHistory(chatId, params) {
|
|
2279
|
+
return await this.#dispatch("getHistory", chatId, params);
|
|
2192
2280
|
}
|
|
2193
2281
|
/**
|
|
2194
|
-
* Get
|
|
2282
|
+
* Get inactive chats. User-only.
|
|
2195
2283
|
*
|
|
2196
2284
|
* @method ch
|
|
2197
|
-
* @
|
|
2285
|
+
* @returns A list of inactive chats the current user is a member of.
|
|
2198
2286
|
*/
|
|
2199
|
-
async
|
|
2200
|
-
return await this.#dispatch("
|
|
2287
|
+
async getInactiveChats() {
|
|
2288
|
+
return await this.#dispatch("getInactiveChats");
|
|
2201
2289
|
}
|
|
2202
2290
|
/**
|
|
2203
|
-
* Get
|
|
2291
|
+
* Get pending join requests in a chat. User-only.
|
|
2204
2292
|
*
|
|
2205
2293
|
* @method ch
|
|
2206
|
-
* @param chatId The identifier of a chat.
|
|
2294
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
2207
2295
|
*/
|
|
2208
|
-
async
|
|
2209
|
-
return await this.#dispatch("
|
|
2296
|
+
async getJoinRequests(chatId, params) {
|
|
2297
|
+
return await this.#dispatch("getJoinRequests", chatId, params);
|
|
2210
2298
|
}
|
|
2211
2299
|
/**
|
|
2212
|
-
*
|
|
2300
|
+
* Get the count of online members in a chat. User-only.
|
|
2213
2301
|
*
|
|
2214
2302
|
* @method ch
|
|
2215
|
-
* @param chatId The identifier of
|
|
2303
|
+
* @param chatId The identifier of a chat.
|
|
2304
|
+
* @returns The count of online members in the chat.
|
|
2216
2305
|
*/
|
|
2217
|
-
async
|
|
2218
|
-
return await this.#dispatch("
|
|
2306
|
+
async getOnlineCount(chatId) {
|
|
2307
|
+
return await this.#dispatch("getOnlineCount", chatId);
|
|
2219
2308
|
}
|
|
2220
2309
|
/**
|
|
2221
|
-
*
|
|
2310
|
+
* Get pinned chats from a chat list. User-only.
|
|
2222
2311
|
*
|
|
2223
2312
|
* @method ch
|
|
2224
|
-
* @param
|
|
2313
|
+
* @param from The chat list to get the pinned chats from. Defaults to main.
|
|
2225
2314
|
*/
|
|
2226
|
-
async
|
|
2227
|
-
return await this.#dispatch("
|
|
2315
|
+
async getPinnedChats(from) {
|
|
2316
|
+
return await this.#dispatch("getPinnedChats", from);
|
|
2228
2317
|
}
|
|
2229
2318
|
/**
|
|
2230
|
-
*
|
|
2319
|
+
* Get recommended channels. User-only.
|
|
2231
2320
|
*
|
|
2232
2321
|
* @method ch
|
|
2233
|
-
* @
|
|
2322
|
+
* @returns A list of recommended channels.
|
|
2234
2323
|
*/
|
|
2235
|
-
async
|
|
2236
|
-
return await this.#dispatch("
|
|
2324
|
+
async getRecommendedChannels() {
|
|
2325
|
+
return await this.#dispatch("getRecommendedChannels");
|
|
2237
2326
|
}
|
|
2238
2327
|
/**
|
|
2239
|
-
*
|
|
2328
|
+
* Get similar bots. User-only.
|
|
2240
2329
|
*
|
|
2241
2330
|
* @method ch
|
|
2242
|
-
* @param chatId The identifier of
|
|
2243
|
-
* @
|
|
2331
|
+
* @param chatId The identifier of a bot to get similar bots for.
|
|
2332
|
+
* @returns A list of similar bots.
|
|
2244
2333
|
*/
|
|
2245
|
-
async
|
|
2246
|
-
return await this.#dispatch("
|
|
2334
|
+
async getSimilarBots(chatId) {
|
|
2335
|
+
return await this.#dispatch("getSimilarBots", chatId);
|
|
2247
2336
|
}
|
|
2248
2337
|
/**
|
|
2249
|
-
*
|
|
2338
|
+
* Get similar channels. User-only.
|
|
2250
2339
|
*
|
|
2251
2340
|
* @method ch
|
|
2252
|
-
* @param chatId The identifier of a
|
|
2253
|
-
* @
|
|
2341
|
+
* @param chatId The identifier of a channel to get similar channels for.
|
|
2342
|
+
* @returns A list of similar channels.
|
|
2254
2343
|
*/
|
|
2255
|
-
async
|
|
2256
|
-
return await this.#dispatch("
|
|
2344
|
+
async getSimilarChannels(chatId) {
|
|
2345
|
+
return await this.#dispatch("getSimilarChannels", chatId);
|
|
2257
2346
|
}
|
|
2258
2347
|
/**
|
|
2259
|
-
*
|
|
2348
|
+
* Get a topic of a forum chat by its identifier. User-only.
|
|
2260
2349
|
*
|
|
2261
2350
|
* @method ch
|
|
2262
|
-
* @param chatId The identifier of
|
|
2263
|
-
* @param
|
|
2351
|
+
* @param chatId The identifier of the chat.
|
|
2352
|
+
* @param topicId The identifier of the topic.
|
|
2264
2353
|
*/
|
|
2265
|
-
async
|
|
2266
|
-
return await this.#dispatch("
|
|
2354
|
+
async getTopic(chatId, topicId) {
|
|
2355
|
+
return await this.#dispatch("getTopic", chatId, topicId);
|
|
2267
2356
|
}
|
|
2268
2357
|
/**
|
|
2269
|
-
*
|
|
2358
|
+
* Get the topics of a forum chat. User-only.
|
|
2270
2359
|
*
|
|
2271
2360
|
* @method ch
|
|
2272
|
-
* @param chatId The identifier of the
|
|
2361
|
+
* @param chatId The identifier of the chat.
|
|
2273
2362
|
*/
|
|
2274
|
-
async
|
|
2275
|
-
return await this.#dispatch("
|
|
2363
|
+
async getTopics(chatId, params) {
|
|
2364
|
+
return await this.#dispatch("getTopics", chatId, params);
|
|
2276
2365
|
}
|
|
2277
2366
|
/**
|
|
2278
|
-
*
|
|
2367
|
+
* Get topics of a forum chat by their identifiers. User-only.
|
|
2279
2368
|
*
|
|
2280
2369
|
* @method ch
|
|
2281
|
-
* @param chatId The identifier of the
|
|
2370
|
+
* @param chatId The identifier of the chat.
|
|
2371
|
+
* @param topicIds The identifiers of the topics.
|
|
2282
2372
|
*/
|
|
2283
|
-
async
|
|
2284
|
-
return await this.#dispatch("
|
|
2373
|
+
async getTopicsById(chatId, topicIds) {
|
|
2374
|
+
return await this.#dispatch("getTopicsById", chatId, topicIds);
|
|
2285
2375
|
}
|
|
2286
2376
|
/**
|
|
2287
|
-
*
|
|
2377
|
+
* Hide the general forum topic.
|
|
2288
2378
|
*
|
|
2289
2379
|
* @method ch
|
|
2290
|
-
* @param chatId The identifier of
|
|
2291
|
-
* @param isShownAsTabs Whether topics should be displayed as tabs.
|
|
2380
|
+
* @param chatId The identifier of a chat.
|
|
2292
2381
|
*/
|
|
2293
|
-
async
|
|
2294
|
-
return await this.#dispatch("
|
|
2382
|
+
async hideGeneralTopic(chatId) {
|
|
2383
|
+
return await this.#dispatch("hideGeneralTopic", chatId);
|
|
2295
2384
|
}
|
|
2296
2385
|
/**
|
|
2297
|
-
*
|
|
2386
|
+
* Hide the member list of a group to non-admins. User-only.
|
|
2298
2387
|
*
|
|
2299
2388
|
* @method ch
|
|
2300
2389
|
* @param chatId The identifier of the group.
|
|
2301
2390
|
*/
|
|
2302
|
-
async
|
|
2303
|
-
return await this.#dispatch("
|
|
2391
|
+
async hideMemberList(chatId) {
|
|
2392
|
+
return await this.#dispatch("hideMemberList", chatId);
|
|
2304
2393
|
}
|
|
2305
2394
|
/**
|
|
2306
|
-
*
|
|
2395
|
+
* Join a chat. User-only.
|
|
2307
2396
|
*
|
|
2308
2397
|
* @method ch
|
|
2309
|
-
* @param chatId The identifier of
|
|
2398
|
+
* @param chatId The identifier of a chat.
|
|
2310
2399
|
*/
|
|
2311
|
-
async
|
|
2312
|
-
return await this.#dispatch("
|
|
2400
|
+
async joinChat(chatId) {
|
|
2401
|
+
return await this.#dispatch("joinChat", chatId);
|
|
2313
2402
|
}
|
|
2314
2403
|
/**
|
|
2315
|
-
*
|
|
2404
|
+
* Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
|
|
2316
2405
|
*
|
|
2317
2406
|
* @method ch
|
|
2318
|
-
* @param chatId The identifier of
|
|
2407
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2408
|
+
* @param memberId The identifier of the member.
|
|
2319
2409
|
*/
|
|
2320
|
-
async
|
|
2321
|
-
return await this.#dispatch("
|
|
2410
|
+
async kickChatMember(chatId, memberId) {
|
|
2411
|
+
return await this.#dispatch("kickChatMember", chatId, memberId);
|
|
2322
2412
|
}
|
|
2323
2413
|
/**
|
|
2324
|
-
*
|
|
2414
|
+
* Leave a chat.
|
|
2325
2415
|
*
|
|
2326
2416
|
* @method ch
|
|
2327
|
-
* @param chatId The identifier of
|
|
2417
|
+
* @param chatId The identifier of a chat.
|
|
2328
2418
|
*/
|
|
2329
|
-
async
|
|
2330
|
-
return await this.#dispatch("
|
|
2419
|
+
async leaveChat(chatId) {
|
|
2420
|
+
return await this.#dispatch("leaveChat", chatId);
|
|
2331
2421
|
}
|
|
2332
2422
|
/**
|
|
2333
|
-
*
|
|
2423
|
+
* Mark all mentions in a chat as read. User-only.
|
|
2334
2424
|
*
|
|
2335
2425
|
* @method ch
|
|
2336
|
-
* @param chatId The identifier of the
|
|
2426
|
+
* @param chatId The identifier of the chat.
|
|
2337
2427
|
*/
|
|
2338
|
-
async
|
|
2339
|
-
return await this.#dispatch("
|
|
2428
|
+
async markAllMentionsAsRead(chatId, params) {
|
|
2429
|
+
return await this.#dispatch("markAllMentionsAsRead", chatId, params);
|
|
2340
2430
|
}
|
|
2341
2431
|
/**
|
|
2342
|
-
*
|
|
2432
|
+
* Mark a chat as read. User-only.
|
|
2343
2433
|
*
|
|
2344
2434
|
* @method ch
|
|
2345
2435
|
* @param chatId The identifier of a chat.
|
|
2346
2436
|
*/
|
|
2347
|
-
async
|
|
2348
|
-
return await this.#dispatch("
|
|
2437
|
+
async markChatAsRead(chatId) {
|
|
2438
|
+
return await this.#dispatch("markChatAsRead", chatId);
|
|
2349
2439
|
}
|
|
2350
2440
|
/**
|
|
2351
|
-
*
|
|
2441
|
+
* Mark a chat as unread. User-only.
|
|
2352
2442
|
*
|
|
2353
2443
|
* @method ch
|
|
2444
|
+
* @param chatId The identifier of a chat.
|
|
2354
2445
|
*/
|
|
2355
|
-
async
|
|
2356
|
-
return await this.#dispatch("
|
|
2446
|
+
async markChatAsUnread(chatId) {
|
|
2447
|
+
return await this.#dispatch("markChatAsUnread", chatId);
|
|
2357
2448
|
}
|
|
2358
2449
|
/**
|
|
2359
|
-
*
|
|
2450
|
+
* Open a chat.
|
|
2360
2451
|
*
|
|
2361
2452
|
* @method ch
|
|
2362
|
-
* @param chatId The identifier of a
|
|
2363
|
-
* @param discussionChatId The identifier of a chat to use as discussion for the channel.
|
|
2453
|
+
* @param chatId The identifier of a chat to open.
|
|
2364
2454
|
*/
|
|
2365
|
-
async
|
|
2366
|
-
return await this.#dispatch("
|
|
2455
|
+
async openChat(chatId, params) {
|
|
2456
|
+
return await this.#dispatch("openChat", chatId, params);
|
|
2367
2457
|
}
|
|
2368
2458
|
/**
|
|
2369
|
-
*
|
|
2459
|
+
* Pin a forum topic.
|
|
2370
2460
|
*
|
|
2371
2461
|
* @method ch
|
|
2372
2462
|
* @param chatId The identifier of a chat.
|
|
2373
|
-
* @param
|
|
2374
|
-
* @param password The password of the current account.
|
|
2463
|
+
* @param topicId The identifier of the topic.
|
|
2375
2464
|
*/
|
|
2376
|
-
async
|
|
2377
|
-
return await this.#dispatch("
|
|
2465
|
+
async pinTopic(chatId, topicId) {
|
|
2466
|
+
return await this.#dispatch("pinTopic", chatId, topicId);
|
|
2378
2467
|
}
|
|
2379
2468
|
/**
|
|
2380
|
-
*
|
|
2469
|
+
* Promote a chat member.
|
|
2381
2470
|
*
|
|
2382
2471
|
* @method ch
|
|
2383
2472
|
* @param chatId The identifier of a chat.
|
|
2384
|
-
* @param
|
|
2385
|
-
* @returns The created topic.
|
|
2473
|
+
* @param userId The identifier of the user to promote.
|
|
2386
2474
|
*/
|
|
2387
|
-
async
|
|
2388
|
-
return await this.#dispatch("
|
|
2475
|
+
async promoteChatMember(chatId, userId, params) {
|
|
2476
|
+
return await this.#dispatch("promoteChatMember", chatId, userId, params);
|
|
2389
2477
|
}
|
|
2390
2478
|
/**
|
|
2391
|
-
*
|
|
2479
|
+
* Reopen a forum topic.
|
|
2392
2480
|
*
|
|
2393
2481
|
* @method ch
|
|
2394
2482
|
* @param chatId The identifier of a chat.
|
|
2395
2483
|
* @param topicId The identifier of the topic.
|
|
2396
|
-
* @param title The new title of the topic.
|
|
2397
|
-
* @returns The new topic.
|
|
2398
2484
|
*/
|
|
2399
|
-
async
|
|
2400
|
-
return await this.#dispatch("
|
|
2485
|
+
async reopenTopic(chatId, topicId) {
|
|
2486
|
+
return await this.#dispatch("reopenTopic", chatId, topicId);
|
|
2401
2487
|
}
|
|
2402
2488
|
/**
|
|
2403
|
-
*
|
|
2489
|
+
* Report a chat. User-only.
|
|
2404
2490
|
*
|
|
2405
2491
|
* @method ch
|
|
2406
|
-
* @param chatId The identifier of a chat.
|
|
2492
|
+
* @param chatId The identifier of a chat to report.
|
|
2493
|
+
* @param reason The reason of the report.
|
|
2407
2494
|
*/
|
|
2408
|
-
async
|
|
2409
|
-
return await this.#dispatch("
|
|
2495
|
+
async reportChat(chatId, reason, params) {
|
|
2496
|
+
return await this.#dispatch("reportChat", chatId, reason, params);
|
|
2410
2497
|
}
|
|
2411
2498
|
/**
|
|
2412
|
-
*
|
|
2499
|
+
* Set a chat's available reactions. User-only.
|
|
2413
2500
|
*
|
|
2414
2501
|
* @method ch
|
|
2415
2502
|
* @param chatId The identifier of a chat.
|
|
2503
|
+
* @param availableReactions The new available reactions.
|
|
2416
2504
|
*/
|
|
2417
|
-
async
|
|
2418
|
-
return await this.#dispatch("
|
|
2505
|
+
async setAvailableReactions(chatId, availableReactions) {
|
|
2506
|
+
return await this.#dispatch("setAvailableReactions", chatId, availableReactions);
|
|
2419
2507
|
}
|
|
2420
2508
|
/**
|
|
2421
|
-
*
|
|
2509
|
+
* Set the number of boosts required to circumvent a chat's default restrictions. User-only.
|
|
2422
2510
|
*
|
|
2423
2511
|
* @method ch
|
|
2424
2512
|
* @param chatId The identifier of a chat.
|
|
2425
|
-
* @param
|
|
2513
|
+
* @param boosts The number of boosts required to circumvent its restrictions.
|
|
2426
2514
|
*/
|
|
2427
|
-
async
|
|
2428
|
-
return await this.#dispatch("
|
|
2515
|
+
async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
|
|
2516
|
+
return await this.#dispatch("setBoostsRequiredToCircumventRestrictions", chatId, boosts);
|
|
2429
2517
|
}
|
|
2430
2518
|
/**
|
|
2431
|
-
*
|
|
2519
|
+
* Change the description of a chat.
|
|
2432
2520
|
*
|
|
2433
2521
|
* @method ch
|
|
2434
2522
|
* @param chatId The identifier of a chat.
|
|
2435
|
-
* @param
|
|
2523
|
+
* @param description The new description.
|
|
2436
2524
|
*/
|
|
2437
|
-
async
|
|
2438
|
-
return await this.#dispatch("
|
|
2525
|
+
async setChatDescription(chatId, description) {
|
|
2526
|
+
return await this.#dispatch("setChatDescription", chatId, description);
|
|
2439
2527
|
}
|
|
2440
2528
|
/**
|
|
2441
|
-
*
|
|
2529
|
+
* Set the rights of a chat member.
|
|
2442
2530
|
*
|
|
2443
2531
|
* @method ch
|
|
2444
|
-
* @param chatId The identifier of a chat.
|
|
2445
|
-
* @param
|
|
2532
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2533
|
+
* @param memberId The identifier of the member.
|
|
2446
2534
|
*/
|
|
2447
|
-
async
|
|
2448
|
-
return await this.#dispatch("
|
|
2535
|
+
async setChatMemberRights(chatId, memberId, params) {
|
|
2536
|
+
return await this.#dispatch("setChatMemberRights", chatId, memberId, params);
|
|
2449
2537
|
}
|
|
2450
2538
|
/**
|
|
2451
|
-
*
|
|
2539
|
+
* Change the tag of a chat member.
|
|
2452
2540
|
*
|
|
2453
2541
|
* @method ch
|
|
2454
2542
|
* @param chatId The identifier of a chat.
|
|
2455
|
-
* @param
|
|
2543
|
+
* @param userId The identifier of the user that is a member of the chat.
|
|
2456
2544
|
*/
|
|
2457
|
-
async
|
|
2458
|
-
return await this.#dispatch("
|
|
2545
|
+
async setChatMemberTag(chatId, userId, params) {
|
|
2546
|
+
return await this.#dispatch("setChatMemberTag", chatId, userId, params);
|
|
2459
2547
|
}
|
|
2460
2548
|
/**
|
|
2461
|
-
*
|
|
2549
|
+
* Set a chat's photo.
|
|
2462
2550
|
*
|
|
2463
2551
|
* @method ch
|
|
2464
2552
|
* @param chatId The identifier of a chat.
|
|
2465
|
-
* @param
|
|
2553
|
+
* @param photo A photo to set as the chat's photo.
|
|
2466
2554
|
*/
|
|
2467
|
-
async
|
|
2468
|
-
return await this.#dispatch("
|
|
2555
|
+
async setChatPhoto(chatId, photo, params) {
|
|
2556
|
+
return await this.#dispatch("setChatPhoto", chatId, photo, params);
|
|
2469
2557
|
}
|
|
2470
2558
|
/**
|
|
2471
|
-
*
|
|
2559
|
+
* Set a chat's sticker set.
|
|
2472
2560
|
*
|
|
2473
2561
|
* @method ch
|
|
2474
|
-
* @param chatId The identifier of a chat.
|
|
2475
|
-
* @param
|
|
2562
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2563
|
+
* @param setName The name of the set.
|
|
2476
2564
|
*/
|
|
2477
|
-
async
|
|
2478
|
-
return await this.#dispatch("
|
|
2565
|
+
async setChatStickerSet(chatId, setName) {
|
|
2566
|
+
return await this.#dispatch("setChatStickerSet", chatId, setName);
|
|
2479
2567
|
}
|
|
2480
2568
|
/**
|
|
2481
|
-
*
|
|
2569
|
+
* Change the title of a chat.
|
|
2482
2570
|
*
|
|
2483
2571
|
* @method ch
|
|
2484
2572
|
* @param chatId The identifier of a chat.
|
|
2573
|
+
* @param title The new title.
|
|
2485
2574
|
*/
|
|
2486
|
-
async
|
|
2487
|
-
return await this.#dispatch("
|
|
2575
|
+
async setChatTitle(chatId, title) {
|
|
2576
|
+
return await this.#dispatch("setChatTitle", chatId, title);
|
|
2488
2577
|
}
|
|
2489
2578
|
/**
|
|
2490
|
-
*
|
|
2579
|
+
* Set the default send as chat of a chat. User-only.
|
|
2491
2580
|
*
|
|
2492
2581
|
* @method ch
|
|
2493
2582
|
* @param chatId The identifier of a chat.
|
|
2583
|
+
* @param sendAs The new default send as chat.
|
|
2494
2584
|
*/
|
|
2495
|
-
async
|
|
2496
|
-
return await this.#dispatch("
|
|
2585
|
+
async setDefaultSendAs(chatId, sendAs) {
|
|
2586
|
+
return await this.#dispatch("setDefaultSendAs", chatId, sendAs);
|
|
2497
2587
|
}
|
|
2498
2588
|
/**
|
|
2499
|
-
*
|
|
2589
|
+
* Set a channel's discussion chat. User-only.
|
|
2500
2590
|
*
|
|
2501
2591
|
* @method ch
|
|
2502
|
-
* @
|
|
2592
|
+
* @param chatId The identifier of a channel.
|
|
2593
|
+
* @param discussionChatId The identifier of a chat to use as discussion for the channel.
|
|
2503
2594
|
*/
|
|
2504
|
-
async
|
|
2505
|
-
return await this.#dispatch("
|
|
2595
|
+
async setDiscussionChat(chatId, discussionChatId) {
|
|
2596
|
+
return await this.#dispatch("setDiscussionChat", chatId, discussionChatId);
|
|
2506
2597
|
}
|
|
2507
2598
|
/**
|
|
2508
|
-
*
|
|
2599
|
+
* Set the time to live of the messages of a chat. User-only.
|
|
2509
2600
|
*
|
|
2510
2601
|
* @method ch
|
|
2511
|
-
* @param chatId The identifier of a
|
|
2512
|
-
* @
|
|
2602
|
+
* @param chatId The identifier of a chat.
|
|
2603
|
+
* @param messageTtl The time to live of the messages in seconds.
|
|
2513
2604
|
*/
|
|
2514
|
-
async
|
|
2515
|
-
return await this.#dispatch("
|
|
2605
|
+
async setMessageTtl(chatId, messageTtl) {
|
|
2606
|
+
return await this.#dispatch("setMessageTtl", chatId, messageTtl);
|
|
2516
2607
|
}
|
|
2517
2608
|
/**
|
|
2518
|
-
*
|
|
2609
|
+
* Change slow mode in a group. User-only.
|
|
2519
2610
|
*
|
|
2520
2611
|
* @method ch
|
|
2521
|
-
* @param chatId The identifier of
|
|
2522
|
-
* @
|
|
2612
|
+
* @param chatId The identifier of the group to change slow mode in.
|
|
2613
|
+
* @param duration New slow mode duration.
|
|
2523
2614
|
*/
|
|
2524
|
-
async
|
|
2525
|
-
return await this.#dispatch("
|
|
2615
|
+
async setSlowMode(chatId, duration) {
|
|
2616
|
+
return await this.#dispatch("setSlowMode", chatId, duration);
|
|
2526
2617
|
}
|
|
2527
2618
|
/**
|
|
2528
|
-
*
|
|
2619
|
+
* Show the general forum topic.
|
|
2529
2620
|
*
|
|
2530
2621
|
* @method ch
|
|
2531
2622
|
* @param chatId The identifier of a chat.
|
|
2532
|
-
* @returns The count of online members in the chat.
|
|
2533
2623
|
*/
|
|
2534
|
-
async
|
|
2535
|
-
return await this.#dispatch("
|
|
2624
|
+
async showGeneralTopic(chatId) {
|
|
2625
|
+
return await this.#dispatch("showGeneralTopic", chatId);
|
|
2536
2626
|
}
|
|
2537
2627
|
/**
|
|
2538
|
-
*
|
|
2628
|
+
* Show the member list of a group to non-admins. User-only.
|
|
2539
2629
|
*
|
|
2540
2630
|
* @method ch
|
|
2541
|
-
* @param chatId The identifier of
|
|
2631
|
+
* @param chatId The identifier of the group.
|
|
2542
2632
|
*/
|
|
2543
|
-
async
|
|
2544
|
-
return await this.#dispatch("
|
|
2633
|
+
async showMemberList(chatId) {
|
|
2634
|
+
return await this.#dispatch("showMemberList", chatId);
|
|
2545
2635
|
}
|
|
2546
2636
|
/**
|
|
2547
|
-
*
|
|
2637
|
+
* Transfer the ownership of a chat. User-only.
|
|
2548
2638
|
*
|
|
2549
2639
|
* @method ch
|
|
2550
2640
|
* @param chatId The identifier of a chat.
|
|
2641
|
+
* @param userId The identifier of the new owner.
|
|
2642
|
+
* @param password The password of the current account.
|
|
2551
2643
|
*/
|
|
2552
|
-
async
|
|
2553
|
-
return await this.#dispatch("
|
|
2644
|
+
async transferChatOwnership(chatId, userId, password) {
|
|
2645
|
+
return await this.#dispatch("transferChatOwnership", chatId, userId, password);
|
|
2554
2646
|
}
|
|
2555
2647
|
/**
|
|
2556
|
-
*
|
|
2648
|
+
* Unarchive a single chat. User-only.
|
|
2557
2649
|
*
|
|
2558
2650
|
* @method ch
|
|
2559
2651
|
* @param chatId The identifier of a chat.
|
|
2560
|
-
* @param sendAs The new default send as chat.
|
|
2561
2652
|
*/
|
|
2562
|
-
async
|
|
2563
|
-
return await this.#dispatch("
|
|
2653
|
+
async unarchiveChat(chatId) {
|
|
2654
|
+
return await this.#dispatch("unarchiveChat", chatId);
|
|
2564
2655
|
}
|
|
2565
2656
|
/**
|
|
2566
|
-
*
|
|
2657
|
+
* Unarchive multiple chats. User-only.
|
|
2567
2658
|
*
|
|
2568
2659
|
* @method ch
|
|
2569
|
-
* @param
|
|
2570
|
-
* @param reason The reason of the report.
|
|
2660
|
+
* @param chatIds The identifiers of the chats to unarchive.
|
|
2571
2661
|
*/
|
|
2572
|
-
async
|
|
2573
|
-
return await this.#dispatch("
|
|
2662
|
+
async unarchiveChats(chatIds) {
|
|
2663
|
+
return await this.#dispatch("unarchiveChats", chatIds);
|
|
2574
2664
|
}
|
|
2575
2665
|
/**
|
|
2576
|
-
*
|
|
2666
|
+
* Unban a member from a chat.
|
|
2577
2667
|
*
|
|
2578
2668
|
* @method ch
|
|
2579
|
-
* @param chatId The identifier of a chat.
|
|
2669
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2670
|
+
* @param memberId The identifier of the member.
|
|
2580
2671
|
*/
|
|
2581
|
-
async
|
|
2582
|
-
return await this.#dispatch("
|
|
2672
|
+
async unbanChatMember(chatId, memberId) {
|
|
2673
|
+
return await this.#dispatch("unbanChatMember", chatId, memberId);
|
|
2583
2674
|
}
|
|
2584
2675
|
/**
|
|
2585
|
-
*
|
|
2676
|
+
* Unpin a forum topic.
|
|
2586
2677
|
*
|
|
2587
2678
|
* @method ch
|
|
2588
2679
|
* @param chatId The identifier of a chat.
|
|
2680
|
+
* @param topicId The identifier of the topic.
|
|
2589
2681
|
*/
|
|
2590
|
-
async
|
|
2591
|
-
return await this.#dispatch("
|
|
2682
|
+
async unpinTopic(chatId, topicId) {
|
|
2683
|
+
return await this.#dispatch("unpinTopic", chatId, topicId);
|
|
2592
2684
|
}
|
|
2685
|
+
//
|
|
2686
|
+
// ========================= CALLBACK QUERIES ========================= //
|
|
2687
|
+
//
|
|
2593
2688
|
/**
|
|
2594
|
-
*
|
|
2689
|
+
* Answer a callback query. Bot-only.
|
|
2595
2690
|
*
|
|
2596
|
-
* @method
|
|
2597
|
-
* @param
|
|
2691
|
+
* @method cq
|
|
2692
|
+
* @param id ID of the callback query to answer.
|
|
2598
2693
|
*/
|
|
2599
|
-
async
|
|
2600
|
-
return await this.#dispatch("
|
|
2694
|
+
async answerCallbackQuery(id, params) {
|
|
2695
|
+
return await this.#dispatch("answerCallbackQuery", id, params);
|
|
2601
2696
|
}
|
|
2602
|
-
//
|
|
2603
|
-
// ========================= CALLBACK QUERIES ========================= //
|
|
2604
|
-
//
|
|
2605
2697
|
/**
|
|
2606
2698
|
* Send a callback query. User-only.
|
|
2607
2699
|
*
|
|
@@ -2615,18 +2707,19 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2615
2707
|
async sendCallbackQuery(botId, messageId, question) {
|
|
2616
2708
|
return await this.#dispatch("sendCallbackQuery", botId, messageId, question);
|
|
2617
2709
|
}
|
|
2710
|
+
//
|
|
2711
|
+
// ========================= INLINE QUERIES ========================= //
|
|
2712
|
+
//
|
|
2618
2713
|
/**
|
|
2619
|
-
* Answer
|
|
2714
|
+
* Answer an inline query. Bot-only.
|
|
2620
2715
|
*
|
|
2621
|
-
* @method
|
|
2622
|
-
* @param id
|
|
2716
|
+
* @method iq
|
|
2717
|
+
* @param id The identifier of the inline query to answer.
|
|
2718
|
+
* @param results The results to answer with.
|
|
2623
2719
|
*/
|
|
2624
|
-
async
|
|
2625
|
-
return await this.#dispatch("
|
|
2720
|
+
async answerInlineQuery(id, results, params) {
|
|
2721
|
+
return await this.#dispatch("answerInlineQuery", id, results, params);
|
|
2626
2722
|
}
|
|
2627
|
-
//
|
|
2628
|
-
// ========================= INLINE QUERIES ========================= //
|
|
2629
|
-
//
|
|
2630
2723
|
/**
|
|
2631
2724
|
* Send an inline query. User-only.
|
|
2632
2725
|
*
|
|
@@ -2639,42 +2732,17 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2639
2732
|
async sendInlineQuery(botId, chatId, params) {
|
|
2640
2733
|
return await this.#dispatch("sendInlineQuery", botId, chatId, params);
|
|
2641
2734
|
}
|
|
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
2735
|
//
|
|
2653
2736
|
// ========================= BOTS ========================= //
|
|
2654
2737
|
//
|
|
2655
2738
|
/**
|
|
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.
|
|
2739
|
+
* Get the bot's commands in the given scope and/or language. Bot-only.
|
|
2673
2740
|
*
|
|
2674
2741
|
* @method bo
|
|
2742
|
+
* @returns The current bot's commands in the specified language.
|
|
2675
2743
|
*/
|
|
2676
|
-
async
|
|
2677
|
-
return await this.#dispatch("
|
|
2744
|
+
async getMyCommands(params) {
|
|
2745
|
+
return await this.#dispatch("getMyCommands", params);
|
|
2678
2746
|
}
|
|
2679
2747
|
/**
|
|
2680
2748
|
* Get the bot's description in the given language. Bot-only.
|
|
@@ -2713,28 +2781,32 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2713
2781
|
return await this.#dispatch("setMyCommands", commands, params);
|
|
2714
2782
|
}
|
|
2715
2783
|
/**
|
|
2716
|
-
*
|
|
2784
|
+
* Set the bot's description in the given language. Bot-only.
|
|
2717
2785
|
*
|
|
2718
2786
|
* @method bo
|
|
2719
|
-
* @returns The current bot's commands in the specified language.
|
|
2720
2787
|
*/
|
|
2721
|
-
async
|
|
2722
|
-
return await this.#dispatch("
|
|
2788
|
+
async setMyDescription(params) {
|
|
2789
|
+
return await this.#dispatch("setMyDescription", params);
|
|
2723
2790
|
}
|
|
2724
|
-
//
|
|
2725
|
-
// ========================= REACTIONS ========================= //
|
|
2726
|
-
//
|
|
2727
2791
|
/**
|
|
2728
|
-
*
|
|
2792
|
+
* Set the bot's name in the given language. Bot-only.
|
|
2729
2793
|
*
|
|
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.
|
|
2794
|
+
* @method bo
|
|
2734
2795
|
*/
|
|
2735
|
-
async
|
|
2736
|
-
return await this.#dispatch("
|
|
2796
|
+
async setMyName(params) {
|
|
2797
|
+
return await this.#dispatch("setMyName", params);
|
|
2737
2798
|
}
|
|
2799
|
+
/**
|
|
2800
|
+
* Set the bot's short description in the given language. Bot-only.
|
|
2801
|
+
*
|
|
2802
|
+
* @method bo
|
|
2803
|
+
*/
|
|
2804
|
+
async setMyShortDescription(params) {
|
|
2805
|
+
return await this.#dispatch("setMyShortDescription", params);
|
|
2806
|
+
}
|
|
2807
|
+
//
|
|
2808
|
+
// ========================= REACTIONS ========================= //
|
|
2809
|
+
//
|
|
2738
2810
|
/**
|
|
2739
2811
|
* Make a reaction to a message.
|
|
2740
2812
|
*
|
|
@@ -2746,6 +2818,14 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2746
2818
|
async addReaction(chatId, messageId, reaction, params) {
|
|
2747
2819
|
return await this.#dispatch("addReaction", chatId, messageId, reaction, params);
|
|
2748
2820
|
}
|
|
2821
|
+
/**
|
|
2822
|
+
* Clear recent reactions. User-only.
|
|
2823
|
+
*
|
|
2824
|
+
* @method re
|
|
2825
|
+
*/
|
|
2826
|
+
async clearRecentReactions() {
|
|
2827
|
+
return await this.#dispatch("clearRecentReactions");
|
|
2828
|
+
}
|
|
2749
2829
|
/**
|
|
2750
2830
|
* Undo a reaction made to a message.
|
|
2751
2831
|
*
|
|
@@ -2779,47 +2859,48 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2779
2859
|
return await this.#dispatch("removeUserReactions", chatId, userId);
|
|
2780
2860
|
}
|
|
2781
2861
|
/**
|
|
2782
|
-
*
|
|
2862
|
+
* Change reactions made to a message.
|
|
2783
2863
|
*
|
|
2784
2864
|
* @method re
|
|
2865
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
2866
|
+
* @param messageId The identifier of the message to add the reaction to.
|
|
2867
|
+
* @param reactions The new reactions.
|
|
2785
2868
|
*/
|
|
2786
|
-
async
|
|
2787
|
-
return await this.#dispatch("
|
|
2869
|
+
async setReactions(chatId, messageId, reactions, params) {
|
|
2870
|
+
return await this.#dispatch("setReactions", chatId, messageId, reactions, params);
|
|
2788
2871
|
}
|
|
2789
2872
|
//
|
|
2790
2873
|
// ========================= STORIES ========================= //
|
|
2791
2874
|
//
|
|
2792
2875
|
/**
|
|
2793
|
-
*
|
|
2876
|
+
* Add multiple stories to highlights. User-only.
|
|
2794
2877
|
*
|
|
2795
2878
|
* @method st
|
|
2796
|
-
* @param
|
|
2797
|
-
* @
|
|
2879
|
+
* @param chatId The identifier of a chat.
|
|
2880
|
+
* @param storyIds The identifiers of the stories to add to highlights.
|
|
2798
2881
|
*/
|
|
2799
|
-
async
|
|
2800
|
-
return await this.#dispatch("
|
|
2882
|
+
async addStoriesToHighlights(chatId, storyIds) {
|
|
2883
|
+
return await this.#dispatch("addStoriesToHighlights", chatId, storyIds);
|
|
2801
2884
|
}
|
|
2802
2885
|
/**
|
|
2803
|
-
*
|
|
2886
|
+
* Add a single story to highlights. User-only.
|
|
2804
2887
|
*
|
|
2805
2888
|
* @method st
|
|
2806
2889
|
* @param chatId The identifier of a chat.
|
|
2807
|
-
* @param
|
|
2808
|
-
* @returns The retrieved stories.
|
|
2890
|
+
* @param storyId The identifier of the story to add to highlights.
|
|
2809
2891
|
*/
|
|
2810
|
-
async
|
|
2811
|
-
return await this.#dispatch("
|
|
2892
|
+
async addStoryToHighlights(chatId, storyId) {
|
|
2893
|
+
return await this.#dispatch("addStoryToHighlights", chatId, storyId);
|
|
2812
2894
|
}
|
|
2813
2895
|
/**
|
|
2814
|
-
*
|
|
2896
|
+
* Create a story. User-only.
|
|
2815
2897
|
*
|
|
2816
2898
|
* @method st
|
|
2817
|
-
* @param
|
|
2818
|
-
* @
|
|
2819
|
-
* @returns The retrieved story.
|
|
2899
|
+
* @param content The content of the story.
|
|
2900
|
+
* @returns The created story.
|
|
2820
2901
|
*/
|
|
2821
|
-
async
|
|
2822
|
-
return await this.#dispatch("
|
|
2902
|
+
async createStory(chatId, content, params) {
|
|
2903
|
+
return await this.#dispatch("createStory", chatId, content, params);
|
|
2823
2904
|
}
|
|
2824
2905
|
/**
|
|
2825
2906
|
* Delete multiple stories. User-only.
|
|
@@ -2842,24 +2923,26 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2842
2923
|
return await this.#dispatch("deleteStory", chatId, storyId);
|
|
2843
2924
|
}
|
|
2844
2925
|
/**
|
|
2845
|
-
*
|
|
2926
|
+
* Retrieve multiple stories. User-only.
|
|
2846
2927
|
*
|
|
2847
2928
|
* @method st
|
|
2848
2929
|
* @param chatId The identifier of a chat.
|
|
2849
|
-
* @param storyIds The identifiers of the stories to
|
|
2930
|
+
* @param storyIds The identifiers of the stories to retrieve.
|
|
2931
|
+
* @returns The retrieved stories.
|
|
2850
2932
|
*/
|
|
2851
|
-
async
|
|
2852
|
-
return await this.#dispatch("
|
|
2933
|
+
async getStories(chatId, storyIds) {
|
|
2934
|
+
return await this.#dispatch("getStories", chatId, storyIds);
|
|
2853
2935
|
}
|
|
2854
2936
|
/**
|
|
2855
|
-
*
|
|
2937
|
+
* Retrieve a single story. User-only.
|
|
2856
2938
|
*
|
|
2857
2939
|
* @method st
|
|
2858
2940
|
* @param chatId The identifier of a chat.
|
|
2859
|
-
* @param storyId The identifier of the story to
|
|
2941
|
+
* @param storyId The identifier of the story to retrieve.
|
|
2942
|
+
* @returns The retrieved story.
|
|
2860
2943
|
*/
|
|
2861
|
-
async
|
|
2862
|
-
return await this.#dispatch("
|
|
2944
|
+
async getStory(chatId, storyId) {
|
|
2945
|
+
return await this.#dispatch("getStory", chatId, storyId);
|
|
2863
2946
|
}
|
|
2864
2947
|
/**
|
|
2865
2948
|
* Remove multiple stories from highlights. User-only.
|
|
@@ -2881,6 +2964,16 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2881
2964
|
async removeStoryFromHighlights(chatId, storyId) {
|
|
2882
2965
|
return await this.#dispatch("removeStoryFromHighlights", chatId, storyId);
|
|
2883
2966
|
}
|
|
2967
|
+
/**
|
|
2968
|
+
* Report multiple stories. User-only.
|
|
2969
|
+
*
|
|
2970
|
+
* @method st
|
|
2971
|
+
* @param chatId The identifier of a chat that posted the stories.
|
|
2972
|
+
* @param storyIds The identifiers of the stories to report.
|
|
2973
|
+
*/
|
|
2974
|
+
async reportStories(chatId, storyIds, params) {
|
|
2975
|
+
return await this.#dispatch("reportStories", chatId, storyIds, params);
|
|
2976
|
+
}
|
|
2884
2977
|
/**
|
|
2885
2978
|
* Report a single story. User-only.
|
|
2886
2979
|
*
|
|
@@ -2891,19 +2984,31 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2891
2984
|
async reportStory(chatId, storyId, params) {
|
|
2892
2985
|
return await this.#dispatch("reportStory", chatId, storyId, params);
|
|
2893
2986
|
}
|
|
2987
|
+
//
|
|
2988
|
+
// ========================= STORY ALBUMS ========================= //
|
|
2989
|
+
//
|
|
2894
2990
|
/**
|
|
2895
|
-
*
|
|
2991
|
+
* Add multiple stories to an album. User-only.
|
|
2896
2992
|
*
|
|
2897
|
-
* @method
|
|
2898
|
-
* @param chatId The identifier of
|
|
2899
|
-
* @param
|
|
2993
|
+
* @method sa
|
|
2994
|
+
* @param chatId The identifier of the chat including the album.
|
|
2995
|
+
* @param albumId The identifier of an album.
|
|
2996
|
+
* @param storyIds The identifiers of the stories to add.
|
|
2900
2997
|
*/
|
|
2901
|
-
async
|
|
2902
|
-
return await this.#dispatch("
|
|
2998
|
+
async addStoriesToAlbum(chatId, albumId, storyIds) {
|
|
2999
|
+
return await this.#dispatch("addStoriesToAlbum", chatId, albumId, storyIds);
|
|
3000
|
+
}
|
|
3001
|
+
/**
|
|
3002
|
+
* Add a single story to an album. User-only.
|
|
3003
|
+
*
|
|
3004
|
+
* @method sa
|
|
3005
|
+
* @param chatId The identifier of the chat including the album.
|
|
3006
|
+
* @param albumId The identifier of an album.
|
|
3007
|
+
* @param storyId The identifier of the story to add.
|
|
3008
|
+
*/
|
|
3009
|
+
async addStoryToAlbum(chatId, albumId, storyId) {
|
|
3010
|
+
return await this.#dispatch("addStoryToAlbum", chatId, albumId, storyId);
|
|
2903
3011
|
}
|
|
2904
|
-
//
|
|
2905
|
-
// ========================= STORY ALBUMS ========================= //
|
|
2906
|
-
//
|
|
2907
3012
|
/**
|
|
2908
3013
|
* Create a story album. User-only.
|
|
2909
3014
|
*
|
|
@@ -2916,37 +3021,23 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2916
3021
|
return await this.#dispatch("createStoryAlbum", chatId, name, storyIds);
|
|
2917
3022
|
}
|
|
2918
3023
|
/**
|
|
2919
|
-
*
|
|
2920
|
-
*
|
|
2921
|
-
* @method sa
|
|
2922
|
-
* @param chatId The identifier of the chat including the album.
|
|
2923
|
-
* @param albumId The identifier of the album to rename.
|
|
2924
|
-
* @param name The new name of the album.
|
|
2925
|
-
*/
|
|
2926
|
-
async setStoryAlbumName(chatId, albumId, name) {
|
|
2927
|
-
return await this.#dispatch("setStoryAlbumName", chatId, albumId, name);
|
|
2928
|
-
}
|
|
2929
|
-
/**
|
|
2930
|
-
* Add multiple stories to an album. User-only.
|
|
3024
|
+
* Get stories inside an album. User-only.
|
|
2931
3025
|
*
|
|
2932
3026
|
* @method sa
|
|
2933
|
-
* @param chatId The identifier of the chat including
|
|
3027
|
+
* @param chatId The identifier of the chat including albums.
|
|
2934
3028
|
* @param albumId The identifier of an album.
|
|
2935
|
-
* @param storyIds The identifiers of the stories to add.
|
|
2936
3029
|
*/
|
|
2937
|
-
async
|
|
2938
|
-
return await this.#dispatch("
|
|
3030
|
+
async getStoriesInAlbum(chatId, albumId) {
|
|
3031
|
+
return await this.#dispatch("getStoriesInAlbum", chatId, albumId);
|
|
2939
3032
|
}
|
|
2940
3033
|
/**
|
|
2941
|
-
*
|
|
3034
|
+
* Get story albums in a chat. User-only.
|
|
2942
3035
|
*
|
|
2943
3036
|
* @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.
|
|
3037
|
+
* @param chatId The identifier of a chat including albums.
|
|
2947
3038
|
*/
|
|
2948
|
-
async
|
|
2949
|
-
return await this.#dispatch("
|
|
3039
|
+
async getStoryAlbums(chatId) {
|
|
3040
|
+
return await this.#dispatch("getStoryAlbums", chatId);
|
|
2950
3041
|
}
|
|
2951
3042
|
/**
|
|
2952
3043
|
* Remove multiple stories from an album. User-only.
|
|
@@ -2982,23 +3073,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2982
3073
|
return await this.#dispatch("reorderStoriesInAlbum", chatId, albumId, storyIds);
|
|
2983
3074
|
}
|
|
2984
3075
|
/**
|
|
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.
|
|
3076
|
+
* Set the name of a story album. User-only.
|
|
2995
3077
|
*
|
|
2996
3078
|
* @method sa
|
|
2997
|
-
* @param chatId The identifier of the chat including
|
|
2998
|
-
* @param albumId The identifier of
|
|
3079
|
+
* @param chatId The identifier of the chat including the album.
|
|
3080
|
+
* @param albumId The identifier of the album to rename.
|
|
3081
|
+
* @param name The new name of the album.
|
|
2999
3082
|
*/
|
|
3000
|
-
async
|
|
3001
|
-
return await this.#dispatch("
|
|
3083
|
+
async setStoryAlbumName(chatId, albumId, name) {
|
|
3084
|
+
return await this.#dispatch("setStoryAlbumName", chatId, albumId, name);
|
|
3002
3085
|
}
|
|
3003
3086
|
//
|
|
3004
3087
|
// ========================= NETWORK STATISTICS ========================= //
|
|
@@ -3015,85 +3098,85 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3015
3098
|
// ========================= VIDEO CHATS ========================= //
|
|
3016
3099
|
//
|
|
3017
3100
|
/**
|
|
3018
|
-
*
|
|
3101
|
+
* Download a live stream segment. User-only.
|
|
3019
3102
|
*
|
|
3020
3103
|
* @method vc
|
|
3021
|
-
* @param
|
|
3022
|
-
* @
|
|
3104
|
+
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
3105
|
+
* @param channelId Stream channel ID.
|
|
3106
|
+
* @param scale Stream channel scale.
|
|
3107
|
+
* @param timestamp Millisecond timestamp of the chunk to download.
|
|
3023
3108
|
*/
|
|
3024
|
-
async
|
|
3025
|
-
return await this.#dispatch("
|
|
3109
|
+
async downloadLiveStreamSegment(id, channelId, scale, timestamp, params) {
|
|
3110
|
+
return await this.#dispatch("downloadLiveStreamSegment", id, channelId, scale, timestamp, params);
|
|
3026
3111
|
}
|
|
3027
3112
|
/**
|
|
3028
|
-
*
|
|
3113
|
+
* Get live stream channels. User-only.
|
|
3029
3114
|
*
|
|
3030
3115
|
* @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.
|
|
3116
|
+
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
3034
3117
|
*/
|
|
3035
|
-
async
|
|
3036
|
-
return await this.#dispatch("
|
|
3118
|
+
async getLiveStreamChannels(id) {
|
|
3119
|
+
return await this.#dispatch("getLiveStreamChannels", id);
|
|
3037
3120
|
}
|
|
3038
3121
|
/**
|
|
3039
|
-
*
|
|
3122
|
+
* Get a video chat. User-only.
|
|
3040
3123
|
*
|
|
3041
3124
|
* @method vc
|
|
3042
3125
|
* @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.
|
|
3126
|
+
* @cache
|
|
3045
3127
|
*/
|
|
3046
|
-
async
|
|
3047
|
-
return await this.#dispatch("
|
|
3128
|
+
async getVideoChat(id) {
|
|
3129
|
+
return await this.#dispatch("getVideoChat", id);
|
|
3048
3130
|
}
|
|
3049
3131
|
/**
|
|
3050
|
-
*
|
|
3132
|
+
* Join a live stream. User-only.
|
|
3051
3133
|
*
|
|
3052
3134
|
* @method vc
|
|
3053
3135
|
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
3054
3136
|
*/
|
|
3055
|
-
async
|
|
3056
|
-
return await this.#dispatch("
|
|
3137
|
+
async joinLiveStream(id) {
|
|
3138
|
+
return await this.#dispatch("joinLiveStream", id);
|
|
3057
3139
|
}
|
|
3058
3140
|
/**
|
|
3059
|
-
* Join a
|
|
3141
|
+
* Join a video chat. User-only.
|
|
3060
3142
|
*
|
|
3061
3143
|
* @method vc
|
|
3062
3144
|
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
3145
|
+
* @param params_ WebRTC connection parameters.
|
|
3146
|
+
* @returns Parameters to be passed to the used WebRTC library.
|
|
3063
3147
|
*/
|
|
3064
|
-
async
|
|
3065
|
-
return await this.#dispatch("
|
|
3148
|
+
async joinVideoChat(id, params_, params) {
|
|
3149
|
+
return await this.#dispatch("joinVideoChat", id, params_, params);
|
|
3066
3150
|
}
|
|
3067
3151
|
/**
|
|
3068
|
-
*
|
|
3152
|
+
* Leave a video chat. User-only.
|
|
3069
3153
|
*
|
|
3070
3154
|
* @method vc
|
|
3071
3155
|
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
3072
|
-
* @cache
|
|
3073
3156
|
*/
|
|
3074
|
-
async
|
|
3075
|
-
return await this.#dispatch("
|
|
3157
|
+
async leaveVideoChat(id) {
|
|
3158
|
+
return await this.#dispatch("leaveVideoChat", id);
|
|
3076
3159
|
}
|
|
3077
3160
|
/**
|
|
3078
|
-
*
|
|
3161
|
+
* Schedule a video chat. User-only.
|
|
3079
3162
|
*
|
|
3080
3163
|
* @method vc
|
|
3081
|
-
* @param
|
|
3164
|
+
* @param chatId The identifier of a chat to schedule the video chat in.
|
|
3165
|
+
* @param startAt A point in time in the future when the video chat will be started.
|
|
3166
|
+
* @returns The scheduled video chat.
|
|
3082
3167
|
*/
|
|
3083
|
-
async
|
|
3084
|
-
return await this.#dispatch("
|
|
3168
|
+
async scheduleVideoChat(chatId, startAt, params) {
|
|
3169
|
+
return await this.#dispatch("scheduleVideoChat", chatId, startAt, params);
|
|
3085
3170
|
}
|
|
3086
3171
|
/**
|
|
3087
|
-
*
|
|
3172
|
+
* Start a video chat. User-only.
|
|
3088
3173
|
*
|
|
3089
3174
|
* @method vc
|
|
3090
|
-
* @param
|
|
3091
|
-
* @
|
|
3092
|
-
* @param scale Stream channel scale.
|
|
3093
|
-
* @param timestamp Millisecond timestamp of the chunk to download.
|
|
3175
|
+
* @param chatId The identifier of a chat to start the video chat in.
|
|
3176
|
+
* @returns The started video chat.
|
|
3094
3177
|
*/
|
|
3095
|
-
async
|
|
3096
|
-
return await this.#dispatch("
|
|
3178
|
+
async startVideoChat(chatId, params) {
|
|
3179
|
+
return await this.#dispatch("startVideoChat", chatId, params);
|
|
3097
3180
|
}
|
|
3098
3181
|
//
|
|
3099
3182
|
// ========================= PAYMENTS ========================= //
|
|
@@ -3109,23 +3192,22 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3109
3192
|
return await this.#dispatch("answerPreCheckoutQuery", preCheckoutQueryId, ok, params);
|
|
3110
3193
|
}
|
|
3111
3194
|
/**
|
|
3112
|
-
*
|
|
3195
|
+
* Get the star balance of a chat.
|
|
3113
3196
|
*
|
|
3114
3197
|
* @method pa
|
|
3115
|
-
* @param
|
|
3116
|
-
* @param telegramPaymentChargeId The identifier of the charge.
|
|
3198
|
+
* @param chatId The identifier of the chat to get the star balance for.
|
|
3117
3199
|
*/
|
|
3118
|
-
async
|
|
3119
|
-
return await this.#dispatch("
|
|
3200
|
+
async getStarBalance(chatId) {
|
|
3201
|
+
return await this.#dispatch("getStarBalance", chatId);
|
|
3120
3202
|
}
|
|
3121
3203
|
/**
|
|
3122
|
-
* Get
|
|
3204
|
+
* Get star transactions.
|
|
3123
3205
|
*
|
|
3124
3206
|
* @method pa
|
|
3125
|
-
* @param chatId The identifier of the chat to get
|
|
3207
|
+
* @param chatId The identifier of the chat to get star transactions for.
|
|
3126
3208
|
*/
|
|
3127
|
-
async
|
|
3128
|
-
return await this.#dispatch("
|
|
3209
|
+
async getStarTransactions(chatId, params) {
|
|
3210
|
+
return await this.#dispatch("getStarTransactions", chatId, params);
|
|
3129
3211
|
}
|
|
3130
3212
|
/**
|
|
3131
3213
|
* Get the TON balance of a chat.
|
|
@@ -3137,52 +3219,53 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3137
3219
|
return await this.#dispatch("getTonBalance", chatId);
|
|
3138
3220
|
}
|
|
3139
3221
|
/**
|
|
3140
|
-
*
|
|
3222
|
+
* Refund a star payment. Bot-only.
|
|
3141
3223
|
*
|
|
3142
3224
|
* @method pa
|
|
3143
|
-
* @param
|
|
3225
|
+
* @param userId The identifier of the user that was charged.
|
|
3226
|
+
* @param telegramPaymentChargeId The identifier of the charge.
|
|
3144
3227
|
*/
|
|
3145
|
-
async
|
|
3146
|
-
return await this.#dispatch("
|
|
3228
|
+
async refundStarPayment(userId, telegramPaymentChargeId) {
|
|
3229
|
+
return await this.#dispatch("refundStarPayment", userId, telegramPaymentChargeId);
|
|
3147
3230
|
}
|
|
3148
3231
|
//
|
|
3149
3232
|
// ========================= CONTACTS ========================= //
|
|
3150
3233
|
//
|
|
3151
3234
|
/**
|
|
3152
|
-
*
|
|
3235
|
+
* Add a contact. User-only.
|
|
3153
3236
|
*
|
|
3154
3237
|
* @method co
|
|
3238
|
+
* @param userId The identifier of the user to add as contact.
|
|
3239
|
+
* @param firstName The contact's first name.
|
|
3155
3240
|
*/
|
|
3156
|
-
async
|
|
3157
|
-
|
|
3241
|
+
async addContact(userId, firstName, params) {
|
|
3242
|
+
await this.#dispatch("addContact", userId, firstName, params);
|
|
3158
3243
|
}
|
|
3159
3244
|
/**
|
|
3160
|
-
* Delete
|
|
3245
|
+
* Delete a single contact. User-only.
|
|
3161
3246
|
*
|
|
3162
3247
|
* @method co
|
|
3163
|
-
* @param
|
|
3248
|
+
* @param userId The identifier of the contact to delete.
|
|
3164
3249
|
*/
|
|
3165
|
-
async
|
|
3166
|
-
return await this.#dispatch("
|
|
3250
|
+
async deleteContact(userId) {
|
|
3251
|
+
return await this.#dispatch("deleteContact", userId);
|
|
3167
3252
|
}
|
|
3168
3253
|
/**
|
|
3169
|
-
* Delete
|
|
3254
|
+
* Delete multiple contacts. User-only.
|
|
3170
3255
|
*
|
|
3171
3256
|
* @method co
|
|
3172
|
-
* @param
|
|
3257
|
+
* @param userIds The identifiers of contacts to delete.
|
|
3173
3258
|
*/
|
|
3174
|
-
async
|
|
3175
|
-
return await this.#dispatch("
|
|
3259
|
+
async deleteContacts(userIds) {
|
|
3260
|
+
return await this.#dispatch("deleteContacts", userIds);
|
|
3176
3261
|
}
|
|
3177
3262
|
/**
|
|
3178
|
-
*
|
|
3263
|
+
* Get contacts. User-only.
|
|
3179
3264
|
*
|
|
3180
3265
|
* @method co
|
|
3181
|
-
* @param userId The identifier of the user to add as contact.
|
|
3182
|
-
* @param firstName The contact's first name.
|
|
3183
3266
|
*/
|
|
3184
|
-
async
|
|
3185
|
-
await this.#dispatch("
|
|
3267
|
+
async getContacts() {
|
|
3268
|
+
return await this.#dispatch("getContacts");
|
|
3186
3269
|
}
|
|
3187
3270
|
/**
|
|
3188
3271
|
* Set a contact note.
|
|
@@ -3209,12 +3292,13 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3209
3292
|
// ========================= GIFTS ========================= //
|
|
3210
3293
|
//
|
|
3211
3294
|
/**
|
|
3212
|
-
*
|
|
3295
|
+
* Craft gifts.
|
|
3213
3296
|
*
|
|
3214
3297
|
* @method gf
|
|
3298
|
+
* @param gifts The gifts to craft.
|
|
3215
3299
|
*/
|
|
3216
|
-
async
|
|
3217
|
-
return await this.#dispatch("
|
|
3300
|
+
async craftGifts(gifts) {
|
|
3301
|
+
return await this.#dispatch("craftGifts", gifts);
|
|
3218
3302
|
}
|
|
3219
3303
|
/**
|
|
3220
3304
|
* Get gifts claimed by a user or a channel. User-only.
|
|
@@ -3226,73 +3310,74 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3226
3310
|
return await this.#dispatch("getClaimedGifts", chatId, params);
|
|
3227
3311
|
}
|
|
3228
3312
|
/**
|
|
3229
|
-
*
|
|
3313
|
+
* Get a gift using its slug.
|
|
3230
3314
|
*
|
|
3231
3315
|
* @method gf
|
|
3232
|
-
* @param
|
|
3233
|
-
* @param giftId The identifier of the gift to send.
|
|
3316
|
+
* @param slug The slug of a gift.
|
|
3234
3317
|
*/
|
|
3235
|
-
async
|
|
3236
|
-
return await this.#dispatch("
|
|
3318
|
+
async getGift(slug) {
|
|
3319
|
+
return await this.#dispatch("getGift", slug);
|
|
3237
3320
|
}
|
|
3238
3321
|
/**
|
|
3239
|
-
*
|
|
3322
|
+
* Get available gifts.
|
|
3240
3323
|
*
|
|
3241
3324
|
* @method gf
|
|
3242
|
-
* @param gift The gift to sell.
|
|
3243
3325
|
*/
|
|
3244
|
-
async
|
|
3245
|
-
return await this.#dispatch("
|
|
3326
|
+
async getGifts() {
|
|
3327
|
+
return await this.#dispatch("getGifts");
|
|
3246
3328
|
}
|
|
3247
3329
|
/**
|
|
3248
|
-
*
|
|
3330
|
+
* Gift a Telegram Premium subscription. Bot-only.
|
|
3249
3331
|
*
|
|
3250
3332
|
* @method gf
|
|
3251
|
-
* @param
|
|
3333
|
+
* @param userId The identifier of a user to gift the Telegram Premium subscription to.
|
|
3334
|
+
* @param duration The duration of the subscription.
|
|
3252
3335
|
*/
|
|
3253
|
-
async
|
|
3254
|
-
return await this.#dispatch("
|
|
3336
|
+
async giftPremiumSubscription(userId, duration, params) {
|
|
3337
|
+
return await this.#dispatch("giftPremiumSubscription", userId, duration, params);
|
|
3255
3338
|
}
|
|
3256
3339
|
/**
|
|
3257
|
-
*
|
|
3340
|
+
* Sell a gift.
|
|
3258
3341
|
*
|
|
3259
3342
|
* @method gf
|
|
3260
|
-
* @param
|
|
3343
|
+
* @param gift The gift to sell.
|
|
3261
3344
|
*/
|
|
3262
|
-
async
|
|
3263
|
-
return await this.#dispatch("
|
|
3345
|
+
async sellGift(gift) {
|
|
3346
|
+
return await this.#dispatch("sellGift", gift);
|
|
3264
3347
|
}
|
|
3265
3348
|
/**
|
|
3266
|
-
*
|
|
3349
|
+
* Send a gift.
|
|
3267
3350
|
*
|
|
3268
3351
|
* @method gf
|
|
3269
|
-
* @param chatId The identifier of a
|
|
3270
|
-
* @param
|
|
3352
|
+
* @param chatId The identifier of a user or a channel to send the gift to.
|
|
3353
|
+
* @param giftId The identifier of the gift to send.
|
|
3271
3354
|
*/
|
|
3272
|
-
async
|
|
3273
|
-
return await this.#dispatch("
|
|
3355
|
+
async sendGift(chatId, giftId, params) {
|
|
3356
|
+
return await this.#dispatch("sendGift", chatId, giftId, params);
|
|
3274
3357
|
}
|
|
3275
3358
|
/**
|
|
3276
|
-
*
|
|
3359
|
+
* Transfer a gift. User-only.
|
|
3277
3360
|
*
|
|
3278
3361
|
* @method gf
|
|
3279
|
-
* @param
|
|
3280
|
-
* @param
|
|
3362
|
+
* @param chatId The identifier of a chat to transfer the gift to.
|
|
3363
|
+
* @param gift The gift to transfer.
|
|
3281
3364
|
*/
|
|
3282
|
-
async
|
|
3283
|
-
return await this.#dispatch("
|
|
3365
|
+
async transferGift(chatId, gift) {
|
|
3366
|
+
return await this.#dispatch("transferGift", chatId, gift);
|
|
3284
3367
|
}
|
|
3285
3368
|
//
|
|
3286
3369
|
// ========================= GIFT COLLECTIONS ========================= //
|
|
3287
3370
|
//
|
|
3288
3371
|
/**
|
|
3289
|
-
*
|
|
3372
|
+
* Add gifts to a gift collection. User-only.
|
|
3290
3373
|
*
|
|
3291
3374
|
* @method gc
|
|
3292
|
-
* @param chatId The identifier of
|
|
3375
|
+
* @param chatId The identifier of the chat that includes the gift collection.
|
|
3376
|
+
* @param collectionId The identifier of a gift collection.
|
|
3377
|
+
* @param gifts The gifts to add to the collection.
|
|
3293
3378
|
*/
|
|
3294
|
-
async
|
|
3295
|
-
return await this.#dispatch("
|
|
3379
|
+
async addGiftsToCollection(chatId, collectionId, gifts) {
|
|
3380
|
+
return await this.#dispatch("addGiftsToCollection", chatId, collectionId, gifts);
|
|
3296
3381
|
}
|
|
3297
3382
|
/**
|
|
3298
3383
|
* Create a gift collection. User-only.
|
|
@@ -3306,26 +3391,23 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3306
3391
|
return await this.#dispatch("createGiftCollection", chatId, name, gifts);
|
|
3307
3392
|
}
|
|
3308
3393
|
/**
|
|
3309
|
-
*
|
|
3394
|
+
* Delete a gift collection. User-only.
|
|
3310
3395
|
*
|
|
3311
3396
|
* @method gc
|
|
3312
3397
|
* @param chatId The identifier of the chat that includes the gift collection.
|
|
3313
3398
|
* @param collectionId The identifier of a gift collection.
|
|
3314
|
-
* @param name The gift collection's new name.
|
|
3315
3399
|
*/
|
|
3316
|
-
async
|
|
3317
|
-
return await this.#dispatch("
|
|
3400
|
+
async deleteGiftCollection(chatId, collectionId) {
|
|
3401
|
+
return await this.#dispatch("deleteGiftCollection", chatId, collectionId);
|
|
3318
3402
|
}
|
|
3319
3403
|
/**
|
|
3320
|
-
*
|
|
3404
|
+
* Get gift collections of a chat. User-only.
|
|
3321
3405
|
*
|
|
3322
3406
|
* @method gc
|
|
3323
|
-
* @param chatId The identifier of
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
async addGiftsToCollection(chatId, collectionId, gifts) {
|
|
3328
|
-
return await this.#dispatch("addGiftsToCollection", chatId, collectionId, gifts);
|
|
3407
|
+
* @param chatId The identifier of a chat to get gift collections for.
|
|
3408
|
+
*/
|
|
3409
|
+
async getGiftCollections(chatId) {
|
|
3410
|
+
return await this.#dispatch("getGiftCollections", chatId);
|
|
3329
3411
|
}
|
|
3330
3412
|
/**
|
|
3331
3413
|
* Remove gifts from a gift collection. User-only.
|
|
@@ -3350,27 +3432,19 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3350
3432
|
return await this.#dispatch("reorderGiftsInCollection", chatId, collectionId, gifts);
|
|
3351
3433
|
}
|
|
3352
3434
|
/**
|
|
3353
|
-
*
|
|
3435
|
+
* Set the name of a gift collection. User-only.
|
|
3354
3436
|
*
|
|
3355
3437
|
* @method gc
|
|
3356
3438
|
* @param chatId The identifier of the chat that includes the gift collection.
|
|
3357
3439
|
* @param collectionId The identifier of a gift collection.
|
|
3440
|
+
* @param name The gift collection's new name.
|
|
3358
3441
|
*/
|
|
3359
|
-
async
|
|
3360
|
-
return await this.#dispatch("
|
|
3442
|
+
async setGiftCollectionName(chatId, collectionId, name) {
|
|
3443
|
+
return await this.#dispatch("setGiftCollectionName", chatId, collectionId, name);
|
|
3361
3444
|
}
|
|
3362
3445
|
//
|
|
3363
3446
|
// ========================= TAKEOUTS ========================= //
|
|
3364
3447
|
//
|
|
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
3448
|
/**
|
|
3375
3449
|
* End a takeout session. User-only.
|
|
3376
3450
|
*
|
|
@@ -3389,26 +3463,37 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3389
3463
|
async getLeftChannels(takeoutId, params) {
|
|
3390
3464
|
return await this.#dispatch("getLeftChannels", takeoutId, params);
|
|
3391
3465
|
}
|
|
3466
|
+
/**
|
|
3467
|
+
* Start a takeout session. User-only.
|
|
3468
|
+
*
|
|
3469
|
+
* @method to
|
|
3470
|
+
* @returns The identifier of the takeout session.
|
|
3471
|
+
*/
|
|
3472
|
+
async startTakeoutSession(params) {
|
|
3473
|
+
return await this.#dispatch("startTakeoutSession", params);
|
|
3474
|
+
}
|
|
3392
3475
|
//
|
|
3393
3476
|
// ========================= STICKER SETS ========================= //
|
|
3394
3477
|
//
|
|
3395
3478
|
/**
|
|
3396
|
-
*
|
|
3479
|
+
* Add a sticker to a sticker set.
|
|
3397
3480
|
*
|
|
3398
3481
|
* @method ss
|
|
3399
3482
|
* @param slug The slug of the sticker set or its link.
|
|
3483
|
+
* @param sticker The sticker to add.
|
|
3400
3484
|
*/
|
|
3401
|
-
async
|
|
3402
|
-
return await this.#dispatch("
|
|
3485
|
+
async addStickerToStickerSet(slug, sticker, params) {
|
|
3486
|
+
return await this.#dispatch("addStickerToStickerSet", slug, sticker, params);
|
|
3403
3487
|
}
|
|
3404
3488
|
/**
|
|
3405
|
-
*
|
|
3489
|
+
* Change the position of a sticker in its set.
|
|
3406
3490
|
*
|
|
3407
3491
|
* @method ss
|
|
3408
|
-
* @param
|
|
3492
|
+
* @param fileId The identifier of the sticker.
|
|
3493
|
+
* @param position The new position of the sticker.
|
|
3409
3494
|
*/
|
|
3410
|
-
async
|
|
3411
|
-
return await this.#dispatch("
|
|
3495
|
+
async changeStickerPositionInStickerSet(fileId, position) {
|
|
3496
|
+
return await this.#dispatch("changeStickerPositionInStickerSet", fileId, position);
|
|
3412
3497
|
}
|
|
3413
3498
|
/**
|
|
3414
3499
|
* Check the availability of a sticker set slug.
|
|
@@ -3420,16 +3505,6 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3420
3505
|
async checkStickerSetSlug(slug) {
|
|
3421
3506
|
return await this.#dispatch("checkStickerSetSlug", slug);
|
|
3422
3507
|
}
|
|
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
3508
|
/**
|
|
3434
3509
|
* Create a sticker set.
|
|
3435
3510
|
*
|
|
@@ -3442,14 +3517,31 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3442
3517
|
return await this.#dispatch("createStickerSet", name, slug, stickers, params);
|
|
3443
3518
|
}
|
|
3444
3519
|
/**
|
|
3445
|
-
*
|
|
3520
|
+
* Delete a sticker set.
|
|
3446
3521
|
*
|
|
3447
3522
|
* @method ss
|
|
3448
3523
|
* @param slug The slug of the sticker set or its link.
|
|
3449
|
-
* @param sticker The sticker to add.
|
|
3450
3524
|
*/
|
|
3451
|
-
async
|
|
3452
|
-
return await this.#dispatch("
|
|
3525
|
+
async deleteStickerSet(slug) {
|
|
3526
|
+
return await this.#dispatch("deleteStickerSet", slug);
|
|
3527
|
+
}
|
|
3528
|
+
/**
|
|
3529
|
+
* Get a dice sticker set.
|
|
3530
|
+
*
|
|
3531
|
+
* @method ss
|
|
3532
|
+
* @param emoji The emoji of the dice.
|
|
3533
|
+
*/
|
|
3534
|
+
async getDiceStickerSet(emoji) {
|
|
3535
|
+
return await this.#dispatch("getDiceStickerSet", emoji);
|
|
3536
|
+
}
|
|
3537
|
+
/**
|
|
3538
|
+
* Get a sticker set.
|
|
3539
|
+
*
|
|
3540
|
+
* @method ss
|
|
3541
|
+
* @param slug The slug of the sticker set or its link.
|
|
3542
|
+
*/
|
|
3543
|
+
async getStickerSet(slug) {
|
|
3544
|
+
return await this.#dispatch("getStickerSet", slug);
|
|
3453
3545
|
}
|
|
3454
3546
|
/**
|
|
3455
3547
|
* Remove a sticker from its set.
|
|
@@ -3481,57 +3573,57 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3481
3573
|
return await this.#dispatch("replaceStickerInStickerSet", currentStickerFileId, newSticker, params);
|
|
3482
3574
|
}
|
|
3483
3575
|
/**
|
|
3484
|
-
*
|
|
3576
|
+
* Set a custom emoji as a sticker set's thumbnail.
|
|
3485
3577
|
*
|
|
3486
3578
|
* @method ss
|
|
3487
3579
|
* @param slug The slug of the sticker set or its link.
|
|
3580
|
+
* @param customEmojiId The identifier of the custom emoji to use as thumbnail.
|
|
3488
3581
|
*/
|
|
3489
|
-
async
|
|
3490
|
-
return await this.#dispatch("
|
|
3582
|
+
async setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId) {
|
|
3583
|
+
return await this.#dispatch("setCustomEmojiAsStickerSetThumbnail", slug, customEmojiId);
|
|
3491
3584
|
}
|
|
3492
3585
|
/**
|
|
3493
|
-
* Set
|
|
3586
|
+
* Set a sticker set's thumbnail.
|
|
3494
3587
|
*
|
|
3495
3588
|
* @method ss
|
|
3496
3589
|
* @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.
|
|
3590
|
+
* @param thumbnail The new thumbnail of the sticker set.
|
|
3508
3591
|
*/
|
|
3509
|
-
async
|
|
3510
|
-
return await this.#dispatch("
|
|
3592
|
+
async setStickerSetThumbnail(slug, thumbnail) {
|
|
3593
|
+
return await this.#dispatch("setStickerSetThumbnail", slug, thumbnail);
|
|
3511
3594
|
}
|
|
3512
3595
|
/**
|
|
3513
|
-
* Set a sticker set
|
|
3596
|
+
* Set the title of a sticker set.
|
|
3514
3597
|
*
|
|
3515
3598
|
* @method ss
|
|
3516
3599
|
* @param slug The slug of the sticker set or its link.
|
|
3517
|
-
* @param
|
|
3600
|
+
* @param title The sticker set's new title.
|
|
3518
3601
|
*/
|
|
3519
|
-
async
|
|
3520
|
-
return await this.#dispatch("
|
|
3602
|
+
async setStickerSetTitle(slug, title) {
|
|
3603
|
+
return await this.#dispatch("setStickerSetTitle", slug, title);
|
|
3521
3604
|
}
|
|
3522
3605
|
/**
|
|
3523
|
-
*
|
|
3606
|
+
* Suggest a sticker set slug from its title.
|
|
3524
3607
|
*
|
|
3525
3608
|
* @method ss
|
|
3526
|
-
* @param
|
|
3527
|
-
* @
|
|
3609
|
+
* @param title A title of a sticker set.
|
|
3610
|
+
* @returns The suggested slug.
|
|
3528
3611
|
*/
|
|
3529
|
-
async
|
|
3530
|
-
return await this.#dispatch("
|
|
3612
|
+
async suggestStickerSetSlug(title) {
|
|
3613
|
+
return await this.#dispatch("suggestStickerSetSlug", title);
|
|
3531
3614
|
}
|
|
3532
3615
|
//
|
|
3533
3616
|
// ========================= MANAGED BOTS ========================= //
|
|
3534
3617
|
//
|
|
3618
|
+
/**
|
|
3619
|
+
* Set the access settings of a managed bot. Bot-only.
|
|
3620
|
+
*
|
|
3621
|
+
* @method mb
|
|
3622
|
+
* @param userId The identifier of the bot user.
|
|
3623
|
+
*/
|
|
3624
|
+
async getManagedBotAccessSettings(userId) {
|
|
3625
|
+
return await this.#dispatch("getManagedBotAccessSettings", userId);
|
|
3626
|
+
}
|
|
3535
3627
|
/**
|
|
3536
3628
|
* Get the token of a managed bot. Bot-only.
|
|
3537
3629
|
*
|
|
@@ -3562,15 +3654,6 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3562
3654
|
async setManagedBotAccessSettings(userId, isAccessRestricted, params) {
|
|
3563
3655
|
return await this.#dispatch("setManagedBotAccessSettings", userId, isAccessRestricted, params);
|
|
3564
3656
|
}
|
|
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
3657
|
//
|
|
3575
3658
|
// ========================= GUEST QUERIES ========================= //
|
|
3576
3659
|
//
|
|
@@ -3587,15 +3670,6 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3587
3670
|
//
|
|
3588
3671
|
// ========================= SECRET CHATS ========================= //
|
|
3589
3672
|
//
|
|
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
3673
|
/**
|
|
3600
3674
|
* Accept a secret chat. User-only.
|
|
3601
3675
|
*
|
|
@@ -3615,38 +3689,42 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3615
3689
|
return await this.#dispatch("endSecretChat", id, params);
|
|
3616
3690
|
}
|
|
3617
3691
|
/**
|
|
3618
|
-
*
|
|
3692
|
+
* Request a secret chat. User-only.
|
|
3693
|
+
*
|
|
3694
|
+
* @method sc
|
|
3695
|
+
* @param chatId The identifier of a chat.
|
|
3696
|
+
*/
|
|
3697
|
+
async requestSecretChat(chatId) {
|
|
3698
|
+
return await this.#dispatch("requestSecretChat", chatId);
|
|
3699
|
+
}
|
|
3700
|
+
/**
|
|
3701
|
+
* Send an animation to a secret chat. User-only.
|
|
3619
3702
|
*
|
|
3620
3703
|
* @method sc
|
|
3621
3704
|
* @param id The identifier of the secret chat.
|
|
3622
|
-
* @param
|
|
3705
|
+
* @param animation The animation to send.
|
|
3623
3706
|
*/
|
|
3624
|
-
async
|
|
3625
|
-
return await this.#dispatch("
|
|
3707
|
+
async sendSecretAnimation(id, animation, params) {
|
|
3708
|
+
return await this.#dispatch("sendSecretAnimation", id, animation, params);
|
|
3626
3709
|
}
|
|
3627
3710
|
/**
|
|
3628
|
-
* Send
|
|
3711
|
+
* Send an audio file to a secret chat. User-only.
|
|
3629
3712
|
*
|
|
3630
3713
|
* @method sc
|
|
3631
3714
|
* @param id The identifier of the secret chat.
|
|
3632
|
-
* @param
|
|
3633
|
-
* @param longitude The location's longitude.
|
|
3715
|
+
* @param audio The audio file to send.
|
|
3634
3716
|
*/
|
|
3635
|
-
async
|
|
3636
|
-
return await this.#dispatch("
|
|
3717
|
+
async sendSecretAudio(id, audio, params) {
|
|
3718
|
+
return await this.#dispatch("sendSecretAudio", id, audio, params);
|
|
3637
3719
|
}
|
|
3638
3720
|
/**
|
|
3639
|
-
* Send a
|
|
3721
|
+
* Send a cancel typing action to a secret chat. User-only.
|
|
3640
3722
|
*
|
|
3641
3723
|
* @method sc
|
|
3642
3724
|
* @param id The identifier of the secret chat.
|
|
3643
|
-
* @param latitude The latitude of the venue.
|
|
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.
|
|
3647
3725
|
*/
|
|
3648
|
-
async
|
|
3649
|
-
return await this.#dispatch("
|
|
3726
|
+
async sendSecretCancelTypingAction(id) {
|
|
3727
|
+
return await this.#dispatch("sendSecretCancelTypingAction", id);
|
|
3650
3728
|
}
|
|
3651
3729
|
/**
|
|
3652
3730
|
* Send a contact to a secret chat. User-only.
|
|
@@ -3669,6 +3747,27 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3669
3747
|
async sendSecretDocument(id, document, params) {
|
|
3670
3748
|
return await this.#dispatch("sendSecretDocument", id, document, params);
|
|
3671
3749
|
}
|
|
3750
|
+
/**
|
|
3751
|
+
* Send a location to a secret chat. User-only.
|
|
3752
|
+
*
|
|
3753
|
+
* @method sc
|
|
3754
|
+
* @param id The identifier of the secret chat.
|
|
3755
|
+
* @param latitude The location's latitude.
|
|
3756
|
+
* @param longitude The location's longitude.
|
|
3757
|
+
*/
|
|
3758
|
+
async sendSecretLocation(id, latitude, longitude, params) {
|
|
3759
|
+
return await this.#dispatch("sendSecretLocation", id, latitude, longitude, params);
|
|
3760
|
+
}
|
|
3761
|
+
/**
|
|
3762
|
+
* Send a message to a secret chat. User-only.
|
|
3763
|
+
*
|
|
3764
|
+
* @method sc
|
|
3765
|
+
* @param id The identifier of the secret chat.
|
|
3766
|
+
* @param text The message's text.
|
|
3767
|
+
*/
|
|
3768
|
+
async sendSecretMessage(id, text, params) {
|
|
3769
|
+
return await this.#dispatch("sendSecretMessage", id, text, params);
|
|
3770
|
+
}
|
|
3672
3771
|
/**
|
|
3673
3772
|
* Send a photo to a secret chat. User-only.
|
|
3674
3773
|
*
|
|
@@ -3680,64 +3779,76 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3680
3779
|
return await this.#dispatch("sendSecretPhoto", id, photo, params);
|
|
3681
3780
|
}
|
|
3682
3781
|
/**
|
|
3683
|
-
* Send a
|
|
3782
|
+
* Send a secret chat screenshot notification. User-only.
|
|
3684
3783
|
*
|
|
3685
3784
|
* @method sc
|
|
3686
3785
|
* @param id The identifier of the secret chat.
|
|
3687
|
-
* @param
|
|
3786
|
+
* @param messageIds Identifiers of messages.
|
|
3688
3787
|
*/
|
|
3689
|
-
async
|
|
3690
|
-
return await this.#dispatch("
|
|
3788
|
+
async sendSecretScreenshotNotification(id, messageIds) {
|
|
3789
|
+
return await this.#dispatch("sendSecretScreenshotNotification", id, messageIds);
|
|
3691
3790
|
}
|
|
3692
3791
|
/**
|
|
3693
|
-
* Send a
|
|
3792
|
+
* Send a sticker to a secret chat. User-only.
|
|
3694
3793
|
*
|
|
3695
3794
|
* @method sc
|
|
3696
3795
|
* @param id The identifier of the secret chat.
|
|
3697
|
-
* @param
|
|
3796
|
+
* @param sticker The sticker to send.
|
|
3698
3797
|
*/
|
|
3699
|
-
async
|
|
3700
|
-
return await this.#dispatch("
|
|
3798
|
+
async sendSecretSticker(id, sticker, params) {
|
|
3799
|
+
return await this.#dispatch("sendSecretSticker", id, sticker, params);
|
|
3701
3800
|
}
|
|
3702
3801
|
/**
|
|
3703
|
-
* Send
|
|
3802
|
+
* Send a typing action to a secret chat. User-only.
|
|
3704
3803
|
*
|
|
3705
3804
|
* @method sc
|
|
3706
3805
|
* @param id The identifier of the secret chat.
|
|
3707
|
-
* @param animation The animation to send.
|
|
3708
3806
|
*/
|
|
3709
|
-
async
|
|
3710
|
-
return await this.#dispatch("
|
|
3807
|
+
async sendSecretTypingAction(id) {
|
|
3808
|
+
return await this.#dispatch("sendSecretTypingAction", id);
|
|
3711
3809
|
}
|
|
3712
3810
|
/**
|
|
3713
|
-
* Send
|
|
3811
|
+
* Send a venue to a secret chat. User-only.
|
|
3714
3812
|
*
|
|
3715
3813
|
* @method sc
|
|
3716
3814
|
* @param id The identifier of the secret chat.
|
|
3717
|
-
* @param
|
|
3815
|
+
* @param latitude The latitude of the venue.
|
|
3816
|
+
* @param longitude The longitude of the venue.
|
|
3817
|
+
* @param title The title of the venue.
|
|
3818
|
+
* @param address The written address of the venue.
|
|
3718
3819
|
*/
|
|
3719
|
-
async
|
|
3720
|
-
return await this.#dispatch("
|
|
3820
|
+
async sendSecretVenue(id, latitude, longitude, title, address, params) {
|
|
3821
|
+
return await this.#dispatch("sendSecretVenue", id, latitude, longitude, title, address, params);
|
|
3721
3822
|
}
|
|
3722
3823
|
/**
|
|
3723
|
-
* Send a
|
|
3824
|
+
* Send a video to a secret chat. User-only.
|
|
3724
3825
|
*
|
|
3725
3826
|
* @method sc
|
|
3726
3827
|
* @param id The identifier of the secret chat.
|
|
3727
|
-
* @param
|
|
3828
|
+
* @param video The video to send.
|
|
3728
3829
|
*/
|
|
3729
|
-
async
|
|
3730
|
-
return await this.#dispatch("
|
|
3830
|
+
async sendSecretVideo(id, video, params) {
|
|
3831
|
+
return await this.#dispatch("sendSecretVideo", id, video, params);
|
|
3731
3832
|
}
|
|
3732
3833
|
/**
|
|
3733
|
-
* Send a
|
|
3834
|
+
* Send a video note to a secret chat. User-only.
|
|
3734
3835
|
*
|
|
3735
3836
|
* @method sc
|
|
3736
3837
|
* @param id The identifier of the secret chat.
|
|
3737
|
-
* @param
|
|
3838
|
+
* @param videoNote The video note to send.
|
|
3738
3839
|
*/
|
|
3739
|
-
async
|
|
3740
|
-
return await this.#dispatch("
|
|
3840
|
+
async sendSecretVideoNote(id, videoNote, params) {
|
|
3841
|
+
return await this.#dispatch("sendSecretVideoNote", id, videoNote, params);
|
|
3842
|
+
}
|
|
3843
|
+
/**
|
|
3844
|
+
* Send a voice message to a secret chat. User-only.
|
|
3845
|
+
*
|
|
3846
|
+
* @method sc
|
|
3847
|
+
* @param id The identifier of the secret chat.
|
|
3848
|
+
* @param voice The voice message to send.
|
|
3849
|
+
*/
|
|
3850
|
+
async sendSecretVoice(id, voice, params) {
|
|
3851
|
+
return await this.#dispatch("sendSecretVoice", id, voice, params);
|
|
3741
3852
|
}
|
|
3742
3853
|
}
|
|
3743
3854
|
exports.ClientDispatcher = ClientDispatcher;
|