@telegram.ts/types 1.9.0 → 1.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telegram.ts/types",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Comprehensive Type Declarations for Telegram Bot API with telegramsjs",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -140,6 +140,8 @@ export type ApiMethods = {
140
140
  disable_notification?: boolean;
141
141
  /** Protects the contents of the sent message from forwarding and saving */
142
142
  protect_content?: boolean;
143
+ /** Unique identifier of the message effect to be added to the message */
144
+ message_effect_id?: string;
143
145
  /** Description of the message to reply to */
144
146
  reply_parameters?: ReplyParameters;
145
147
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -200,13 +202,15 @@ export type ApiMethods = {
200
202
  parse_mode?: string;
201
203
  /** A list of special entities that appear in the new caption, which can be specified instead of parse_mode */
202
204
  caption_entities?: MessageEntity[];
205
+ /** Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified. */
206
+ show_caption_above_media?: boolean;
203
207
  /** Sends the message silently. Users will receive a notification with no sound. */
204
208
  disable_notification?: boolean;
205
209
  /** Protects the contents of the sent message from forwarding and saving */
206
210
  protect_content?: boolean;
207
211
  /** Description of the message to reply to */
208
212
  reply_parameters?: ReplyParameters;
209
- /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
213
+ /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
210
214
  reply_markup?:
211
215
  | InlineKeyboardMarkup
212
216
  | ReplyKeyboardMarkup
@@ -243,19 +247,23 @@ export type ApiMethods = {
243
247
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
244
248
  message_thread_id?: number;
245
249
  /** Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. */
246
- photo: Buffer | ReadStream | string | string;
250
+ photo: Buffer | ReadStream | string;
247
251
  /** Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing */
248
252
  caption?: string;
249
253
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
250
254
  parse_mode?: ParseMode;
251
255
  /** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
252
256
  caption_entities?: MessageEntity[];
257
+ /** Pass True, if the caption must be shown above the message media */
258
+ show_caption_above_media?: boolean;
253
259
  /** Pass True if the photo needs to be covered with a spoiler animation */
254
260
  has_spoiler?: boolean;
255
261
  /** Sends the message silently. Users will receive a notification with no sound. */
256
262
  disable_notification?: boolean;
257
263
  /** Protects the contents of the sent message from forwarding and saving */
258
264
  protect_content?: boolean;
265
+ /** Unique identifier of the message effect to be added to the message */
266
+ message_effect_id?: string;
259
267
  /** Description of the message to reply to */
260
268
  reply_parameters?: ReplyParameters;
261
269
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -268,7 +276,9 @@ export type ApiMethods = {
268
276
  reply_to_message_id?: number;
269
277
  }): Message.PhotoMessage;
270
278
 
271
- /** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
279
+ /** Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
280
+
281
+ For sending voice messages, use the sendVoice method instead. */
272
282
  sendAudio(args: {
273
283
  /** Unique identifier of the business connection on behalf of which the message will be sent */
274
284
  business_connection_id?: string;
@@ -277,7 +287,7 @@ export type ApiMethods = {
277
287
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
278
288
  message_thread_id?: number;
279
289
  /** Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. */
280
- audio: Buffer | ReadStream | string | string;
290
+ audio: Buffer | ReadStream | string;
281
291
  /** Audio caption, 0-1024 characters after entities parsing */
282
292
  caption?: string;
283
293
  /** Mode for parsing entities in the audio caption. See formatting options for more details. */
@@ -296,6 +306,8 @@ export type ApiMethods = {
296
306
  disable_notification?: boolean;
297
307
  /** Protects the contents of the sent message from forwarding and saving */
298
308
  protect_content?: boolean;
309
+ /** Unique identifier of the message effect to be added to the message */
310
+ message_effect_id?: string;
299
311
  /** Description of the message to reply to */
300
312
  reply_parameters?: ReplyParameters;
301
313
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -317,7 +329,7 @@ export type ApiMethods = {
317
329
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
318
330
  message_thread_id?: number;
319
331
  /** File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
320
- document: Buffer | ReadStream | string | string;
332
+ document: Buffer | ReadStream | string;
321
333
  /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. */
322
334
  thumbnail?: Buffer | ReadStream | string;
323
335
  /** Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing */
@@ -332,6 +344,8 @@ export type ApiMethods = {
332
344
  disable_notification?: boolean;
333
345
  /** Protects the contents of the sent message from forwarding and saving */
334
346
  protect_content?: boolean;
347
+ /** Unique identifier of the message effect to be added to the message */
348
+ message_effect_id?: string;
335
349
  /** Description of the message to reply to */
336
350
  reply_parameters?: ReplyParameters;
337
351
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -353,7 +367,7 @@ export type ApiMethods = {
353
367
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
354
368
  message_thread_id?: number;
355
369
  /** Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. */
356
- video: Buffer | ReadStream | string | string;
370
+ video: Buffer | ReadStream | string;
357
371
  /** Duration of sent video in seconds */
358
372
  duration?: number;
359
373
  /** Video width */
@@ -368,6 +382,8 @@ export type ApiMethods = {
368
382
  parse_mode?: ParseMode;
369
383
  /** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
370
384
  caption_entities?: MessageEntity[];
385
+ /** Pass True, if the caption must be shown above the message media */
386
+ show_caption_above_media?: boolean;
371
387
  /** Pass True if the video needs to be covered with a spoiler animation */
372
388
  has_spoiler?: boolean;
373
389
  /** Pass True if the uploaded video is suitable for streaming */
@@ -376,6 +392,8 @@ export type ApiMethods = {
376
392
  disable_notification?: boolean;
377
393
  /** Protects the contents of the sent message from forwarding and saving */
378
394
  protect_content?: boolean;
395
+ /** Unique identifier of the message effect to be added to the message */
396
+ message_effect_id?: string;
379
397
  /** Description of the message to reply to */
380
398
  reply_parameters?: ReplyParameters;
381
399
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -397,7 +415,7 @@ export type ApiMethods = {
397
415
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
398
416
  message_thread_id?: number;
399
417
  /** Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. */
400
- animation: Buffer | ReadStream | string | string;
418
+ animation: Buffer | ReadStream | string;
401
419
  /** Duration of sent animation in seconds */
402
420
  duration?: number;
403
421
  /** Animation width */
@@ -412,12 +430,16 @@ export type ApiMethods = {
412
430
  parse_mode?: ParseMode;
413
431
  /** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
414
432
  caption_entities?: MessageEntity[];
433
+ /** Pass True, if the caption must be shown above the message media */
434
+ show_caption_above_media?: boolean;
415
435
  /** Pass True if the animation needs to be covered with a spoiler animation */
416
436
  has_spoiler?: boolean;
417
437
  /** Sends the message silently. Users will receive a notification with no sound. */
418
438
  disable_notification?: boolean;
419
439
  /** Protects the contents of the sent message from forwarding and saving */
420
440
  protect_content?: boolean;
441
+ /** Unique identifier of the message effect to be added to the message */
442
+ message_effect_id?: string;
421
443
  /** Description of the message to reply to */
422
444
  reply_parameters?: ReplyParameters;
423
445
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -430,7 +452,7 @@ export type ApiMethods = {
430
452
  reply_to_message_id?: number;
431
453
  }): Message.AnimationMessage;
432
454
 
433
- /** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
455
+ /** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
434
456
  sendVoice(args: {
435
457
  /** Unique identifier of the business connection on behalf of which the message will be sent */
436
458
  business_connection_id?: string;
@@ -439,7 +461,7 @@ export type ApiMethods = {
439
461
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
440
462
  message_thread_id?: number;
441
463
  /** Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
442
- voice: Buffer | ReadStream | string | string;
464
+ voice: Buffer | ReadStream | string;
443
465
  /** Voice message caption, 0-1024 characters after entities parsing */
444
466
  caption?: string;
445
467
  /** Mode for parsing entities in the voice message caption. See formatting options for more details. */
@@ -452,6 +474,8 @@ export type ApiMethods = {
452
474
  disable_notification?: boolean;
453
475
  /** Protects the contents of the sent message from forwarding and saving */
454
476
  protect_content?: boolean;
477
+ /** Unique identifier of the message effect to be added to the message */
478
+ message_effect_id?: string;
455
479
  /** Description of the message to reply to */
456
480
  reply_parameters?: ReplyParameters;
457
481
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -474,7 +498,7 @@ export type ApiMethods = {
474
498
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
475
499
  message_thread_id?: number;
476
500
  /** Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data.. Sending video notes by a URL is currently unsupported */
477
- video_note: Buffer | ReadStream | string | string;
501
+ video_note: Buffer | ReadStream | string;
478
502
  /** Duration of sent video in seconds */
479
503
  duration?: number;
480
504
  /** Video width and height, i.e. diameter of the video message */
@@ -485,6 +509,8 @@ export type ApiMethods = {
485
509
  disable_notification?: boolean;
486
510
  /** Protects the contents of the sent message from forwarding and saving */
487
511
  protect_content?: boolean;
512
+ /** Unique identifier of the message effect to be added to the message */
513
+ message_effect_id?: string;
488
514
  /** Description of the message to reply to */
489
515
  reply_parameters?: ReplyParameters;
490
516
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -513,6 +539,8 @@ export type ApiMethods = {
513
539
  disable_notification?: boolean;
514
540
  /** Protects the contents of the sent messages from forwarding and saving */
515
541
  protect_content?: boolean;
542
+ /** Unique identifier of the message effect to be added to the message */
543
+ message_effect_id?: string;
516
544
  /** Description of the message to reply to */
517
545
  reply_parameters?: ReplyParameters;
518
546
  /** @deprecated Use `reply_parameters` instead. */
@@ -548,6 +576,8 @@ export type ApiMethods = {
548
576
  disable_notification?: boolean;
549
577
  /** Protects the contents of the sent message from forwarding and saving */
550
578
  protect_content?: boolean;
579
+ /** Unique identifier of the message effect to be added to the message */
580
+ message_effect_id?: string;
551
581
  /** Description of the message to reply to */
552
582
  reply_parameters?: ReplyParameters;
553
583
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -624,6 +654,8 @@ export type ApiMethods = {
624
654
  disable_notification?: boolean;
625
655
  /** Protects the contents of the sent message from forwarding and saving */
626
656
  protect_content?: boolean;
657
+ /** Unique identifier of the message effect to be added to the message */
658
+ message_effect_id?: string;
627
659
  /** Description of the message to reply to */
628
660
  reply_parameters?: ReplyParameters;
629
661
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -656,6 +688,8 @@ export type ApiMethods = {
656
688
  disable_notification?: boolean;
657
689
  /** Protects the contents of the sent message from forwarding and saving */
658
690
  protect_content?: boolean;
691
+ /** Unique identifier of the message effect to be added to the message */
692
+ message_effect_id?: string;
659
693
  /** Description of the message to reply to */
660
694
  reply_parameters?: ReplyParameters;
661
695
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -708,6 +742,8 @@ export type ApiMethods = {
708
742
  disable_notification?: boolean;
709
743
  /** Protects the contents of the sent message from forwarding and saving */
710
744
  protect_content?: boolean;
745
+ /** Unique identifier of the message effect to be added to the message */
746
+ message_effect_id?: string;
711
747
  /** Description of the message to reply to */
712
748
  reply_parameters?: ReplyParameters;
713
749
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -734,6 +770,8 @@ export type ApiMethods = {
734
770
  disable_notification?: boolean;
735
771
  /** Protects the contents of the sent message from forwarding */
736
772
  protect_content?: boolean;
773
+ /** Unique identifier of the message effect to be added to the message */
774
+ message_effect_id?: string;
737
775
  /** Description of the message to reply to */
738
776
  reply_parameters?: ReplyParameters;
739
777
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -752,7 +790,7 @@ export type ApiMethods = {
752
790
 
753
791
  We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive. */
754
792
  sendChatAction(args: {
755
- /** Unique identifier of the business connection on behalf of which the message will be sent */
793
+ /** Unique identifier of the business connection on behalf of which the action will be sent */
756
794
  business_connection_id?: string;
757
795
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
758
796
  chat_id: number | string;
@@ -1217,7 +1255,7 @@ export type ApiMethods = {
1217
1255
  business_connection_id: string;
1218
1256
  }): BusinessConnection;
1219
1257
 
1220
- /** Use this method to change the list of the bot's commands. See https://core.telegram.org/bots#commands for more details about bot commands. Returns True on success. */
1258
+ /** Use this method to change the list of the bot's commands. See https://core.telegram.org/bots/features#commands for more details about bot commands. Returns True on success. */
1221
1259
  setMyCommands(args: {
1222
1260
  /** A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. */
1223
1261
  commands: readonly BotCommand[];
@@ -1347,6 +1385,8 @@ export type ApiMethods = {
1347
1385
  parse_mode?: ParseMode;
1348
1386
  /** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
1349
1387
  caption_entities?: MessageEntity[];
1388
+ /** Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages. */
1389
+ show_caption_above_media?: boolean;
1350
1390
  /** An object for an inline keyboard. */
1351
1391
  reply_markup?: InlineKeyboardMarkup;
1352
1392
  }): (Update.Edited & Message.CaptionableMessage) | true;
@@ -1421,13 +1461,15 @@ export type ApiMethods = {
1421
1461
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1422
1462
  message_thread_id?: number;
1423
1463
  /** Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. Video and animated stickers can't be sent via an HTTP URL. */
1424
- sticker: Buffer | ReadStream | string | string;
1464
+ sticker: Buffer | ReadStream | string;
1425
1465
  /** Emoji associated with the sticker; only for just uploaded stickers */
1426
1466
  emoji?: string;
1427
1467
  /** Sends the message silently. Users will receive a notification with no sound. */
1428
1468
  disable_notification?: boolean;
1429
1469
  /** Protects the contents of the sent message from forwarding and saving */
1430
1470
  protect_content?: boolean;
1471
+ /** Unique identifier of the message effect to be added to the message */
1472
+ message_effect_id?: string;
1431
1473
  /** Description of the message to reply to */
1432
1474
  reply_parameters?: ReplyParameters;
1433
1475
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
@@ -1448,7 +1490,7 @@ export type ApiMethods = {
1448
1490
 
1449
1491
  /** Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects. */
1450
1492
  getCustomEmojiStickers(args: {
1451
- /** List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. */
1493
+ /** A list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. */
1452
1494
  custom_emoji_ids: string[];
1453
1495
  }): Sticker[];
1454
1496
 
@@ -1488,18 +1530,6 @@ export type ApiMethods = {
1488
1530
  sticker: InputSticker;
1489
1531
  }): true;
1490
1532
 
1491
- /** Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success. */
1492
- replaceStickerInSet(args: {
1493
- /** User identifier of the sticker set owner */
1494
- user_id: number;
1495
- /** Sticker set name */
1496
- name: string;
1497
- /** File identifier of the replaced sticker */
1498
- old_sticker: string;
1499
- /** An object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.:x */
1500
- sticker: InputSticker;
1501
- }): true;
1502
-
1503
1533
  /** Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success. */
1504
1534
  setStickerPositionInSet(args: {
1505
1535
  /** File identifier of the sticker */
@@ -1514,6 +1544,18 @@ export type ApiMethods = {
1514
1544
  sticker: string;
1515
1545
  }): true;
1516
1546
 
1547
+ /** Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success. */
1548
+ replaceStickerInSet(args: {
1549
+ /** User identifier of the sticker set owner */
1550
+ user_id: number;
1551
+ /** Sticker set name */
1552
+ name: string;
1553
+ /** File identifier of the replaced sticker */
1554
+ old_sticker: string;
1555
+ /** An object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.:x */
1556
+ sticker: InputSticker;
1557
+ }): true;
1558
+
1517
1559
  /** Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success. */
1518
1560
  setStickerEmojiList(args: {
1519
1561
  /** File identifier of the sticker */
@@ -1559,7 +1601,7 @@ export type ApiMethods = {
1559
1601
  /** User identifier of the sticker set owner */
1560
1602
  user_id: number;
1561
1603
  /** A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. */
1562
- thumbnail?: Buffer | ReadStream | string | string;
1604
+ thumbnail?: Buffer | ReadStream | string;
1563
1605
  /** Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video */
1564
1606
  format: "static" | "animated" | "video";
1565
1607
  }): true;
@@ -1611,13 +1653,13 @@ export type ApiMethods = {
1611
1653
  description: string;
1612
1654
  /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
1613
1655
  payload: string;
1614
- /** Payment provider token, obtained via @BotFather */
1615
- provider_token: string;
1616
- /** Three-letter ISO 4217 currency code, see more on currencies */
1656
+ /** Payment provider token, obtained via BotFather. Pass an empty string for payments in Telegram Stars. */
1657
+ provider_token?: string;
1658
+ /** Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. */
1617
1659
  currency: string;
1618
- /** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
1660
+ /** Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. */
1619
1661
  prices: readonly LabeledPrice[];
1620
- /** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 */
1662
+ /** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. */
1621
1663
  max_tip_amount?: number;
1622
1664
  /** An array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. */
1623
1665
  suggested_tip_amounts?: number[];
@@ -1633,24 +1675,26 @@ export type ApiMethods = {
1633
1675
  photo_width?: number;
1634
1676
  /** Photo height */
1635
1677
  photo_height?: number;
1636
- /** Pass True if you require the user's full name to complete the order */
1678
+ /** Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. */
1637
1679
  need_name?: boolean;
1638
- /** Pass True if you require the user's phone number to complete the order */
1680
+ /** Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. */
1639
1681
  need_phone_number?: boolean;
1640
- /** Pass True if you require the user's email address to complete the order */
1682
+ /** Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. */
1641
1683
  need_email?: boolean;
1642
- /** Pass True if you require the user's shipping address to complete the order */
1684
+ /** Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. */
1643
1685
  need_shipping_address?: boolean;
1644
- /** Pass True if the user's phone number should be sent to provider */
1686
+ /** Pass True if the user's phone number should be sent to provider. Ignored for payments in Telegram Stars. */
1645
1687
  send_phone_number_to_provider?: boolean;
1646
- /** Pass True if the user's email address should be sent to provider */
1688
+ /** Pass True if the user's email address should be sent to provider. Ignored for payments in Telegram Stars. */
1647
1689
  send_email_to_provider?: boolean;
1648
- /** Pass True if the final price depends on the shipping method */
1690
+ /** Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. */
1649
1691
  is_flexible?: boolean;
1650
1692
  /** Sends the message silently. Users will receive a notification with no sound. */
1651
1693
  disable_notification?: boolean;
1652
1694
  /** Protects the contents of the sent message from forwarding and saving */
1653
1695
  protect_content?: boolean;
1696
+ /** Unique identifier of the message effect to be added to the message */
1697
+ message_effect_id?: string;
1654
1698
  /** Description of the message to reply to */
1655
1699
  reply_parameters?: ReplyParameters;
1656
1700
  /** An object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button. */
@@ -1667,8 +1711,8 @@ export type ApiMethods = {
1667
1711
  description: string;
1668
1712
  /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
1669
1713
  payload: string;
1670
- /** Payment provider token, obtained via BotFather */
1671
- provider_token: string;
1714
+ /** Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. */
1715
+ provider_token?: string;
1672
1716
  /** Three-letter ISO 4217 currency code, see more on currencies */
1673
1717
  currency: string;
1674
1718
  /** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
@@ -1725,6 +1769,14 @@ export type ApiMethods = {
1725
1769
  error_message?: string;
1726
1770
  }): true;
1727
1771
 
1772
+ /** Refunds a successful payment in Telegram Stars. Returns True on success. */
1773
+ refundStarPayment(args: {
1774
+ /** Identifier of the user whose payment will be refunded */
1775
+ user_id: number;
1776
+ /** Telegram payment identifier */
1777
+ telegram_payment_charge_id: string;
1778
+ }): true;
1779
+
1728
1780
  /** Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
1729
1781
 
1730
1782
  Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. */
@@ -1749,9 +1801,11 @@ export type ApiMethods = {
1749
1801
  disable_notification?: boolean;
1750
1802
  /** Protects the contents of the sent message from forwarding and saving */
1751
1803
  protect_content?: boolean;
1804
+ /** Unique identifier of the message effect to be added to the message */
1805
+ message_effect_id?: string;
1752
1806
  /** Description of the message to reply to */
1753
1807
  reply_parameters?: ReplyParameters;
1754
- /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
1808
+ /** An object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. */
1755
1809
  reply_markup?: InlineKeyboardMarkup;
1756
1810
  /** @deprecated Use `reply_parameters` instead. */
1757
1811
  reply_to_message_id?: number;
@@ -1792,10 +1846,10 @@ export type ApiMethods = {
1792
1846
 
1793
1847
  /** This object describes a sticker to be added to a sticker set. */
1794
1848
  export interface InputSticker {
1795
- /** Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video */
1796
- format: "static" | "animated" | "video";
1797
1849
  /** The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. */
1798
1850
  sticker: Buffer | ReadStream | string;
1851
+ /** Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video */
1852
+ format: "static" | "animated" | "video";
1799
1853
  /** List of 1-20 emoji associated with the sticker */
1800
1854
  emoji_list: string[];
1801
1855
  /** Position where the mask should be placed on faces. For “mask” stickers only. */
@@ -1825,6 +1879,8 @@ export interface InputMediaPhoto {
1825
1879
  media: Buffer | ReadStream | string;
1826
1880
  /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
1827
1881
  caption?: string;
1882
+ /** Pass True, if the caption must be shown above the message media */
1883
+ show_caption_above_media?: boolean;
1828
1884
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
1829
1885
  parse_mode?: ParseMode;
1830
1886
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -1843,6 +1899,8 @@ export interface InputMediaVideo {
1843
1899
  thumbnail?: Buffer | ReadStream | string;
1844
1900
  /** Caption of the video to be sent, 0-1024 characters after entities parsing */
1845
1901
  caption?: string;
1902
+ /** Pass True, if the caption must be shown above the message media */
1903
+ show_caption_above_media?: boolean;
1846
1904
  /** Mode for parsing entities in the video caption. See formatting options for more details. */
1847
1905
  parse_mode?: ParseMode;
1848
1906
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -1869,6 +1927,8 @@ export interface InputMediaAnimation {
1869
1927
  thumbnail?: Buffer | ReadStream | string;
1870
1928
  /** Caption of the animation to be sent, 0-1024 characters after entities parsing */
1871
1929
  caption?: string;
1930
+ /** Pass True, if the caption must be shown above the message media */
1931
+ show_caption_above_media?: boolean;
1872
1932
  /** Mode for parsing entities in the animation caption. See formatting options for more details. */
1873
1933
  parse_mode?: ParseMode;
1874
1934
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -111,6 +111,8 @@ export interface InlineQueryResultPhoto {
111
111
  description?: string;
112
112
  /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
113
113
  caption?: string;
114
+ /** Pass True, if the caption must be shown above the message media */
115
+ show_caption_above_media?: boolean;
114
116
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
115
117
  parse_mode?: ParseMode;
116
118
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -142,6 +144,8 @@ export interface InlineQueryResultGif {
142
144
  title?: string;
143
145
  /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
144
146
  caption?: string;
147
+ /** Pass True, if the caption must be shown above the message media */
148
+ show_caption_above_media?: boolean;
145
149
  /** Mode for parsing entities in the caption. See formatting options for more details. */
146
150
  parse_mode?: ParseMode;
147
151
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -173,6 +177,8 @@ export interface InlineQueryResultMpeg4Gif {
173
177
  title?: string;
174
178
  /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
175
179
  caption?: string;
180
+ /** Pass True, if the caption must be shown above the message media */
181
+ show_caption_above_media?: boolean;
176
182
  /** Mode for parsing entities in the caption. See formatting options for more details. */
177
183
  parse_mode?: ParseMode;
178
184
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -200,6 +206,8 @@ export interface InlineQueryResultVideo {
200
206
  title: string;
201
207
  /** Caption of the video to be sent, 0-1024 characters after entities parsing */
202
208
  caption?: string;
209
+ /** Pass True, if the caption must be shown above the message media */
210
+ show_caption_above_media?: boolean;
203
211
  /** Mode for parsing entities in the video caption. See formatting options for more details. */
204
212
  parse_mode?: ParseMode;
205
213
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -424,6 +432,8 @@ export interface InlineQueryResultCachedPhoto {
424
432
  description?: string;
425
433
  /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
426
434
  caption?: string;
435
+ /** Pass True, if the caption must be shown above the message media */
436
+ show_caption_above_media?: boolean;
427
437
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
428
438
  parse_mode?: ParseMode;
429
439
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -445,6 +455,8 @@ export interface InlineQueryResultCachedGif {
445
455
  title?: string;
446
456
  /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
447
457
  caption?: string;
458
+ /** Pass True, if the caption must be shown above the message media */
459
+ show_caption_above_media?: boolean;
448
460
  /** Mode for parsing entities in the caption. See formatting options for more details. */
449
461
  parse_mode?: ParseMode;
450
462
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -466,6 +478,8 @@ export interface InlineQueryResultCachedMpeg4Gif {
466
478
  title?: string;
467
479
  /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
468
480
  caption?: string;
481
+ /** Pass True, if the caption must be shown above the message media */
482
+ show_caption_above_media?: boolean;
469
483
  /** Mode for parsing entities in the caption. See formatting options for more details. */
470
484
  parse_mode?: ParseMode;
471
485
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -530,6 +544,8 @@ export interface InlineQueryResultCachedVideo {
530
544
  description?: string;
531
545
  /** Caption of the video to be sent, 0-1024 characters after entities parsing */
532
546
  caption?: string;
547
+ /** Pass True, if the caption must be shown above the message media */
548
+ show_caption_above_media?: boolean;
533
549
  /** Mode for parsing entities in the video caption. See formatting options for more details. */
534
550
  parse_mode?: ParseMode;
535
551
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -660,13 +676,13 @@ export interface InputInvoiceMessageContent {
660
676
  description: string;
661
677
  /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
662
678
  payload: string;
663
- /** Payment provider token, obtained via BotFather */
664
- provider_token: string;
665
- /** Three-letter ISO 4217 currency code, see more on currencies */
679
+ /** Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. */
680
+ provider_token?: string;
681
+ /** Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. */
666
682
  currency: string;
667
- /** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
683
+ /** Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. */
668
684
  prices: LabeledPrice[];
669
- /** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 */
685
+ /** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. */
670
686
  max_tip_amount?: number;
671
687
  /** An array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. */
672
688
  suggested_tip_amounts?: number[];
@@ -680,19 +696,19 @@ export interface InputInvoiceMessageContent {
680
696
  photo_width?: number;
681
697
  /** Photo height */
682
698
  photo_height?: number;
683
- /** Pass True if you require the user's full name to complete the order */
699
+ /** Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. */
684
700
  need_name?: boolean;
685
- /** Pass True if you require the user's phone number to complete the order */
701
+ /** Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. */
686
702
  need_phone_number?: boolean;
687
- /** Pass True if you require the user's email address to complete the order */
703
+ /** Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. */
688
704
  need_email?: boolean;
689
- /** Pass True if you require the user's shipping address to complete the order */
705
+ /** Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. */
690
706
  need_shipping_address?: boolean;
691
- /** Pass True if the user's phone number should be sent to provider */
707
+ /** Pass True if the user's phone number should be sent to provider. Ignored for payments in Telegram Stars. */
692
708
  send_phone_number_to_provider?: boolean;
693
- /** Pass True if the user's email address should be sent to provider */
709
+ /** Pass True if the user's email address should be sent to provider. Ignored for payments in Telegram Stars. */
694
710
  send_email_to_provider?: boolean;
695
- /** Pass True if the final price depends on the shipping method */
711
+ /** Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. */
696
712
  is_flexible?: boolean;
697
713
  }
698
714
  /** Represents a result of an inline query that was chosen by the user and sent to their chat partner.
@@ -25,7 +25,7 @@ export interface Invoice {
25
25
  description: string;
26
26
  /** A unique bot deep-linking parameter that can be used to generate this invoice. */
27
27
  start_parameter: string;
28
- /** The three-letter ISO 4217 currency code. */
28
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
29
29
  currency: string;
30
30
  /**
31
31
  * The total price in the smallest units of the currency (integer, not float/double).
@@ -84,7 +84,7 @@ export interface ShippingOption {
84
84
  * This interface contains basic information about a successful payment.
85
85
  */
86
86
  export interface SuccessfulPayment {
87
- /** The three-letter ISO 4217 currency code. */
87
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
88
88
  currency: string;
89
89
  /**
90
90
  * The total price in the smallest units of the currency (integer, not float/double).
@@ -127,7 +127,7 @@ export interface PreCheckoutQuery {
127
127
  id: string;
128
128
  /** The user who sent the query. */
129
129
  from: User;
130
- /** The three-letter ISO 4217 currency code. */
130
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
131
131
  currency: string;
132
132
  /**
133
133
  * The total price in the smallest units of the currency (integer, not float/double).
@@ -1,7 +1,7 @@
1
1
  import type { ChatAdministratorRights, User } from "./manageTypes";
2
2
  import type { MaybeInaccessibleMessage } from "./messageTypes";
3
3
 
4
- /** This object represents an inline keyboard that appears right next to the message it belongs to. */
4
+ /** This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button. */
5
5
  export interface InlineKeyboardMarkup {
6
6
  /** Array of button rows, each represented by an Array of InlineKeyboardButton objects */
7
7
  inline_keyboard: InlineKeyboardButton[][];
@@ -51,7 +51,7 @@ export declare namespace InlineKeyboardButton {
51
51
  callback_game: CallbackGame;
52
52
  }
53
53
  export interface PayButton extends AbstractInlineKeyboardButton {
54
- /** Specify True, to send a Pay button.
54
+ /** Specify True, to send a Pay button. Substrings “⭐” and “XTR” in the buttons's text will be replaced with a Telegram Star icon.
55
55
 
56
56
  NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages. */
57
57
  pay: boolean;
@@ -171,7 +171,7 @@ export declare namespace KeyboardButton {
171
171
  }
172
172
  }
173
173
 
174
- /** This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_users, request_chat, request_contact, request_location, and request_poll are mutually exclusive. */
174
+ /** This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text. */
175
175
  export type KeyboardButton =
176
176
  | KeyboardButton.CommonButton
177
177
  | KeyboardButton.RequestUsersButton
@@ -47,12 +47,16 @@ export declare namespace Message {
47
47
  edit_date?: number;
48
48
  /** True, if the message can't be forwarded */
49
49
  has_protected_content?: true;
50
+ /** True, if the caption must be shown above the message media */
51
+ show_caption_above_media?: true;
50
52
  /** True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message */
51
53
  is_from_offline?: true;
52
54
  /** Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */
53
55
  author_signature?: string;
54
56
  /** Options used for link preview generation for the message, if it is a text message and link preview options were changed */
55
57
  link_preview_options?: LinkPreviewOptions;
58
+ /** Unique identifier of the message effect added to the message */
59
+ effect_id?: string;
56
60
  /** Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */
57
61
  reply_markup?: InlineKeyboardMarkup;
58
62
  }
@@ -307,7 +311,7 @@ Note that Telegram clients will display an **alert** to the user before opening
307
311
  Message entities can be nested, providing following restrictions are met:
308
312
  - If two entities have common characters, then one of them is fully contained inside another.
309
313
  - bold, italic, underline, strikethrough, and spoiler entities can contain and can be part of any other entities, except pre and code.
310
- - blockquote entities can't be nested.
314
+ - blockquote and expandable_blockquote entities can't be nested.
311
315
  - All other entities can't contain each other.
312
316
 
313
317
  Links `tg://user?id=<user_id>` can be used to mention a user by their ID without using a username. Please note:
@@ -339,9 +343,15 @@ pre-formatted fixed-width code block written in the Python programming language
339
343
  ```
340
344
  >Block quotation started
341
345
  >Block quotation continued
342
- >The last line of the block quotation**
343
- >The second block quotation started right after the previous\r
344
- >The third block quotation started right after the previous
346
+ >Block quotation continued
347
+ >Block quotation continued
348
+ >The last line of the block quotation
349
+ ***>The second expandable block quotation started right after the previous
350
+ >It is separated from the previous block quotation by an empty bold entity
351
+ >Expandable block quotation continued
352
+ >Hidden by default part of the expandable block quotation started
353
+ >Expandable block quotation continued
354
+ >The last line of the expandable block quotation with the expandability mark
345
355
  ```
346
356
  Please note:
347
357
 
@@ -349,7 +359,7 @@ Please note:
349
359
  - Inside `pre` and `code` entities, all '`' and '\' characters must be escaped with a preceding '\' character.
350
360
  - Inside the `(...)` part of the inline link and custom emoji definition, all ')' and '\' must be escaped with a preceding '\' character.
351
361
  - In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
352
- - In case of ambiguity between `italic` and `underline` entities `__` is always greadily treated from left to right as beginning or end of `underline` entity, so instead of `___italic underline___` use `___italic underline_\r__`, where `\r` is a character with code 13, which will be ignored.
362
+ - In case of ambiguity between `italic` and `underline` entities `__` is always greadily treated from left to right as beginning or end of an `underline` entity, so instead of `___italic underline___` use `___italic underline_**__`, adding an empty bold entity as a separator.
353
363
  - A valid emoji must be provided as an alternative value for the custom emoji. The emoji will be shown instead of the custom emoji in places where a custom emoji cannot be displayed (e.g., system notifications) or if the message is forwarded by a non-premium user. It is recommended to use the emoji from the emoji field of the custom emoji sticker.
354
364
  - Custom emoji entities can only be used by bots that purchased additional usernames on Fragment.
355
365
 
@@ -370,6 +380,7 @@ To use this mode, pass *HTML* in the *parse_mode* field. The following tags are
370
380
  <pre>pre-formatted fixed-width code block</pre>
371
381
  <pre><code class="language-python">pre-formatted fixed-width code block written in the Python programming language</code></pre>
372
382
  <blockquote>Block quotation started\nBlock quotation continued\nThe last line of the block quotation</blockquote>
383
+ <blockquote expandable>Expandable block quotation started\nExpandable block quotation continued\nExpandable block quotation continued\nHidden by default part of the block quotation started\nExpandable block quotation continued\nThe last line of the block quotation</blockquote>
373
384
  ```
374
385
  Please note:
375
386
 
@@ -401,14 +412,14 @@ pre-formatted fixed-width code block written in the Python programming language
401
412
  Please note:
402
413
 
403
414
  - Entities must not be nested, use parse mode MarkdownV2 instead.
404
- - There is no way to specify “underline”, “strikethrough”, “spoiler”, “blockquote” and “custom_emoji” entities, use parse mode MarkdownV2 instead.
415
+ - There is no way to specify “underline”, “strikethrough”, “spoiler”, “blockquote”, “expandable_blockquote” and “custom_emoji” entities, use parse mode MarkdownV2 instead.
405
416
  - To escape characters '_', '*', '`', '[' outside of an entity, prepend the characters '\' before them.
406
417
  - Escaping inside entities is not allowed, so entity must be closed first and reopened again: use `_snake_\__case_` for italic `snake_case` and `*2*\**2=4*` for bold `2*2=4`. */
407
418
  export type ParseMode = "Markdown" | "MarkdownV2" | "HTML";
408
419
 
409
420
  export declare namespace MessageEntity {
410
421
  interface AbstractMessageEntity {
411
- /** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) */
422
+ /** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) */
412
423
  type: string;
413
424
  /** Offset in UTF-16 code units to the start of the entity */
414
425
  offset: number;
@@ -430,6 +441,7 @@ export declare namespace MessageEntity {
430
441
  | "strikethrough"
431
442
  | "spoiler"
432
443
  | "blockquote"
444
+ | "expandable_blockquote"
433
445
  | "code";
434
446
  }
435
447
  export interface PreMessageEntity extends AbstractMessageEntity {