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