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