@grom.js/effect-tg 0.10.0 → 0.12.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/README.md +386 -25
- package/dist/BotApiError.js +1 -1
- package/dist/BotApiError.js.map +1 -1
- package/dist/Dialog.d.ts +24 -23
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +15 -17
- package/dist/Dialog.js.map +1 -1
- package/dist/Markup.d.ts +200 -11
- package/dist/Markup.d.ts.map +1 -1
- package/dist/Markup.js +39 -0
- package/dist/Markup.js.map +1 -1
- package/dist/Reply.d.ts +22 -0
- package/dist/Reply.d.ts.map +1 -0
- package/dist/Reply.js +18 -0
- package/dist/Reply.js.map +1 -0
- package/dist/Send.d.ts +16 -1
- package/dist/Send.d.ts.map +1 -1
- package/dist/Send.js +28 -5
- package/dist/Send.js.map +1 -1
- package/dist/Text.d.ts +1 -1
- package/dist/Text.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/botApi.gen.d.ts +263 -191
- package/dist/internal/botApi.gen.d.ts.map +1 -1
- package/dist/internal/dialog.d.ts +4 -4
- package/dist/internal/dialog.d.ts.map +1 -1
- package/dist/internal/dialog.js +12 -13
- package/dist/internal/dialog.js.map +1 -1
- package/dist/internal/send.d.ts +4 -1
- package/dist/internal/send.d.ts.map +1 -1
- package/dist/internal/send.js +151 -7
- package/dist/internal/send.js.map +1 -1
- package/package.json +12 -11
- package/src/BotApiError.ts +1 -1
- package/src/Dialog.ts +31 -30
- package/src/Markup.ts +251 -11
- package/src/Reply.ts +36 -0
- package/src/Send.ts +51 -17
- package/src/Text.ts +1 -1
- package/src/index.ts +1 -0
- package/src/internal/botApi.gen.ts +267 -191
- package/src/internal/dialog.ts +16 -17
- package/src/internal/send.ts +171 -7
|
@@ -96,6 +96,8 @@ export interface BotApi {
|
|
|
96
96
|
setMessageReaction: BotApiMethod<'setMessageReaction'>
|
|
97
97
|
/** Use this method to get a list of profile pictures for a user. Returns a [UserProfilePhotos](https://core.telegram.org/bots/api#userprofilephotos) object. */
|
|
98
98
|
getUserProfilePhotos: BotApiMethod<'getUserProfilePhotos'>
|
|
99
|
+
/** Use this method to get a list of profile audios for a user. Returns a [UserProfileAudios](https://core.telegram.org/bots/api#userprofileaudios) object. */
|
|
100
|
+
getUserProfileAudios: BotApiMethod<'getUserProfileAudios'>
|
|
99
101
|
/** Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method [requestEmojiStatusAccess](https://core.telegram.org/bots/webapps#initializing-mini-apps). Returns _True_ on success. */
|
|
100
102
|
setUserEmojiStatus: BotApiMethod<'setUserEmojiStatus'>
|
|
101
103
|
/**
|
|
@@ -170,7 +172,7 @@ export interface BotApi {
|
|
|
170
172
|
deleteChatStickerSet: BotApiMethod<'deleteChatStickerSet'>
|
|
171
173
|
/** Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of [Sticker](https://core.telegram.org/bots/api#sticker) objects. */
|
|
172
174
|
getForumTopicIconStickers: BotApiMethod<'getForumTopicIconStickers'>
|
|
173
|
-
/** Use this method to create a topic in a forum supergroup chat.
|
|
175
|
+
/** Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the _can\_manage\_topics_ administrator right. Returns information about the created topic as a [ForumTopic](https://core.telegram.org/bots/api#forumtopic) object. */
|
|
174
176
|
createForumTopic: BotApiMethod<'createForumTopic'>
|
|
175
177
|
/** Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the _can\_manage\_topics_ administrator rights, unless it is the creator of the topic. Returns _True_ on success. */
|
|
176
178
|
editForumTopic: BotApiMethod<'editForumTopic'>
|
|
@@ -222,6 +224,10 @@ export interface BotApi {
|
|
|
222
224
|
setMyShortDescription: BotApiMethod<'setMyShortDescription'>
|
|
223
225
|
/** Use this method to get the current bot short description for the given user language. Returns [BotShortDescription](https://core.telegram.org/bots/api#botshortdescription) on success. */
|
|
224
226
|
getMyShortDescription: BotApiMethod<'getMyShortDescription'>
|
|
227
|
+
/** Changes the profile photo of the bot. Returns _True_ on success. */
|
|
228
|
+
setMyProfilePhoto: BotApiMethod<'setMyProfilePhoto'>
|
|
229
|
+
/** Removes the profile photo of the bot. Requires no parameters. Returns _True_ on success. */
|
|
230
|
+
removeMyProfilePhoto: BotApiMethod<'removeMyProfilePhoto'>
|
|
225
231
|
/** Use this method to change the bot's menu button in a private chat, or the default menu button. Returns _True_ on success. */
|
|
226
232
|
setChatMenuButton: BotApiMethod<'setChatMenuButton'>
|
|
227
233
|
/** Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns [MenuButton](https://core.telegram.org/bots/api#menubutton) on success. */
|
|
@@ -515,6 +521,8 @@ export declare namespace Types {
|
|
|
515
521
|
has_main_web_app?: boolean
|
|
516
522
|
/** _True_, if the bot has forum topic mode enabled in private chats. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
|
|
517
523
|
has_topics_enabled?: boolean
|
|
524
|
+
/** _True_, if the bot allows users to create and delete topics in private chats. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
|
|
525
|
+
allows_users_to_create_topics?: boolean
|
|
518
526
|
}
|
|
519
527
|
|
|
520
528
|
/** This object represents a chat. */
|
|
@@ -522,7 +530,7 @@ export declare namespace Types {
|
|
|
522
530
|
/** Unique identifier for this chat. */
|
|
523
531
|
id: number
|
|
524
532
|
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
525
|
-
type:
|
|
533
|
+
type: 'private' | 'group' | 'supergroup' | 'channel'
|
|
526
534
|
/** Title, for supergroups, channels and group chats */
|
|
527
535
|
title?: string
|
|
528
536
|
/** Username, for private chats, supergroups and channels if available */
|
|
@@ -542,7 +550,7 @@ export declare namespace Types {
|
|
|
542
550
|
/** Unique identifier for this chat. */
|
|
543
551
|
id: number
|
|
544
552
|
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
545
|
-
type:
|
|
553
|
+
type: 'private' | 'group' | 'supergroup' | 'channel'
|
|
546
554
|
/** Title, for supergroups, channels and group chats */
|
|
547
555
|
title?: string
|
|
548
556
|
/** Username, for private chats, supergroups and channels if available */
|
|
@@ -635,6 +643,8 @@ export declare namespace Types {
|
|
|
635
643
|
location?: Types.ChatLocation
|
|
636
644
|
/** For private chats, the rating of the user if any */
|
|
637
645
|
rating?: Types.UserRating
|
|
646
|
+
/** For private chats, the first audio added to the profile of the user */
|
|
647
|
+
first_profile_audio?: Types.Audio
|
|
638
648
|
/** The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews */
|
|
639
649
|
unique_gift_colors?: Types.UniqueGiftColors
|
|
640
650
|
/** The number of Telegram Stars a general user have to pay to send a message to the chat */
|
|
@@ -751,6 +761,10 @@ export declare namespace Types {
|
|
|
751
761
|
new_chat_members?: Array<Types.User>
|
|
752
762
|
/** A member was removed from the group, information about them (this member may be the bot itself) */
|
|
753
763
|
left_chat_member?: Types.User
|
|
764
|
+
/** Service message: chat owner has left */
|
|
765
|
+
chat_owner_left?: Types.ChatOwnerLeft
|
|
766
|
+
/** Service message: chat owner has changed */
|
|
767
|
+
chat_owner_changed?: Types.ChatOwnerChanged
|
|
754
768
|
/** A chat title was changed to this value */
|
|
755
769
|
new_chat_title?: string
|
|
756
770
|
/** A chat photo was change to this value */
|
|
@@ -864,7 +878,7 @@ export declare namespace Types {
|
|
|
864
878
|
/** Unique message identifier inside the chat */
|
|
865
879
|
message_id: number
|
|
866
880
|
/** Always 0. The field can be used to differentiate regular and inaccessible messages. */
|
|
867
|
-
date:
|
|
881
|
+
date: 0
|
|
868
882
|
}
|
|
869
883
|
|
|
870
884
|
/**
|
|
@@ -878,7 +892,7 @@ export declare namespace Types {
|
|
|
878
892
|
/** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
|
|
879
893
|
export interface MessageEntity {
|
|
880
894
|
/** Type of the entity. Currently, can be “mention” (`@username`), “hashtag” (`#hashtag` or `#hashtag@chatusername`), “cashtag” (`$USD` or `$USD@chatusername`), “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](https://telegram.org/blog/edit#new-mentions)), “custom\_emoji” (for inline custom emoji stickers) */
|
|
881
|
-
type:
|
|
895
|
+
type: 'mention' | 'hashtag' | 'cashtag' | 'bot_command' | 'url' | 'email' | 'phone_number' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'spoiler' | 'blockquote' | 'expandable_blockquote' | 'code' | 'pre' | 'text_link' | 'text_mention' | 'custom_emoji'
|
|
882
896
|
/** Offset in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length) to the start of the entity */
|
|
883
897
|
offset: number
|
|
884
898
|
/** Length of the entity in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length) */
|
|
@@ -970,7 +984,7 @@ export declare namespace Types {
|
|
|
970
984
|
/** Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including _bold_, _italic_, _underline_, _strikethrough_, _spoiler_, and _custom\_emoji_ entities. The message will fail to send if the quote isn't found in the original message. */
|
|
971
985
|
quote?: string
|
|
972
986
|
/** Mode for parsing entities in the quote. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
973
|
-
quote_parse_mode?:
|
|
987
|
+
quote_parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
974
988
|
/** An array of special entities that appear in the quote. It can be specified instead of _quote\_parse\_mode_. */
|
|
975
989
|
quote_entities?: Array<Types.MessageEntity>
|
|
976
990
|
/** Position of the quote in the original message in UTF-16 code units */
|
|
@@ -992,7 +1006,7 @@ export declare namespace Types {
|
|
|
992
1006
|
/** The message was originally sent by a known user. */
|
|
993
1007
|
export interface MessageOriginUser {
|
|
994
1008
|
/** Type of the message origin, always “user” */
|
|
995
|
-
type:
|
|
1009
|
+
type: 'user'
|
|
996
1010
|
/** Date the message was sent originally in Unix time */
|
|
997
1011
|
date: number
|
|
998
1012
|
/** User that sent the message originally */
|
|
@@ -1002,7 +1016,7 @@ export declare namespace Types {
|
|
|
1002
1016
|
/** The message was originally sent by an unknown user. */
|
|
1003
1017
|
export interface MessageOriginHiddenUser {
|
|
1004
1018
|
/** Type of the message origin, always “hidden\_user” */
|
|
1005
|
-
type:
|
|
1019
|
+
type: 'hidden_user'
|
|
1006
1020
|
/** Date the message was sent originally in Unix time */
|
|
1007
1021
|
date: number
|
|
1008
1022
|
/** Name of the user that sent the message originally */
|
|
@@ -1012,7 +1026,7 @@ export declare namespace Types {
|
|
|
1012
1026
|
/** The message was originally sent on behalf of a chat to a group chat. */
|
|
1013
1027
|
export interface MessageOriginChat {
|
|
1014
1028
|
/** Type of the message origin, always “chat” */
|
|
1015
|
-
type:
|
|
1029
|
+
type: 'chat'
|
|
1016
1030
|
/** Date the message was sent originally in Unix time */
|
|
1017
1031
|
date: number
|
|
1018
1032
|
/** Chat that sent the message originally */
|
|
@@ -1024,7 +1038,7 @@ export declare namespace Types {
|
|
|
1024
1038
|
/** The message was originally sent to a channel chat. */
|
|
1025
1039
|
export interface MessageOriginChannel {
|
|
1026
1040
|
/** Type of the message origin, always “channel” */
|
|
1027
|
-
type:
|
|
1041
|
+
type: 'channel'
|
|
1028
1042
|
/** Date the message was sent originally in Unix time */
|
|
1029
1043
|
date: number
|
|
1030
1044
|
/** Channel chat to which the message was originally sent */
|
|
@@ -1117,6 +1131,22 @@ export declare namespace Types {
|
|
|
1117
1131
|
id: number
|
|
1118
1132
|
}
|
|
1119
1133
|
|
|
1134
|
+
/** This object represents a video file of a specific quality. */
|
|
1135
|
+
export interface VideoQuality {
|
|
1136
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
1137
|
+
file_id: string
|
|
1138
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
1139
|
+
file_unique_id: string
|
|
1140
|
+
/** Video width */
|
|
1141
|
+
width: number
|
|
1142
|
+
/** Video height */
|
|
1143
|
+
height: number
|
|
1144
|
+
/** Codec that was used to encode the video, for example, “h264”, “h265”, or “av01” */
|
|
1145
|
+
codec: 'h264' | 'h265' | 'av01'
|
|
1146
|
+
/** File size in bytes. */
|
|
1147
|
+
file_size?: number
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1120
1150
|
/** This object represents a video file. */
|
|
1121
1151
|
export interface Video {
|
|
1122
1152
|
/** Identifier for this file, which can be used to download or reuse the file */
|
|
@@ -1135,6 +1165,8 @@ export declare namespace Types {
|
|
|
1135
1165
|
cover?: Array<Types.PhotoSize>
|
|
1136
1166
|
/** Timestamp in seconds from which the video will play in the message */
|
|
1137
1167
|
start_timestamp?: number
|
|
1168
|
+
/** List of available qualities of the video */
|
|
1169
|
+
qualities?: Array<Types.VideoQuality>
|
|
1138
1170
|
/** Original filename as defined by the sender */
|
|
1139
1171
|
file_name?: string
|
|
1140
1172
|
/** MIME type of the file as defined by the sender */
|
|
@@ -1193,7 +1225,7 @@ export declare namespace Types {
|
|
|
1193
1225
|
/** The paid media isn't available before the payment. */
|
|
1194
1226
|
export interface PaidMediaPreview {
|
|
1195
1227
|
/** Type of the paid media, always “preview” */
|
|
1196
|
-
type:
|
|
1228
|
+
type: 'preview'
|
|
1197
1229
|
/** Media width as defined by the sender */
|
|
1198
1230
|
width?: number
|
|
1199
1231
|
/** Media height as defined by the sender */
|
|
@@ -1205,7 +1237,7 @@ export declare namespace Types {
|
|
|
1205
1237
|
/** The paid media is a photo. */
|
|
1206
1238
|
export interface PaidMediaPhoto {
|
|
1207
1239
|
/** Type of the paid media, always “photo” */
|
|
1208
|
-
type:
|
|
1240
|
+
type: 'photo'
|
|
1209
1241
|
/** The photo */
|
|
1210
1242
|
photo: Array<Types.PhotoSize>
|
|
1211
1243
|
}
|
|
@@ -1213,7 +1245,7 @@ export declare namespace Types {
|
|
|
1213
1245
|
/** The paid media is a video. */
|
|
1214
1246
|
export interface PaidMediaVideo {
|
|
1215
1247
|
/** Type of the paid media, always “video” */
|
|
1216
|
-
type:
|
|
1248
|
+
type: 'video'
|
|
1217
1249
|
/** The video */
|
|
1218
1250
|
video: Types.Video
|
|
1219
1251
|
}
|
|
@@ -1235,7 +1267,7 @@ export declare namespace Types {
|
|
|
1235
1267
|
/** This object represents an animated emoji that displays a random value. */
|
|
1236
1268
|
export interface Dice {
|
|
1237
1269
|
/** Emoji on which the dice throw animation is based */
|
|
1238
|
-
emoji:
|
|
1270
|
+
emoji: '🎲' | '🎯' | '🎳' | '🏀' | '⚽' | '🎰'
|
|
1239
1271
|
/** Value of the dice, 1-6 for “”, “” and “” base emoji, 1-5 for “” and “” base emoji, 1-64 for “” base emoji */
|
|
1240
1272
|
value: number
|
|
1241
1273
|
}
|
|
@@ -1255,7 +1287,7 @@ export declare namespace Types {
|
|
|
1255
1287
|
/** Option text, 1-100 characters */
|
|
1256
1288
|
text: string
|
|
1257
1289
|
/** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Currently, only custom emoji entities are allowed */
|
|
1258
|
-
text_parse_mode?:
|
|
1290
|
+
text_parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
1259
1291
|
/** An array of special entities that appear in the poll option text. It can be specified instead of _text\_parse\_mode_ */
|
|
1260
1292
|
text_entities?: Array<Types.MessageEntity>
|
|
1261
1293
|
}
|
|
@@ -1289,7 +1321,7 @@ export declare namespace Types {
|
|
|
1289
1321
|
/** _True_, if the poll is anonymous */
|
|
1290
1322
|
is_anonymous: boolean
|
|
1291
1323
|
/** Poll type, currently can be “regular” or “quiz” */
|
|
1292
|
-
type:
|
|
1324
|
+
type: 'regular' | 'quiz'
|
|
1293
1325
|
/** _True_, if the poll allows multiple answers */
|
|
1294
1326
|
allows_multiple_answers: boolean
|
|
1295
1327
|
/** 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. */
|
|
@@ -1341,7 +1373,7 @@ export declare namespace Types {
|
|
|
1341
1373
|
/** Text of the task; 1-100 characters after entities parsing */
|
|
1342
1374
|
text: string
|
|
1343
1375
|
/** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
1344
|
-
parse_mode?:
|
|
1376
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
1345
1377
|
/** List of special entities that appear in the text, which can be specified instead of parse\_mode. Currently, only _bold_, _italic_, _underline_, _strikethrough_, _spoiler_, and _custom\_emoji_ entities are allowed. */
|
|
1346
1378
|
text_entities?: Array<Types.MessageEntity>
|
|
1347
1379
|
}
|
|
@@ -1351,7 +1383,7 @@ export declare namespace Types {
|
|
|
1351
1383
|
/** Title of the checklist; 1-255 characters after entities parsing */
|
|
1352
1384
|
title: string
|
|
1353
1385
|
/** Mode for parsing entities in the title. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
1354
|
-
parse_mode?:
|
|
1386
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
1355
1387
|
/** List of special entities that appear in the title, which can be specified instead of parse\_mode. Currently, only _bold_, _italic_, _underline_, _strikethrough_, _spoiler_, and _custom\_emoji_ entities are allowed. */
|
|
1356
1388
|
title_entities?: Array<Types.MessageEntity>
|
|
1357
1389
|
/** List of 1-30 tasks in the checklist */
|
|
@@ -1456,7 +1488,7 @@ export declare namespace Types {
|
|
|
1456
1488
|
/** The background is filled using the selected color. */
|
|
1457
1489
|
export interface BackgroundFillSolid {
|
|
1458
1490
|
/** Type of the background fill, always “solid” */
|
|
1459
|
-
type:
|
|
1491
|
+
type: 'solid'
|
|
1460
1492
|
/** The color of the background fill in the RGB24 format */
|
|
1461
1493
|
color: number
|
|
1462
1494
|
}
|
|
@@ -1464,7 +1496,7 @@ export declare namespace Types {
|
|
|
1464
1496
|
/** The background is a gradient fill. */
|
|
1465
1497
|
export interface BackgroundFillGradient {
|
|
1466
1498
|
/** Type of the background fill, always “gradient” */
|
|
1467
|
-
type:
|
|
1499
|
+
type: 'gradient'
|
|
1468
1500
|
/** Top color of the gradient in the RGB24 format */
|
|
1469
1501
|
top_color: number
|
|
1470
1502
|
/** Bottom color of the gradient in the RGB24 format */
|
|
@@ -1476,7 +1508,7 @@ export declare namespace Types {
|
|
|
1476
1508
|
/** The background is a freeform gradient that rotates after every message in the chat. */
|
|
1477
1509
|
export interface BackgroundFillFreeformGradient {
|
|
1478
1510
|
/** Type of the background fill, always “freeform\_gradient” */
|
|
1479
|
-
type:
|
|
1511
|
+
type: 'freeform_gradient'
|
|
1480
1512
|
/** A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format */
|
|
1481
1513
|
colors: Array<number>
|
|
1482
1514
|
}
|
|
@@ -1494,7 +1526,7 @@ export declare namespace Types {
|
|
|
1494
1526
|
/** The background is automatically filled based on the selected colors. */
|
|
1495
1527
|
export interface BackgroundTypeFill {
|
|
1496
1528
|
/** Type of the background, always “fill” */
|
|
1497
|
-
type:
|
|
1529
|
+
type: 'fill'
|
|
1498
1530
|
/** The background fill */
|
|
1499
1531
|
fill: Types.BackgroundFill
|
|
1500
1532
|
/** Dimming of the background in dark themes, as a percentage; 0-100 */
|
|
@@ -1504,7 +1536,7 @@ export declare namespace Types {
|
|
|
1504
1536
|
/** The background is a wallpaper in the JPEG format. */
|
|
1505
1537
|
export interface BackgroundTypeWallpaper {
|
|
1506
1538
|
/** Type of the background, always “wallpaper” */
|
|
1507
|
-
type:
|
|
1539
|
+
type: 'wallpaper'
|
|
1508
1540
|
/** Document with the wallpaper */
|
|
1509
1541
|
document: Types.Document
|
|
1510
1542
|
/** Dimming of the background in dark themes, as a percentage; 0-100 */
|
|
@@ -1518,7 +1550,7 @@ export declare namespace Types {
|
|
|
1518
1550
|
/** The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. */
|
|
1519
1551
|
export interface BackgroundTypePattern {
|
|
1520
1552
|
/** Type of the background, always “pattern” */
|
|
1521
|
-
type:
|
|
1553
|
+
type: 'pattern'
|
|
1522
1554
|
/** Document with the pattern */
|
|
1523
1555
|
document: Types.Document
|
|
1524
1556
|
/** The background fill that is combined with the pattern */
|
|
@@ -1534,7 +1566,7 @@ export declare namespace Types {
|
|
|
1534
1566
|
/** The background is taken directly from a built-in chat theme. */
|
|
1535
1567
|
export interface BackgroundTypeChatTheme {
|
|
1536
1568
|
/** Type of the background, always “chat\_theme” */
|
|
1537
|
-
type:
|
|
1569
|
+
type: 'chat_theme'
|
|
1538
1570
|
/** Name of the chat theme, which is usually an emoji */
|
|
1539
1571
|
theme_name: string
|
|
1540
1572
|
}
|
|
@@ -1694,7 +1726,7 @@ export declare namespace Types {
|
|
|
1694
1726
|
/** Message containing the suggested post. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
|
|
1695
1727
|
suggested_post_message?: Types.Message
|
|
1696
1728
|
/** Currency in which the payment was made. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins */
|
|
1697
|
-
currency:
|
|
1729
|
+
currency: 'XTR' | 'TON'
|
|
1698
1730
|
/** The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only */
|
|
1699
1731
|
amount?: number
|
|
1700
1732
|
/** The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only */
|
|
@@ -1706,7 +1738,7 @@ export declare namespace Types {
|
|
|
1706
1738
|
/** Message containing the suggested post. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
|
|
1707
1739
|
suggested_post_message?: Types.Message
|
|
1708
1740
|
/** Reason for the refund. Currently, one of “post\_deleted” if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or “payment\_refunded” if the payer refunded their payment. */
|
|
1709
|
-
reason:
|
|
1741
|
+
reason: 'post_deleted' | 'payment_refunded'
|
|
1710
1742
|
}
|
|
1711
1743
|
|
|
1712
1744
|
/** This object represents a service message about the creation of a scheduled giveaway. */
|
|
@@ -1794,7 +1826,7 @@ export declare namespace Types {
|
|
|
1794
1826
|
/** Describes the price of a suggested post. */
|
|
1795
1827
|
export interface SuggestedPostPrice {
|
|
1796
1828
|
/** Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins */
|
|
1797
|
-
currency:
|
|
1829
|
+
currency: 'XTR' | 'TON'
|
|
1798
1830
|
/** The amount of the currency that will be paid for the post in the _smallest units_ of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000. */
|
|
1799
1831
|
amount: number
|
|
1800
1832
|
}
|
|
@@ -1802,7 +1834,7 @@ export declare namespace Types {
|
|
|
1802
1834
|
/** Contains information about a suggested post. */
|
|
1803
1835
|
export interface SuggestedPostInfo {
|
|
1804
1836
|
/** State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”. */
|
|
1805
|
-
state:
|
|
1837
|
+
state: 'pending' | 'approved' | 'declined'
|
|
1806
1838
|
/** Proposed price of the post. If the field is omitted, then the post is unpaid. */
|
|
1807
1839
|
price?: Types.SuggestedPostPrice
|
|
1808
1840
|
/** Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it. */
|
|
@@ -1833,6 +1865,14 @@ export declare namespace Types {
|
|
|
1833
1865
|
photos: Array<Array<Types.PhotoSize>>
|
|
1834
1866
|
}
|
|
1835
1867
|
|
|
1868
|
+
/** This object represents the audios displayed on a user's profile. */
|
|
1869
|
+
export interface UserProfileAudios {
|
|
1870
|
+
/** Total number of profile audios for the target user */
|
|
1871
|
+
total_count: number
|
|
1872
|
+
/** Requested profile audios */
|
|
1873
|
+
audios: Array<Types.Audio>
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1836
1876
|
/**
|
|
1837
1877
|
* This object represents a file ready to be downloaded. The file can be downloaded via the link `https://api.telegram.org/file/bot<token>/<file_path>`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api#getfile).
|
|
1838
1878
|
*
|
|
@@ -1858,7 +1898,7 @@ export declare namespace Types {
|
|
|
1858
1898
|
/** This object represents a [custom keyboard](https://core.telegram.org/bots/features#keyboards) with reply options (see [Introduction to bots](https://core.telegram.org/bots/features#keyboards) for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
|
|
1859
1899
|
export interface ReplyKeyboardMarkup {
|
|
1860
1900
|
/** Array of button rows, each represented by an Array of [KeyboardButton](https://core.telegram.org/bots/api#keyboardbutton) objects */
|
|
1861
|
-
keyboard: Array<Array<Types.KeyboardButton>>
|
|
1901
|
+
keyboard: Array<Array<string | Types.KeyboardButton>>
|
|
1862
1902
|
/** Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to _false_, in which case the custom keyboard can be hidden and opened with a keyboard icon. */
|
|
1863
1903
|
is_persistent?: boolean
|
|
1864
1904
|
/** Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to _false_, in which case the custom keyboard is always of the same height as the app's standard keyboard. */
|
|
@@ -1875,14 +1915,14 @@ export declare namespace Types {
|
|
|
1875
1915
|
selective?: boolean
|
|
1876
1916
|
}
|
|
1877
1917
|
|
|
1878
|
-
/**
|
|
1879
|
-
* 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.
|
|
1880
|
-
*
|
|
1881
|
-
* **Note:** _request\_users_ and _request\_chat_ options will only work in Telegram versions released after 3 February, 2023. Older clients will display _unsupported message_.
|
|
1882
|
-
*/
|
|
1918
|
+
/** This object represents one button of the reply keyboard. At most one of the fields other than _text_, _icon\_custom\_emoji\_id_, and _style_ must be used to specify the type of the button. For simple text buttons, _String_ can be used instead of this object to specify the button text. */
|
|
1883
1919
|
export interface KeyboardButton {
|
|
1884
|
-
/** Text of the button. If none of the
|
|
1920
|
+
/** Text of the button. If none of the fields other than _text_, _icon\_custom\_emoji\_id_, and _style_ are used, it will be sent as a message when the button is pressed */
|
|
1885
1921
|
text: string
|
|
1922
|
+
/** Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on [Fragment](https://fragment.com/) or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription. */
|
|
1923
|
+
icon_custom_emoji_id?: string
|
|
1924
|
+
/** Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used. */
|
|
1925
|
+
style?: 'danger' | 'success' | 'primary'
|
|
1886
1926
|
/** If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users\_shared” service message. Available in private chats only. */
|
|
1887
1927
|
request_users?: Types.KeyboardButtonRequestUsers
|
|
1888
1928
|
/** If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat\_shared” service message. Available in private chats only. */
|
|
@@ -1944,7 +1984,7 @@ export declare namespace Types {
|
|
|
1944
1984
|
/** This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. */
|
|
1945
1985
|
export interface KeyboardButtonPollType {
|
|
1946
1986
|
/** If _quiz_ is passed, the user will be allowed to create only polls in the quiz mode. If _regular_ is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. */
|
|
1947
|
-
type?:
|
|
1987
|
+
type?: 'quiz' | 'regular'
|
|
1948
1988
|
}
|
|
1949
1989
|
|
|
1950
1990
|
/** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see [ReplyKeyboardMarkup](https://core.telegram.org/bots/api#replykeyboardmarkup)). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
|
|
@@ -1965,10 +2005,14 @@ export declare namespace Types {
|
|
|
1965
2005
|
inline_keyboard: Array<Array<Types.InlineKeyboardButton>>
|
|
1966
2006
|
}
|
|
1967
2007
|
|
|
1968
|
-
/** This object represents one button of an inline keyboard. Exactly one of the
|
|
2008
|
+
/** This object represents one button of an inline keyboard. Exactly one of the fields other than _text_, _icon\_custom\_emoji\_id_, and _style_ must be used to specify the type of the button. */
|
|
1969
2009
|
export interface InlineKeyboardButton {
|
|
1970
2010
|
/** Label text on the button */
|
|
1971
2011
|
text: string
|
|
2012
|
+
/** Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on [Fragment](https://fragment.com/) or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription. */
|
|
2013
|
+
icon_custom_emoji_id?: string
|
|
2014
|
+
/** Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used. */
|
|
2015
|
+
style?: 'danger' | 'success' | 'primary'
|
|
1972
2016
|
/** HTTP or tg:// URL to be opened when the button is pressed. Links `tg://user?id=<user_id>` can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings. */
|
|
1973
2017
|
url?: string
|
|
1974
2018
|
/** Data to be sent in a [callback query](https://core.telegram.org/bots/api#callbackquery) to the bot when the button is pressed, 1-64 bytes */
|
|
@@ -2197,7 +2241,7 @@ export declare namespace Types {
|
|
|
2197
2241
|
/** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that owns the chat and has all administrator privileges. */
|
|
2198
2242
|
export interface ChatMemberOwner {
|
|
2199
2243
|
/** The member's status in the chat, always “creator” */
|
|
2200
|
-
status:
|
|
2244
|
+
status: 'creator'
|
|
2201
2245
|
/** Information about the user */
|
|
2202
2246
|
user: Types.User
|
|
2203
2247
|
/** _True_, if the user's presence in the chat is hidden */
|
|
@@ -2209,7 +2253,7 @@ export declare namespace Types {
|
|
|
2209
2253
|
/** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that has some additional privileges. */
|
|
2210
2254
|
export interface ChatMemberAdministrator {
|
|
2211
2255
|
/** The member's status in the chat, always “administrator” */
|
|
2212
|
-
status:
|
|
2256
|
+
status: 'administrator'
|
|
2213
2257
|
/** Information about the user */
|
|
2214
2258
|
user: Types.User
|
|
2215
2259
|
/** _True_, if the bot is allowed to edit administrator privileges of that user */
|
|
@@ -2253,7 +2297,7 @@ export declare namespace Types {
|
|
|
2253
2297
|
/** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that has no additional privileges or restrictions. */
|
|
2254
2298
|
export interface ChatMemberMember {
|
|
2255
2299
|
/** The member's status in the chat, always “member” */
|
|
2256
|
-
status:
|
|
2300
|
+
status: 'member'
|
|
2257
2301
|
/** Information about the user */
|
|
2258
2302
|
user: Types.User
|
|
2259
2303
|
/** Date when the user's subscription will expire; Unix time */
|
|
@@ -2263,7 +2307,7 @@ export declare namespace Types {
|
|
|
2263
2307
|
/** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that is under certain restrictions in the chat. Supergroups only. */
|
|
2264
2308
|
export interface ChatMemberRestricted {
|
|
2265
2309
|
/** The member's status in the chat, always “restricted” */
|
|
2266
|
-
status:
|
|
2310
|
+
status: 'restricted'
|
|
2267
2311
|
/** Information about the user */
|
|
2268
2312
|
user: Types.User
|
|
2269
2313
|
/** _True_, if the user is a member of the chat at the moment of the request */
|
|
@@ -2303,7 +2347,7 @@ export declare namespace Types {
|
|
|
2303
2347
|
/** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that isn't currently a member of the chat, but may join it themselves. */
|
|
2304
2348
|
export interface ChatMemberLeft {
|
|
2305
2349
|
/** The member's status in the chat, always “left” */
|
|
2306
|
-
status:
|
|
2350
|
+
status: 'left'
|
|
2307
2351
|
/** Information about the user */
|
|
2308
2352
|
user: Types.User
|
|
2309
2353
|
}
|
|
@@ -2311,7 +2355,7 @@ export declare namespace Types {
|
|
|
2311
2355
|
/** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that was banned in the chat and can't return to the chat or view chat messages. */
|
|
2312
2356
|
export interface ChatMemberBanned {
|
|
2313
2357
|
/** The member's status in the chat, always “kicked” */
|
|
2314
|
-
status:
|
|
2358
|
+
status: 'kicked'
|
|
2315
2359
|
/** Information about the user */
|
|
2316
2360
|
user: Types.User
|
|
2317
2361
|
/** Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever */
|
|
@@ -2464,7 +2508,7 @@ export declare namespace Types {
|
|
|
2464
2508
|
/** Describes a story area pointing to a location. Currently, a story can have up to 10 location areas. */
|
|
2465
2509
|
export interface StoryAreaTypeLocation {
|
|
2466
2510
|
/** Type of the area, always “location” */
|
|
2467
|
-
type:
|
|
2511
|
+
type: 'location'
|
|
2468
2512
|
/** Location latitude in degrees */
|
|
2469
2513
|
latitude: number
|
|
2470
2514
|
/** Location longitude in degrees */
|
|
@@ -2476,7 +2520,7 @@ export declare namespace Types {
|
|
|
2476
2520
|
/** Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas. */
|
|
2477
2521
|
export interface StoryAreaTypeSuggestedReaction {
|
|
2478
2522
|
/** Type of the area, always “suggested\_reaction” */
|
|
2479
|
-
type:
|
|
2523
|
+
type: 'suggested_reaction'
|
|
2480
2524
|
/** Type of the reaction */
|
|
2481
2525
|
reaction_type: Types.ReactionType
|
|
2482
2526
|
/** Pass _True_ if the reaction area has a dark background */
|
|
@@ -2488,7 +2532,7 @@ export declare namespace Types {
|
|
|
2488
2532
|
/** Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas. */
|
|
2489
2533
|
export interface StoryAreaTypeLink {
|
|
2490
2534
|
/** Type of the area, always “link” */
|
|
2491
|
-
type:
|
|
2535
|
+
type: 'link'
|
|
2492
2536
|
/** HTTP or tg:// URL to be opened when the area is clicked */
|
|
2493
2537
|
url: string
|
|
2494
2538
|
}
|
|
@@ -2496,7 +2540,7 @@ export declare namespace Types {
|
|
|
2496
2540
|
/** Describes a story area containing weather information. Currently, a story can have up to 3 weather areas. */
|
|
2497
2541
|
export interface StoryAreaTypeWeather {
|
|
2498
2542
|
/** Type of the area, always “weather” */
|
|
2499
|
-
type:
|
|
2543
|
+
type: 'weather'
|
|
2500
2544
|
/** Temperature, in degree Celsius */
|
|
2501
2545
|
temperature: number
|
|
2502
2546
|
/** Emoji representing the weather */
|
|
@@ -2508,7 +2552,7 @@ export declare namespace Types {
|
|
|
2508
2552
|
/** Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area. */
|
|
2509
2553
|
export interface StoryAreaTypeUniqueGift {
|
|
2510
2554
|
/** Type of the area, always “unique\_gift” */
|
|
2511
|
-
type:
|
|
2555
|
+
type: 'unique_gift'
|
|
2512
2556
|
/** Unique name of the gift */
|
|
2513
2557
|
name: string
|
|
2514
2558
|
}
|
|
@@ -2541,7 +2585,7 @@ export declare namespace Types {
|
|
|
2541
2585
|
/** The reaction is based on an emoji. */
|
|
2542
2586
|
export interface ReactionTypeEmoji {
|
|
2543
2587
|
/** Type of the reaction, always “emoji” */
|
|
2544
|
-
type:
|
|
2588
|
+
type: 'emoji'
|
|
2545
2589
|
/** Reaction emoji. Currently, it can be one of "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" */
|
|
2546
2590
|
emoji: string
|
|
2547
2591
|
}
|
|
@@ -2549,7 +2593,7 @@ export declare namespace Types {
|
|
|
2549
2593
|
/** The reaction is based on a custom emoji. */
|
|
2550
2594
|
export interface ReactionTypeCustomEmoji {
|
|
2551
2595
|
/** Type of the reaction, always “custom\_emoji” */
|
|
2552
|
-
type:
|
|
2596
|
+
type: 'custom_emoji'
|
|
2553
2597
|
/** Custom emoji identifier */
|
|
2554
2598
|
custom_emoji_id: string
|
|
2555
2599
|
}
|
|
@@ -2557,7 +2601,7 @@ export declare namespace Types {
|
|
|
2557
2601
|
/** The reaction is paid. */
|
|
2558
2602
|
export interface ReactionTypePaid {
|
|
2559
2603
|
/** Type of the reaction, always “paid” */
|
|
2560
|
-
type:
|
|
2604
|
+
type: 'paid'
|
|
2561
2605
|
}
|
|
2562
2606
|
|
|
2563
2607
|
/** Represents a reaction added to a message along with the number of times it was added. */
|
|
@@ -2664,8 +2708,10 @@ export declare namespace Types {
|
|
|
2664
2708
|
name: string
|
|
2665
2709
|
/** The sticker that represents the unique gift */
|
|
2666
2710
|
sticker: Types.Sticker
|
|
2667
|
-
/** The number of unique gifts that receive this model for every 1000 gifts
|
|
2711
|
+
/** The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts. */
|
|
2668
2712
|
rarity_per_mille: number
|
|
2713
|
+
/** Rarity of the model if it is a crafted model. Currently, can be “uncommon”, “rare”, “epic”, or “legendary”. */
|
|
2714
|
+
rarity?: 'uncommon' | 'rare' | 'epic' | 'legendary'
|
|
2669
2715
|
}
|
|
2670
2716
|
|
|
2671
2717
|
/** This object describes the symbol shown on the pattern of a unique gift. */
|
|
@@ -2734,6 +2780,8 @@ export declare namespace Types {
|
|
|
2734
2780
|
backdrop: Types.UniqueGiftBackdrop
|
|
2735
2781
|
/** _True_, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers */
|
|
2736
2782
|
is_premium?: true
|
|
2783
|
+
/** _True_, if the gift was used to craft another gift and isn't available anymore */
|
|
2784
|
+
is_burned?: true
|
|
2737
2785
|
/** _True_, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
2738
2786
|
is_from_blockchain?: true
|
|
2739
2787
|
/** The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only */
|
|
@@ -2771,9 +2819,9 @@ export declare namespace Types {
|
|
|
2771
2819
|
/** Information about the gift */
|
|
2772
2820
|
gift: Types.UniqueGift
|
|
2773
2821
|
/** Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted\_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers */
|
|
2774
|
-
origin:
|
|
2822
|
+
origin: 'upgrade' | 'transfer' | 'resale' | 'gifted_upgrade' | 'offer'
|
|
2775
2823
|
/** For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins. */
|
|
2776
|
-
last_resale_currency?:
|
|
2824
|
+
last_resale_currency?: 'XTR' | 'TON'
|
|
2777
2825
|
/** For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins */
|
|
2778
2826
|
last_resale_amount?: number
|
|
2779
2827
|
/** Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts */
|
|
@@ -2795,7 +2843,7 @@ export declare namespace Types {
|
|
|
2795
2843
|
/** Describes a regular gift owned by a user or a chat. */
|
|
2796
2844
|
export interface OwnedGiftRegular {
|
|
2797
2845
|
/** Type of the gift, always “regular” */
|
|
2798
|
-
type:
|
|
2846
|
+
type: 'regular'
|
|
2799
2847
|
/** Information about the regular gift */
|
|
2800
2848
|
gift: Types.Gift
|
|
2801
2849
|
/** Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only */
|
|
@@ -2829,7 +2877,7 @@ export declare namespace Types {
|
|
|
2829
2877
|
/** Describes a unique gift received and owned by a user or a chat. */
|
|
2830
2878
|
export interface OwnedGiftUnique {
|
|
2831
2879
|
/** Type of the gift, always “unique” */
|
|
2832
|
-
type:
|
|
2880
|
+
type: 'unique'
|
|
2833
2881
|
/** Information about the unique gift */
|
|
2834
2882
|
gift: Types.UniqueGift
|
|
2835
2883
|
/** Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only */
|
|
@@ -2904,31 +2952,31 @@ export declare namespace Types {
|
|
|
2904
2952
|
/** Represents the default [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands. Default commands are used if no commands with a [narrower scope](https://core.telegram.org/bots/api#determining-list-of-commands) are specified for the user. */
|
|
2905
2953
|
export interface BotCommandScopeDefault {
|
|
2906
2954
|
/** Scope type, must be _default_ */
|
|
2907
|
-
type:
|
|
2955
|
+
type: 'default'
|
|
2908
2956
|
}
|
|
2909
2957
|
|
|
2910
2958
|
/** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all private chats. */
|
|
2911
2959
|
export interface BotCommandScopeAllPrivateChats {
|
|
2912
2960
|
/** Scope type, must be _all\_private\_chats_ */
|
|
2913
|
-
type:
|
|
2961
|
+
type: 'all_private_chats'
|
|
2914
2962
|
}
|
|
2915
2963
|
|
|
2916
2964
|
/** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all group and supergroup chats. */
|
|
2917
2965
|
export interface BotCommandScopeAllGroupChats {
|
|
2918
2966
|
/** Scope type, must be _all\_group\_chats_ */
|
|
2919
|
-
type:
|
|
2967
|
+
type: 'all_group_chats'
|
|
2920
2968
|
}
|
|
2921
2969
|
|
|
2922
2970
|
/** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all group and supergroup chat administrators. */
|
|
2923
2971
|
export interface BotCommandScopeAllChatAdministrators {
|
|
2924
2972
|
/** Scope type, must be _all\_chat\_administrators_ */
|
|
2925
|
-
type:
|
|
2973
|
+
type: 'all_chat_administrators'
|
|
2926
2974
|
}
|
|
2927
2975
|
|
|
2928
2976
|
/** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering a specific chat. */
|
|
2929
2977
|
export interface BotCommandScopeChat {
|
|
2930
2978
|
/** Scope type, must be _chat_ */
|
|
2931
|
-
type:
|
|
2979
|
+
type: 'chat'
|
|
2932
2980
|
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
|
|
2933
2981
|
chat_id: number | string
|
|
2934
2982
|
}
|
|
@@ -2936,7 +2984,7 @@ export declare namespace Types {
|
|
|
2936
2984
|
/** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all administrators of a specific group or supergroup chat. */
|
|
2937
2985
|
export interface BotCommandScopeChatAdministrators {
|
|
2938
2986
|
/** Scope type, must be _chat\_administrators_ */
|
|
2939
|
-
type:
|
|
2987
|
+
type: 'chat_administrators'
|
|
2940
2988
|
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
|
|
2941
2989
|
chat_id: number | string
|
|
2942
2990
|
}
|
|
@@ -2944,7 +2992,7 @@ export declare namespace Types {
|
|
|
2944
2992
|
/** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering a specific member of a group or supergroup chat. */
|
|
2945
2993
|
export interface BotCommandScopeChatMember {
|
|
2946
2994
|
/** Scope type, must be _chat\_member_ */
|
|
2947
|
-
type:
|
|
2995
|
+
type: 'chat_member'
|
|
2948
2996
|
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
|
|
2949
2997
|
chat_id: number | string
|
|
2950
2998
|
/** Unique identifier of the target user */
|
|
@@ -2983,13 +3031,13 @@ export declare namespace Types {
|
|
|
2983
3031
|
/** Represents a menu button, which opens the bot's list of commands. */
|
|
2984
3032
|
export interface MenuButtonCommands {
|
|
2985
3033
|
/** Type of the button, must be _commands_ */
|
|
2986
|
-
type:
|
|
3034
|
+
type: 'commands'
|
|
2987
3035
|
}
|
|
2988
3036
|
|
|
2989
3037
|
/** Represents a menu button, which launches a [Web App](https://core.telegram.org/bots/webapps). */
|
|
2990
3038
|
export interface MenuButtonWebApp {
|
|
2991
3039
|
/** Type of the button, must be _web\_app_ */
|
|
2992
|
-
type:
|
|
3040
|
+
type: 'web_app'
|
|
2993
3041
|
/** Text on the button */
|
|
2994
3042
|
text: string
|
|
2995
3043
|
/** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method [answerWebAppQuery](https://core.telegram.org/bots/api#answerwebappquery). Alternatively, a `t.me` link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link. */
|
|
@@ -2999,7 +3047,7 @@ export declare namespace Types {
|
|
|
2999
3047
|
/** Describes that no specific value for the menu button was set. */
|
|
3000
3048
|
export interface MenuButtonDefault {
|
|
3001
3049
|
/** Type of the button, must be _default_ */
|
|
3002
|
-
type:
|
|
3050
|
+
type: 'default'
|
|
3003
3051
|
}
|
|
3004
3052
|
|
|
3005
3053
|
/**
|
|
@@ -3014,7 +3062,7 @@ export declare namespace Types {
|
|
|
3014
3062
|
/** The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. */
|
|
3015
3063
|
export interface ChatBoostSourcePremium {
|
|
3016
3064
|
/** Source of the boost, always “premium” */
|
|
3017
|
-
source:
|
|
3065
|
+
source: 'premium'
|
|
3018
3066
|
/** User that boosted the chat */
|
|
3019
3067
|
user: Types.User
|
|
3020
3068
|
}
|
|
@@ -3022,7 +3070,7 @@ export declare namespace Types {
|
|
|
3022
3070
|
/** The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. */
|
|
3023
3071
|
export interface ChatBoostSourceGiftCode {
|
|
3024
3072
|
/** Source of the boost, always “gift\_code” */
|
|
3025
|
-
source:
|
|
3073
|
+
source: 'gift_code'
|
|
3026
3074
|
/** User for which the gift code was created */
|
|
3027
3075
|
user: Types.User
|
|
3028
3076
|
}
|
|
@@ -3030,7 +3078,7 @@ export declare namespace Types {
|
|
|
3030
3078
|
/** The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and _prize\_star\_count_ / 500 times for one year for Telegram Star giveaways. */
|
|
3031
3079
|
export interface ChatBoostSourceGiveaway {
|
|
3032
3080
|
/** Source of the boost, always “giveaway” */
|
|
3033
|
-
source:
|
|
3081
|
+
source: 'giveaway'
|
|
3034
3082
|
/** Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet. */
|
|
3035
3083
|
giveaway_message_id: number
|
|
3036
3084
|
/** User that won the prize in the giveaway if any; for Telegram Premium giveaways only */
|
|
@@ -3073,6 +3121,18 @@ export declare namespace Types {
|
|
|
3073
3121
|
source: Types.ChatBoostSource
|
|
3074
3122
|
}
|
|
3075
3123
|
|
|
3124
|
+
/** Describes a service message about the chat owner leaving the chat. */
|
|
3125
|
+
export interface ChatOwnerLeft {
|
|
3126
|
+
/** The user which will be the new owner of the chat if the previous owner does not return to the chat */
|
|
3127
|
+
new_owner?: Types.User
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
/** Describes a service message about an ownership change in the chat. */
|
|
3131
|
+
export interface ChatOwnerChanged {
|
|
3132
|
+
/** The new owner of the chat */
|
|
3133
|
+
new_owner: Types.User
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3076
3136
|
/** This object represents a list of boosts added to a chat by a user. */
|
|
3077
3137
|
export interface UserChatBoosts {
|
|
3078
3138
|
/** The list of boosts added to the chat by the user */
|
|
@@ -3159,13 +3219,13 @@ export declare namespace Types {
|
|
|
3159
3219
|
/** Represents a photo to be sent. */
|
|
3160
3220
|
export interface InputMediaPhoto {
|
|
3161
3221
|
/** Type of the result, must be _photo_ */
|
|
3162
|
-
type:
|
|
3222
|
+
type: 'photo'
|
|
3163
3223
|
/** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3164
3224
|
media: string
|
|
3165
3225
|
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
3166
3226
|
caption?: string
|
|
3167
3227
|
/** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3168
|
-
parse_mode?:
|
|
3228
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3169
3229
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3170
3230
|
caption_entities?: Array<Types.MessageEntity>
|
|
3171
3231
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3177,7 +3237,7 @@ export declare namespace Types {
|
|
|
3177
3237
|
/** Represents a video to be sent. */
|
|
3178
3238
|
export interface InputMediaVideo {
|
|
3179
3239
|
/** Type of the result, must be _video_ */
|
|
3180
|
-
type:
|
|
3240
|
+
type: 'video'
|
|
3181
3241
|
/** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3182
3242
|
media: string
|
|
3183
3243
|
/** 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>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
@@ -3189,7 +3249,7 @@ export declare namespace Types {
|
|
|
3189
3249
|
/** Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
3190
3250
|
caption?: string
|
|
3191
3251
|
/** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3192
|
-
parse_mode?:
|
|
3252
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3193
3253
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3194
3254
|
caption_entities?: Array<Types.MessageEntity>
|
|
3195
3255
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3209,7 +3269,7 @@ export declare namespace Types {
|
|
|
3209
3269
|
/** Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. */
|
|
3210
3270
|
export interface InputMediaAnimation {
|
|
3211
3271
|
/** Type of the result, must be _animation_ */
|
|
3212
|
-
type:
|
|
3272
|
+
type: 'animation'
|
|
3213
3273
|
/** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3214
3274
|
media: string
|
|
3215
3275
|
/** 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>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
@@ -3217,7 +3277,7 @@ export declare namespace Types {
|
|
|
3217
3277
|
/** Caption of the animation to be sent, 0-1024 characters after entities parsing */
|
|
3218
3278
|
caption?: string
|
|
3219
3279
|
/** Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3220
|
-
parse_mode?:
|
|
3280
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3221
3281
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3222
3282
|
caption_entities?: Array<Types.MessageEntity>
|
|
3223
3283
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3235,7 +3295,7 @@ export declare namespace Types {
|
|
|
3235
3295
|
/** Represents an audio file to be treated as music to be sent. */
|
|
3236
3296
|
export interface InputMediaAudio {
|
|
3237
3297
|
/** Type of the result, must be _audio_ */
|
|
3238
|
-
type:
|
|
3298
|
+
type: 'audio'
|
|
3239
3299
|
/** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3240
3300
|
media: string
|
|
3241
3301
|
/** 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>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
@@ -3243,7 +3303,7 @@ export declare namespace Types {
|
|
|
3243
3303
|
/** Caption of the audio to be sent, 0-1024 characters after entities parsing */
|
|
3244
3304
|
caption?: string
|
|
3245
3305
|
/** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3246
|
-
parse_mode?:
|
|
3306
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3247
3307
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3248
3308
|
caption_entities?: Array<Types.MessageEntity>
|
|
3249
3309
|
/** Duration of the audio in seconds */
|
|
@@ -3257,7 +3317,7 @@ export declare namespace Types {
|
|
|
3257
3317
|
/** Represents a general file to be sent. */
|
|
3258
3318
|
export interface InputMediaDocument {
|
|
3259
3319
|
/** Type of the result, must be _document_ */
|
|
3260
|
-
type:
|
|
3320
|
+
type: 'document'
|
|
3261
3321
|
/** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3262
3322
|
media: string
|
|
3263
3323
|
/** 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>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
@@ -3265,7 +3325,7 @@ export declare namespace Types {
|
|
|
3265
3325
|
/** Caption of the document to be sent, 0-1024 characters after entities parsing */
|
|
3266
3326
|
caption?: string
|
|
3267
3327
|
/** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3268
|
-
parse_mode?:
|
|
3328
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3269
3329
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3270
3330
|
caption_entities?: Array<Types.MessageEntity>
|
|
3271
3331
|
/** Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always _True_, if the document is sent as part of an album. */
|
|
@@ -3283,7 +3343,7 @@ export declare namespace Types {
|
|
|
3283
3343
|
/** The paid media to send is a photo. */
|
|
3284
3344
|
export interface InputPaidMediaPhoto {
|
|
3285
3345
|
/** Type of the media, must be _photo_ */
|
|
3286
|
-
type:
|
|
3346
|
+
type: 'photo'
|
|
3287
3347
|
/** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3288
3348
|
media: string
|
|
3289
3349
|
}
|
|
@@ -3291,7 +3351,7 @@ export declare namespace Types {
|
|
|
3291
3351
|
/** The paid media to send is a video. */
|
|
3292
3352
|
export interface InputPaidMediaVideo {
|
|
3293
3353
|
/** Type of the media, must be _video_ */
|
|
3294
|
-
type:
|
|
3354
|
+
type: 'video'
|
|
3295
3355
|
/** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3296
3356
|
media: string
|
|
3297
3357
|
/** 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>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
@@ -3321,7 +3381,7 @@ export declare namespace Types {
|
|
|
3321
3381
|
/** A static profile photo in the .JPG format. */
|
|
3322
3382
|
export interface InputProfilePhotoStatic {
|
|
3323
3383
|
/** Type of the profile photo, must be _static_ */
|
|
3324
|
-
type:
|
|
3384
|
+
type: 'static'
|
|
3325
3385
|
/** The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the photo was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3326
3386
|
photo: string
|
|
3327
3387
|
}
|
|
@@ -3329,7 +3389,7 @@ export declare namespace Types {
|
|
|
3329
3389
|
/** An animated profile photo in the MPEG4 format. */
|
|
3330
3390
|
export interface InputProfilePhotoAnimated {
|
|
3331
3391
|
/** Type of the profile photo, must be _animated_ */
|
|
3332
|
-
type:
|
|
3392
|
+
type: 'animated'
|
|
3333
3393
|
/** The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the photo was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3334
3394
|
animation: string
|
|
3335
3395
|
/** Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0. */
|
|
@@ -3347,7 +3407,7 @@ export declare namespace Types {
|
|
|
3347
3407
|
/** Describes a photo to post as a story. */
|
|
3348
3408
|
export interface InputStoryContentPhoto {
|
|
3349
3409
|
/** Type of the content, must be _photo_ */
|
|
3350
|
-
type:
|
|
3410
|
+
type: 'photo'
|
|
3351
3411
|
/** The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the photo was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3352
3412
|
photo: string
|
|
3353
3413
|
}
|
|
@@ -3355,7 +3415,7 @@ export declare namespace Types {
|
|
|
3355
3415
|
/** Describes a video to post as a story. */
|
|
3356
3416
|
export interface InputStoryContentVideo {
|
|
3357
3417
|
/** Type of the content, must be _video_ */
|
|
3358
|
-
type:
|
|
3418
|
+
type: 'video'
|
|
3359
3419
|
/** The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the video was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3360
3420
|
video: string
|
|
3361
3421
|
/** Precise duration of the video in seconds; 0-60 */
|
|
@@ -3373,7 +3433,7 @@ export declare namespace Types {
|
|
|
3373
3433
|
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
3374
3434
|
file_unique_id: string
|
|
3375
3435
|
/** Type of the sticker, currently one of “regular”, “mask”, “custom\_emoji”. The type of the sticker is independent from its format, which is determined by the fields _is\_animated_ and _is\_video_. */
|
|
3376
|
-
type:
|
|
3436
|
+
type: 'regular' | 'mask' | 'custom_emoji'
|
|
3377
3437
|
/** Sticker width */
|
|
3378
3438
|
width: number
|
|
3379
3439
|
/** Sticker height */
|
|
@@ -3407,7 +3467,7 @@ export declare namespace Types {
|
|
|
3407
3467
|
/** Sticker set title */
|
|
3408
3468
|
title: string
|
|
3409
3469
|
/** Type of stickers in the set, currently one of “regular”, “mask”, “custom\_emoji” */
|
|
3410
|
-
sticker_type:
|
|
3470
|
+
sticker_type: 'regular' | 'mask' | 'custom_emoji'
|
|
3411
3471
|
/** List of all set stickers */
|
|
3412
3472
|
stickers: Array<Types.Sticker>
|
|
3413
3473
|
/** Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
|
|
@@ -3417,7 +3477,7 @@ export declare namespace Types {
|
|
|
3417
3477
|
/** This object describes the position on faces where a mask should be placed by default. */
|
|
3418
3478
|
export interface MaskPosition {
|
|
3419
3479
|
/** The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”. */
|
|
3420
|
-
point:
|
|
3480
|
+
point: 'forehead' | 'eyes' | 'mouth' | 'chin'
|
|
3421
3481
|
/** Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position. */
|
|
3422
3482
|
x_shift: number
|
|
3423
3483
|
/** Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position. */
|
|
@@ -3431,7 +3491,7 @@ export declare namespace Types {
|
|
|
3431
3491
|
/** 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 pass “attach://<file\_attach\_name>” to upload a new file using multipart/form-data under <file\_attach\_name> name. Animated and video stickers can't be uploaded via HTTP URL. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
3432
3492
|
sticker: string
|
|
3433
3493
|
/** 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 */
|
|
3434
|
-
format:
|
|
3494
|
+
format: 'static' | 'animated' | 'video'
|
|
3435
3495
|
/** List of 1-20 emoji associated with the sticker */
|
|
3436
3496
|
emoji_list: Array<string>
|
|
3437
3497
|
/** Position where the mask should be placed on faces. For “mask” stickers only. */
|
|
@@ -3451,7 +3511,7 @@ export declare namespace Types {
|
|
|
3451
3511
|
/** Offset of the results to be returned, can be controlled by the bot */
|
|
3452
3512
|
offset: string
|
|
3453
3513
|
/** Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat */
|
|
3454
|
-
chat_type?:
|
|
3514
|
+
chat_type?: 'sender' | 'private' | 'group' | 'supergroup' | 'channel'
|
|
3455
3515
|
/** Sender location, only for bots that request user location */
|
|
3456
3516
|
location?: Types.Location
|
|
3457
3517
|
}
|
|
@@ -3501,7 +3561,7 @@ export declare namespace Types {
|
|
|
3501
3561
|
/** Represents a link to an article or web page. */
|
|
3502
3562
|
export interface InlineQueryResultArticle {
|
|
3503
3563
|
/** Type of the result, must be _article_ */
|
|
3504
|
-
type:
|
|
3564
|
+
type: 'article'
|
|
3505
3565
|
/** Unique identifier for this result, 1-64 Bytes */
|
|
3506
3566
|
id: string
|
|
3507
3567
|
/** Title of the result */
|
|
@@ -3525,7 +3585,7 @@ export declare namespace Types {
|
|
|
3525
3585
|
/** Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the photo. */
|
|
3526
3586
|
export interface InlineQueryResultPhoto {
|
|
3527
3587
|
/** Type of the result, must be _photo_ */
|
|
3528
|
-
type:
|
|
3588
|
+
type: 'photo'
|
|
3529
3589
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3530
3590
|
id: string
|
|
3531
3591
|
/** A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB */
|
|
@@ -3543,7 +3603,7 @@ export declare namespace Types {
|
|
|
3543
3603
|
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
3544
3604
|
caption?: string
|
|
3545
3605
|
/** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3546
|
-
parse_mode?:
|
|
3606
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3547
3607
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3548
3608
|
caption_entities?: Array<Types.MessageEntity>
|
|
3549
3609
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3557,7 +3617,7 @@ export declare namespace Types {
|
|
|
3557
3617
|
/** Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the animation. */
|
|
3558
3618
|
export interface InlineQueryResultGif {
|
|
3559
3619
|
/** Type of the result, must be _gif_ */
|
|
3560
|
-
type:
|
|
3620
|
+
type: 'gif'
|
|
3561
3621
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3562
3622
|
id: string
|
|
3563
3623
|
/** A valid URL for the GIF file */
|
|
@@ -3571,13 +3631,13 @@ export declare namespace Types {
|
|
|
3571
3631
|
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
|
|
3572
3632
|
thumbnail_url: string
|
|
3573
3633
|
/** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
|
|
3574
|
-
thumbnail_mime_type?:
|
|
3634
|
+
thumbnail_mime_type?: 'image/jpeg' | 'image/gif' | 'video/mp4'
|
|
3575
3635
|
/** Title for the result */
|
|
3576
3636
|
title?: string
|
|
3577
3637
|
/** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
|
|
3578
3638
|
caption?: string
|
|
3579
3639
|
/** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3580
|
-
parse_mode?:
|
|
3640
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3581
3641
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3582
3642
|
caption_entities?: Array<Types.MessageEntity>
|
|
3583
3643
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3591,7 +3651,7 @@ export declare namespace Types {
|
|
|
3591
3651
|
/** Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the animation. */
|
|
3592
3652
|
export interface InlineQueryResultMpeg4Gif {
|
|
3593
3653
|
/** Type of the result, must be _mpeg4\_gif_ */
|
|
3594
|
-
type:
|
|
3654
|
+
type: 'mpeg4_gif'
|
|
3595
3655
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3596
3656
|
id: string
|
|
3597
3657
|
/** A valid URL for the MPEG4 file */
|
|
@@ -3605,13 +3665,13 @@ export declare namespace Types {
|
|
|
3605
3665
|
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
|
|
3606
3666
|
thumbnail_url: string
|
|
3607
3667
|
/** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
|
|
3608
|
-
thumbnail_mime_type?:
|
|
3668
|
+
thumbnail_mime_type?: 'image/jpeg' | 'image/gif' | 'video/mp4'
|
|
3609
3669
|
/** Title for the result */
|
|
3610
3670
|
title?: string
|
|
3611
3671
|
/** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
|
|
3612
3672
|
caption?: string
|
|
3613
3673
|
/** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3614
|
-
parse_mode?:
|
|
3674
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3615
3675
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3616
3676
|
caption_entities?: Array<Types.MessageEntity>
|
|
3617
3677
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3629,13 +3689,13 @@ export declare namespace Types {
|
|
|
3629
3689
|
*/
|
|
3630
3690
|
export interface InlineQueryResultVideo {
|
|
3631
3691
|
/** Type of the result, must be _video_ */
|
|
3632
|
-
type:
|
|
3692
|
+
type: 'video'
|
|
3633
3693
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3634
3694
|
id: string
|
|
3635
3695
|
/** A valid URL for the embedded video player or video file */
|
|
3636
3696
|
video_url: string
|
|
3637
3697
|
/** MIME type of the content of the video URL, “text/html” or “video/mp4” */
|
|
3638
|
-
mime_type:
|
|
3698
|
+
mime_type: 'text/html' | 'video/mp4'
|
|
3639
3699
|
/** URL of the thumbnail (JPEG only) for the video */
|
|
3640
3700
|
thumbnail_url: string
|
|
3641
3701
|
/** Title for the result */
|
|
@@ -3643,7 +3703,7 @@ export declare namespace Types {
|
|
|
3643
3703
|
/** Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
3644
3704
|
caption?: string
|
|
3645
3705
|
/** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3646
|
-
parse_mode?:
|
|
3706
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3647
3707
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3648
3708
|
caption_entities?: Array<Types.MessageEntity>
|
|
3649
3709
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3665,7 +3725,7 @@ export declare namespace Types {
|
|
|
3665
3725
|
/** Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the audio. */
|
|
3666
3726
|
export interface InlineQueryResultAudio {
|
|
3667
3727
|
/** Type of the result, must be _audio_ */
|
|
3668
|
-
type:
|
|
3728
|
+
type: 'audio'
|
|
3669
3729
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3670
3730
|
id: string
|
|
3671
3731
|
/** A valid URL for the audio file */
|
|
@@ -3675,7 +3735,7 @@ export declare namespace Types {
|
|
|
3675
3735
|
/** Caption, 0-1024 characters after entities parsing */
|
|
3676
3736
|
caption?: string
|
|
3677
3737
|
/** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3678
|
-
parse_mode?:
|
|
3738
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3679
3739
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3680
3740
|
caption_entities?: Array<Types.MessageEntity>
|
|
3681
3741
|
/** Performer */
|
|
@@ -3691,7 +3751,7 @@ export declare namespace Types {
|
|
|
3691
3751
|
/** Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the the voice message. */
|
|
3692
3752
|
export interface InlineQueryResultVoice {
|
|
3693
3753
|
/** Type of the result, must be _voice_ */
|
|
3694
|
-
type:
|
|
3754
|
+
type: 'voice'
|
|
3695
3755
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3696
3756
|
id: string
|
|
3697
3757
|
/** A valid URL for the voice recording */
|
|
@@ -3701,7 +3761,7 @@ export declare namespace Types {
|
|
|
3701
3761
|
/** Caption, 0-1024 characters after entities parsing */
|
|
3702
3762
|
caption?: string
|
|
3703
3763
|
/** Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3704
|
-
parse_mode?:
|
|
3764
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3705
3765
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3706
3766
|
caption_entities?: Array<Types.MessageEntity>
|
|
3707
3767
|
/** Recording duration in seconds */
|
|
@@ -3715,7 +3775,7 @@ export declare namespace Types {
|
|
|
3715
3775
|
/** Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method. */
|
|
3716
3776
|
export interface InlineQueryResultDocument {
|
|
3717
3777
|
/** Type of the result, must be _document_ */
|
|
3718
|
-
type:
|
|
3778
|
+
type: 'document'
|
|
3719
3779
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3720
3780
|
id: string
|
|
3721
3781
|
/** Title for the result */
|
|
@@ -3723,13 +3783,13 @@ export declare namespace Types {
|
|
|
3723
3783
|
/** Caption of the document to be sent, 0-1024 characters after entities parsing */
|
|
3724
3784
|
caption?: string
|
|
3725
3785
|
/** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3726
|
-
parse_mode?:
|
|
3786
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3727
3787
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3728
3788
|
caption_entities?: Array<Types.MessageEntity>
|
|
3729
3789
|
/** A valid URL for the file */
|
|
3730
3790
|
document_url: string
|
|
3731
3791
|
/** MIME type of the content of the file, either “application/pdf” or “application/zip” */
|
|
3732
|
-
mime_type:
|
|
3792
|
+
mime_type: 'application/pdf' | 'application/zip'
|
|
3733
3793
|
/** Short description of the result */
|
|
3734
3794
|
description?: string
|
|
3735
3795
|
/** Inline keyboard attached to the message */
|
|
@@ -3747,7 +3807,7 @@ export declare namespace Types {
|
|
|
3747
3807
|
/** Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the location. */
|
|
3748
3808
|
export interface InlineQueryResultLocation {
|
|
3749
3809
|
/** Type of the result, must be _location_ */
|
|
3750
|
-
type:
|
|
3810
|
+
type: 'location'
|
|
3751
3811
|
/** Unique identifier for this result, 1-64 Bytes */
|
|
3752
3812
|
id: string
|
|
3753
3813
|
/** Location latitude in degrees */
|
|
@@ -3779,7 +3839,7 @@ export declare namespace Types {
|
|
|
3779
3839
|
/** Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the venue. */
|
|
3780
3840
|
export interface InlineQueryResultVenue {
|
|
3781
3841
|
/** Type of the result, must be _venue_ */
|
|
3782
|
-
type:
|
|
3842
|
+
type: 'venue'
|
|
3783
3843
|
/** Unique identifier for this result, 1-64 Bytes */
|
|
3784
3844
|
id: string
|
|
3785
3845
|
/** Latitude of the venue location in degrees */
|
|
@@ -3813,7 +3873,7 @@ export declare namespace Types {
|
|
|
3813
3873
|
/** Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the contact. */
|
|
3814
3874
|
export interface InlineQueryResultContact {
|
|
3815
3875
|
/** Type of the result, must be _contact_ */
|
|
3816
|
-
type:
|
|
3876
|
+
type: 'contact'
|
|
3817
3877
|
/** Unique identifier for this result, 1-64 Bytes */
|
|
3818
3878
|
id: string
|
|
3819
3879
|
/** Contact's phone number */
|
|
@@ -3839,7 +3899,7 @@ export declare namespace Types {
|
|
|
3839
3899
|
/** Represents a [Game](https://core.telegram.org/bots/api#games). */
|
|
3840
3900
|
export interface InlineQueryResultGame {
|
|
3841
3901
|
/** Type of the result, must be _game_ */
|
|
3842
|
-
type:
|
|
3902
|
+
type: 'game'
|
|
3843
3903
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3844
3904
|
id: string
|
|
3845
3905
|
/** Short name of the game */
|
|
@@ -3851,7 +3911,7 @@ export declare namespace Types {
|
|
|
3851
3911
|
/** Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the photo. */
|
|
3852
3912
|
export interface InlineQueryResultCachedPhoto {
|
|
3853
3913
|
/** Type of the result, must be _photo_ */
|
|
3854
|
-
type:
|
|
3914
|
+
type: 'photo'
|
|
3855
3915
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3856
3916
|
id: string
|
|
3857
3917
|
/** A valid file identifier of the photo */
|
|
@@ -3863,7 +3923,7 @@ export declare namespace Types {
|
|
|
3863
3923
|
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
3864
3924
|
caption?: string
|
|
3865
3925
|
/** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3866
|
-
parse_mode?:
|
|
3926
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3867
3927
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3868
3928
|
caption_entities?: Array<Types.MessageEntity>
|
|
3869
3929
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3877,7 +3937,7 @@ export declare namespace Types {
|
|
|
3877
3937
|
/** Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with specified content instead of the animation. */
|
|
3878
3938
|
export interface InlineQueryResultCachedGif {
|
|
3879
3939
|
/** Type of the result, must be _gif_ */
|
|
3880
|
-
type:
|
|
3940
|
+
type: 'gif'
|
|
3881
3941
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3882
3942
|
id: string
|
|
3883
3943
|
/** A valid file identifier for the GIF file */
|
|
@@ -3887,7 +3947,7 @@ export declare namespace Types {
|
|
|
3887
3947
|
/** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
|
|
3888
3948
|
caption?: string
|
|
3889
3949
|
/** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3890
|
-
parse_mode?:
|
|
3950
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3891
3951
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3892
3952
|
caption_entities?: Array<Types.MessageEntity>
|
|
3893
3953
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3901,7 +3961,7 @@ export declare namespace Types {
|
|
|
3901
3961
|
/** Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the animation. */
|
|
3902
3962
|
export interface InlineQueryResultCachedMpeg4Gif {
|
|
3903
3963
|
/** Type of the result, must be _mpeg4\_gif_ */
|
|
3904
|
-
type:
|
|
3964
|
+
type: 'mpeg4_gif'
|
|
3905
3965
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3906
3966
|
id: string
|
|
3907
3967
|
/** A valid file identifier for the MPEG4 file */
|
|
@@ -3911,7 +3971,7 @@ export declare namespace Types {
|
|
|
3911
3971
|
/** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
|
|
3912
3972
|
caption?: string
|
|
3913
3973
|
/** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3914
|
-
parse_mode?:
|
|
3974
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3915
3975
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3916
3976
|
caption_entities?: Array<Types.MessageEntity>
|
|
3917
3977
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3925,7 +3985,7 @@ export declare namespace Types {
|
|
|
3925
3985
|
/** Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the sticker. */
|
|
3926
3986
|
export interface InlineQueryResultCachedSticker {
|
|
3927
3987
|
/** Type of the result, must be _sticker_ */
|
|
3928
|
-
type:
|
|
3988
|
+
type: 'sticker'
|
|
3929
3989
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3930
3990
|
id: string
|
|
3931
3991
|
/** A valid file identifier of the sticker */
|
|
@@ -3939,7 +3999,7 @@ export declare namespace Types {
|
|
|
3939
3999
|
/** Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the file. */
|
|
3940
4000
|
export interface InlineQueryResultCachedDocument {
|
|
3941
4001
|
/** Type of the result, must be _document_ */
|
|
3942
|
-
type:
|
|
4002
|
+
type: 'document'
|
|
3943
4003
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3944
4004
|
id: string
|
|
3945
4005
|
/** Title for the result */
|
|
@@ -3951,7 +4011,7 @@ export declare namespace Types {
|
|
|
3951
4011
|
/** Caption of the document to be sent, 0-1024 characters after entities parsing */
|
|
3952
4012
|
caption?: string
|
|
3953
4013
|
/** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3954
|
-
parse_mode?:
|
|
4014
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3955
4015
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3956
4016
|
caption_entities?: Array<Types.MessageEntity>
|
|
3957
4017
|
/** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
|
|
@@ -3963,7 +4023,7 @@ export declare namespace Types {
|
|
|
3963
4023
|
/** Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the video. */
|
|
3964
4024
|
export interface InlineQueryResultCachedVideo {
|
|
3965
4025
|
/** Type of the result, must be _video_ */
|
|
3966
|
-
type:
|
|
4026
|
+
type: 'video'
|
|
3967
4027
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3968
4028
|
id: string
|
|
3969
4029
|
/** A valid file identifier for the video file */
|
|
@@ -3975,7 +4035,7 @@ export declare namespace Types {
|
|
|
3975
4035
|
/** Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
3976
4036
|
caption?: string
|
|
3977
4037
|
/** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
3978
|
-
parse_mode?:
|
|
4038
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
3979
4039
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
3980
4040
|
caption_entities?: Array<Types.MessageEntity>
|
|
3981
4041
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -3989,7 +4049,7 @@ export declare namespace Types {
|
|
|
3989
4049
|
/** Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the voice message. */
|
|
3990
4050
|
export interface InlineQueryResultCachedVoice {
|
|
3991
4051
|
/** Type of the result, must be _voice_ */
|
|
3992
|
-
type:
|
|
4052
|
+
type: 'voice'
|
|
3993
4053
|
/** Unique identifier for this result, 1-64 bytes */
|
|
3994
4054
|
id: string
|
|
3995
4055
|
/** A valid file identifier for the voice message */
|
|
@@ -3999,7 +4059,7 @@ export declare namespace Types {
|
|
|
3999
4059
|
/** Caption, 0-1024 characters after entities parsing */
|
|
4000
4060
|
caption?: string
|
|
4001
4061
|
/** Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4002
|
-
parse_mode?:
|
|
4062
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4003
4063
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
4004
4064
|
caption_entities?: Array<Types.MessageEntity>
|
|
4005
4065
|
/** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
|
|
@@ -4011,7 +4071,7 @@ export declare namespace Types {
|
|
|
4011
4071
|
/** Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the audio. */
|
|
4012
4072
|
export interface InlineQueryResultCachedAudio {
|
|
4013
4073
|
/** Type of the result, must be _audio_ */
|
|
4014
|
-
type:
|
|
4074
|
+
type: 'audio'
|
|
4015
4075
|
/** Unique identifier for this result, 1-64 bytes */
|
|
4016
4076
|
id: string
|
|
4017
4077
|
/** A valid file identifier for the audio file */
|
|
@@ -4019,7 +4079,7 @@ export declare namespace Types {
|
|
|
4019
4079
|
/** Caption, 0-1024 characters after entities parsing */
|
|
4020
4080
|
caption?: string
|
|
4021
4081
|
/** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4022
|
-
parse_mode?:
|
|
4082
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4023
4083
|
/** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
4024
4084
|
caption_entities?: Array<Types.MessageEntity>
|
|
4025
4085
|
/** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
|
|
@@ -4044,7 +4104,7 @@ export declare namespace Types {
|
|
|
4044
4104
|
/** Text of the message to be sent, 1-4096 characters */
|
|
4045
4105
|
message_text: string
|
|
4046
4106
|
/** Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4047
|
-
parse_mode?:
|
|
4107
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4048
4108
|
/** List of special entities that appear in message text, which can be specified instead of _parse\_mode_ */
|
|
4049
4109
|
entities?: Array<Types.MessageEntity>
|
|
4050
4110
|
/** Link preview generation options for the message */
|
|
@@ -4262,7 +4322,7 @@ export declare namespace Types {
|
|
|
4262
4322
|
/** This object contains basic information about a refunded payment. */
|
|
4263
4323
|
export interface RefundedPayment {
|
|
4264
4324
|
/** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code, or “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90). Currently, always “XTR” */
|
|
4265
|
-
currency:
|
|
4325
|
+
currency: 'XTR'
|
|
4266
4326
|
/** Total refunded price in the _smallest units_ of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45`, `total_amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
|
|
4267
4327
|
total_amount: number
|
|
4268
4328
|
/** Bot-specified invoice payload */
|
|
@@ -4323,13 +4383,13 @@ export declare namespace Types {
|
|
|
4323
4383
|
/** The withdrawal is in progress. */
|
|
4324
4384
|
export interface RevenueWithdrawalStatePending {
|
|
4325
4385
|
/** Type of the state, always “pending” */
|
|
4326
|
-
type:
|
|
4386
|
+
type: 'pending'
|
|
4327
4387
|
}
|
|
4328
4388
|
|
|
4329
4389
|
/** The withdrawal succeeded. */
|
|
4330
4390
|
export interface RevenueWithdrawalStateSucceeded {
|
|
4331
4391
|
/** Type of the state, always “succeeded” */
|
|
4332
|
-
type:
|
|
4392
|
+
type: 'succeeded'
|
|
4333
4393
|
/** Date the withdrawal was completed in Unix time */
|
|
4334
4394
|
date: number
|
|
4335
4395
|
/** An HTTPS URL that can be used to see transaction details */
|
|
@@ -4339,7 +4399,7 @@ export declare namespace Types {
|
|
|
4339
4399
|
/** The withdrawal failed and the transaction was refunded. */
|
|
4340
4400
|
export interface RevenueWithdrawalStateFailed {
|
|
4341
4401
|
/** Type of the state, always “failed” */
|
|
4342
|
-
type:
|
|
4402
|
+
type: 'failed'
|
|
4343
4403
|
}
|
|
4344
4404
|
|
|
4345
4405
|
/** Contains information about the affiliate that received a commission via this transaction. */
|
|
@@ -4372,9 +4432,9 @@ export declare namespace Types {
|
|
|
4372
4432
|
/** Describes a transaction with a user. */
|
|
4373
4433
|
export interface TransactionPartnerUser {
|
|
4374
4434
|
/** Type of the transaction partner, always “user” */
|
|
4375
|
-
type:
|
|
4435
|
+
type: 'user'
|
|
4376
4436
|
/** Type of the transaction, currently one of “invoice\_payment” for payments via invoices, “paid\_media\_payment” for payments for paid media, “gift\_purchase” for gifts sent by the bot, “premium\_purchase” for Telegram Premium subscriptions gifted by the bot, “business\_account\_transfer” for direct transfers from managed business accounts */
|
|
4377
|
-
transaction_type:
|
|
4437
|
+
transaction_type: 'invoice_payment' | 'paid_media_payment' | 'gift_purchase' | 'premium_purchase' | 'business_account_transfer'
|
|
4378
4438
|
/** Information about the user */
|
|
4379
4439
|
user: Types.User
|
|
4380
4440
|
/** Information about the affiliate that received a commission via this transaction. Can be available only for “invoice\_payment” and “paid\_media\_payment” transactions. */
|
|
@@ -4396,7 +4456,7 @@ export declare namespace Types {
|
|
|
4396
4456
|
/** Describes a transaction with a chat. */
|
|
4397
4457
|
export interface TransactionPartnerChat {
|
|
4398
4458
|
/** Type of the transaction partner, always “chat” */
|
|
4399
|
-
type:
|
|
4459
|
+
type: 'chat'
|
|
4400
4460
|
/** Information about the chat */
|
|
4401
4461
|
chat: Types.Chat
|
|
4402
4462
|
/** The gift sent to the chat by the bot */
|
|
@@ -4406,7 +4466,7 @@ export declare namespace Types {
|
|
|
4406
4466
|
/** Describes the affiliate program that issued the affiliate commission received via this transaction. */
|
|
4407
4467
|
export interface TransactionPartnerAffiliateProgram {
|
|
4408
4468
|
/** Type of the transaction partner, always “affiliate\_program” */
|
|
4409
|
-
type:
|
|
4469
|
+
type: 'affiliate_program'
|
|
4410
4470
|
/** Information about the bot that sponsored the affiliate program */
|
|
4411
4471
|
sponsor_user?: Types.User
|
|
4412
4472
|
/** The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users */
|
|
@@ -4416,7 +4476,7 @@ export declare namespace Types {
|
|
|
4416
4476
|
/** Describes a withdrawal transaction with Fragment. */
|
|
4417
4477
|
export interface TransactionPartnerFragment {
|
|
4418
4478
|
/** Type of the transaction partner, always “fragment” */
|
|
4419
|
-
type:
|
|
4479
|
+
type: 'fragment'
|
|
4420
4480
|
/** State of the transaction if the transaction is outgoing */
|
|
4421
4481
|
withdrawal_state?: Types.RevenueWithdrawalState
|
|
4422
4482
|
}
|
|
@@ -4424,13 +4484,13 @@ export declare namespace Types {
|
|
|
4424
4484
|
/** Describes a withdrawal transaction to the Telegram Ads platform. */
|
|
4425
4485
|
export interface TransactionPartnerTelegramAds {
|
|
4426
4486
|
/** Type of the transaction partner, always “telegram\_ads” */
|
|
4427
|
-
type:
|
|
4487
|
+
type: 'telegram_ads'
|
|
4428
4488
|
}
|
|
4429
4489
|
|
|
4430
4490
|
/** Describes a transaction with payment for [paid broadcasting](https://core.telegram.org/bots/api#paid-broadcasts). */
|
|
4431
4491
|
export interface TransactionPartnerTelegramApi {
|
|
4432
4492
|
/** Type of the transaction partner, always “telegram\_api” */
|
|
4433
|
-
type:
|
|
4493
|
+
type: 'telegram_api'
|
|
4434
4494
|
/** The number of successful requests that exceeded regular limits and were therefore billed */
|
|
4435
4495
|
request_count: number
|
|
4436
4496
|
}
|
|
@@ -4438,7 +4498,7 @@ export declare namespace Types {
|
|
|
4438
4498
|
/** Describes a transaction with an unknown source or recipient. */
|
|
4439
4499
|
export interface TransactionPartnerOther {
|
|
4440
4500
|
/** Type of the transaction partner, always “other” */
|
|
4441
|
-
type:
|
|
4501
|
+
type: 'other'
|
|
4442
4502
|
}
|
|
4443
4503
|
|
|
4444
4504
|
/** Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control. */
|
|
@@ -4486,7 +4546,7 @@ export declare namespace Types {
|
|
|
4486
4546
|
/** Describes documents or other Telegram Passport elements shared with the bot by the user. */
|
|
4487
4547
|
export interface EncryptedPassportElement {
|
|
4488
4548
|
/** Element type. One of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”, “phone\_number”, “email”. */
|
|
4489
|
-
type:
|
|
4549
|
+
type: 'personal_details' | 'passport' | 'driver_license' | 'identity_card' | 'internal_passport' | 'address' | 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration' | 'phone_number' | 'email'
|
|
4490
4550
|
/** Base64-encoded encrypted Telegram Passport element data provided by the user; available only for “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport” and “address” types. Can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials). */
|
|
4491
4551
|
data?: string
|
|
4492
4552
|
/** User's verified phone number; available only for “phone\_number” type */
|
|
@@ -4535,9 +4595,9 @@ export declare namespace Types {
|
|
|
4535
4595
|
/** Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. */
|
|
4536
4596
|
export interface PassportElementErrorDataField {
|
|
4537
4597
|
/** Error source, must be _data_ */
|
|
4538
|
-
source:
|
|
4598
|
+
source: 'data'
|
|
4539
4599
|
/** The section of the user's Telegram Passport which has the error, one of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address” */
|
|
4540
|
-
type:
|
|
4600
|
+
type: 'personal_details' | 'passport' | 'driver_license' | 'identity_card' | 'internal_passport' | 'address'
|
|
4541
4601
|
/** Name of the data field which has the error */
|
|
4542
4602
|
field_name: string
|
|
4543
4603
|
/** Base64-encoded data hash */
|
|
@@ -4549,9 +4609,9 @@ export declare namespace Types {
|
|
|
4549
4609
|
/** Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. */
|
|
4550
4610
|
export interface PassportElementErrorFrontSide {
|
|
4551
4611
|
/** Error source, must be _front\_side_ */
|
|
4552
|
-
source:
|
|
4612
|
+
source: 'front_side'
|
|
4553
4613
|
/** The section of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport” */
|
|
4554
|
-
type:
|
|
4614
|
+
type: 'passport' | 'driver_license' | 'identity_card' | 'internal_passport'
|
|
4555
4615
|
/** Base64-encoded hash of the file with the front side of the document */
|
|
4556
4616
|
file_hash: string
|
|
4557
4617
|
/** Error message */
|
|
@@ -4561,9 +4621,9 @@ export declare namespace Types {
|
|
|
4561
4621
|
/** Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. */
|
|
4562
4622
|
export interface PassportElementErrorReverseSide {
|
|
4563
4623
|
/** Error source, must be _reverse\_side_ */
|
|
4564
|
-
source:
|
|
4624
|
+
source: 'reverse_side'
|
|
4565
4625
|
/** The section of the user's Telegram Passport which has the issue, one of “driver\_license”, “identity\_card” */
|
|
4566
|
-
type:
|
|
4626
|
+
type: 'driver_license' | 'identity_card'
|
|
4567
4627
|
/** Base64-encoded hash of the file with the reverse side of the document */
|
|
4568
4628
|
file_hash: string
|
|
4569
4629
|
/** Error message */
|
|
@@ -4573,9 +4633,9 @@ export declare namespace Types {
|
|
|
4573
4633
|
/** Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. */
|
|
4574
4634
|
export interface PassportElementErrorSelfie {
|
|
4575
4635
|
/** Error source, must be _selfie_ */
|
|
4576
|
-
source:
|
|
4636
|
+
source: 'selfie'
|
|
4577
4637
|
/** The section of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport” */
|
|
4578
|
-
type:
|
|
4638
|
+
type: 'passport' | 'driver_license' | 'identity_card' | 'internal_passport'
|
|
4579
4639
|
/** Base64-encoded hash of the file with the selfie */
|
|
4580
4640
|
file_hash: string
|
|
4581
4641
|
/** Error message */
|
|
@@ -4585,9 +4645,9 @@ export declare namespace Types {
|
|
|
4585
4645
|
/** Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. */
|
|
4586
4646
|
export interface PassportElementErrorFile {
|
|
4587
4647
|
/** Error source, must be _file_ */
|
|
4588
|
-
source:
|
|
4648
|
+
source: 'file'
|
|
4589
4649
|
/** The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
|
|
4590
|
-
type:
|
|
4650
|
+
type: 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration'
|
|
4591
4651
|
/** Base64-encoded file hash */
|
|
4592
4652
|
file_hash: string
|
|
4593
4653
|
/** Error message */
|
|
@@ -4597,9 +4657,9 @@ export declare namespace Types {
|
|
|
4597
4657
|
/** Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. */
|
|
4598
4658
|
export interface PassportElementErrorFiles {
|
|
4599
4659
|
/** Error source, must be _files_ */
|
|
4600
|
-
source:
|
|
4660
|
+
source: 'files'
|
|
4601
4661
|
/** The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
|
|
4602
|
-
type:
|
|
4662
|
+
type: 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration'
|
|
4603
4663
|
/** List of base64-encoded file hashes */
|
|
4604
4664
|
file_hashes: Array<string>
|
|
4605
4665
|
/** Error message */
|
|
@@ -4609,9 +4669,9 @@ export declare namespace Types {
|
|
|
4609
4669
|
/** Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. */
|
|
4610
4670
|
export interface PassportElementErrorTranslationFile {
|
|
4611
4671
|
/** Error source, must be _translation\_file_ */
|
|
4612
|
-
source:
|
|
4672
|
+
source: 'translation_file'
|
|
4613
4673
|
/** Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
|
|
4614
|
-
type:
|
|
4674
|
+
type: 'passport' | 'driver_license' | 'identity_card' | 'internal_passport' | 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration'
|
|
4615
4675
|
/** Base64-encoded file hash */
|
|
4616
4676
|
file_hash: string
|
|
4617
4677
|
/** Error message */
|
|
@@ -4621,9 +4681,9 @@ export declare namespace Types {
|
|
|
4621
4681
|
/** Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. */
|
|
4622
4682
|
export interface PassportElementErrorTranslationFiles {
|
|
4623
4683
|
/** Error source, must be _translation\_files_ */
|
|
4624
|
-
source:
|
|
4684
|
+
source: 'translation_files'
|
|
4625
4685
|
/** Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
|
|
4626
|
-
type:
|
|
4686
|
+
type: 'passport' | 'driver_license' | 'identity_card' | 'internal_passport' | 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration'
|
|
4627
4687
|
/** List of base64-encoded file hashes */
|
|
4628
4688
|
file_hashes: Array<string>
|
|
4629
4689
|
/** Error message */
|
|
@@ -4633,7 +4693,7 @@ export declare namespace Types {
|
|
|
4633
4693
|
/** Represents an issue in an unspecified place. The error is considered resolved when new data is added. */
|
|
4634
4694
|
export interface PassportElementErrorUnspecified {
|
|
4635
4695
|
/** Error source, must be _unspecified_ */
|
|
4636
|
-
source:
|
|
4696
|
+
source: 'unspecified'
|
|
4637
4697
|
/** Type of element of the user's Telegram Passport which has the issue */
|
|
4638
4698
|
type: string
|
|
4639
4699
|
/** Base64-encoded element hash */
|
|
@@ -4728,7 +4788,7 @@ export interface MethodParams {
|
|
|
4728
4788
|
/** Text of the message to be sent, 1-4096 characters after entities parsing */
|
|
4729
4789
|
text: string
|
|
4730
4790
|
/** Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4731
|
-
parse_mode?:
|
|
4791
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4732
4792
|
/** An array of special entities that appear in message text, which can be specified instead of _parse\_mode_ */
|
|
4733
4793
|
entities?: Array<Types.MessageEntity>
|
|
4734
4794
|
/** Link preview generation options for the message */
|
|
@@ -4802,7 +4862,7 @@ export interface MethodParams {
|
|
|
4802
4862
|
/** New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept */
|
|
4803
4863
|
caption?: string
|
|
4804
4864
|
/** Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4805
|
-
parse_mode?:
|
|
4865
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4806
4866
|
/** An array of special entities that appear in the new caption, which can be specified instead of _parse\_mode_ */
|
|
4807
4867
|
caption_entities?: Array<Types.MessageEntity>
|
|
4808
4868
|
/** Pass _True_, if the caption must be shown above the message media. Ignored if a new caption isn't specified. */
|
|
@@ -4854,7 +4914,7 @@ export interface MethodParams {
|
|
|
4854
4914
|
/** Photo caption (may also be used when resending photos by _file\_id_), 0-1024 characters after entities parsing */
|
|
4855
4915
|
caption?: string
|
|
4856
4916
|
/** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4857
|
-
parse_mode?:
|
|
4917
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4858
4918
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
4859
4919
|
caption_entities?: Array<Types.MessageEntity>
|
|
4860
4920
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -4890,7 +4950,7 @@ export interface MethodParams {
|
|
|
4890
4950
|
/** Audio caption, 0-1024 characters after entities parsing */
|
|
4891
4951
|
caption?: string
|
|
4892
4952
|
/** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4893
|
-
parse_mode?:
|
|
4953
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4894
4954
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
4895
4955
|
caption_entities?: Array<Types.MessageEntity>
|
|
4896
4956
|
/** Duration of the audio in seconds */
|
|
@@ -4932,7 +4992,7 @@ export interface MethodParams {
|
|
|
4932
4992
|
/** Document caption (may also be used when resending documents by _file\_id_), 0-1024 characters after entities parsing */
|
|
4933
4993
|
caption?: string
|
|
4934
4994
|
/** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4935
|
-
parse_mode?:
|
|
4995
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4936
4996
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
4937
4997
|
caption_entities?: Array<Types.MessageEntity>
|
|
4938
4998
|
/** Disables automatic server-side content type detection for files uploaded using multipart/form-data */
|
|
@@ -4978,7 +5038,7 @@ export interface MethodParams {
|
|
|
4978
5038
|
/** Video caption (may also be used when resending videos by _file\_id_), 0-1024 characters after entities parsing */
|
|
4979
5039
|
caption?: string
|
|
4980
5040
|
/** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
4981
|
-
parse_mode?:
|
|
5041
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
4982
5042
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
4983
5043
|
caption_entities?: Array<Types.MessageEntity>
|
|
4984
5044
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -5024,7 +5084,7 @@ export interface MethodParams {
|
|
|
5024
5084
|
/** Animation caption (may also be used when resending animation by _file\_id_), 0-1024 characters after entities parsing */
|
|
5025
5085
|
caption?: string
|
|
5026
5086
|
/** Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
5027
|
-
parse_mode?:
|
|
5087
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5028
5088
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
5029
5089
|
caption_entities?: Array<Types.MessageEntity>
|
|
5030
5090
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -5060,7 +5120,7 @@ export interface MethodParams {
|
|
|
5060
5120
|
/** Voice message caption, 0-1024 characters after entities parsing */
|
|
5061
5121
|
caption?: string
|
|
5062
5122
|
/** Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
5063
|
-
parse_mode?:
|
|
5123
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5064
5124
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
5065
5125
|
caption_entities?: Array<Types.MessageEntity>
|
|
5066
5126
|
/** Duration of the voice message in seconds */
|
|
@@ -5130,7 +5190,7 @@ export interface MethodParams {
|
|
|
5130
5190
|
/** Media caption, 0-1024 characters after entities parsing */
|
|
5131
5191
|
caption?: string
|
|
5132
5192
|
/** Mode for parsing entities in the media caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
5133
|
-
parse_mode?:
|
|
5193
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5134
5194
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
5135
5195
|
caption_entities?: Array<Types.MessageEntity>
|
|
5136
5196
|
/** Pass _True_, if the caption must be shown above the message media */
|
|
@@ -5288,7 +5348,7 @@ export interface MethodParams {
|
|
|
5288
5348
|
/** Poll question, 1-300 characters */
|
|
5289
5349
|
question: string
|
|
5290
5350
|
/** Mode for parsing entities in the question. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Currently, only custom emoji entities are allowed */
|
|
5291
|
-
question_parse_mode?:
|
|
5351
|
+
question_parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5292
5352
|
/** An array of special entities that appear in the poll question. It can be specified instead of _question\_parse\_mode_ */
|
|
5293
5353
|
question_entities?: Array<Types.MessageEntity>
|
|
5294
5354
|
/** An array of 2-12 answer options */
|
|
@@ -5296,7 +5356,7 @@ export interface MethodParams {
|
|
|
5296
5356
|
/** _True_, if the poll needs to be anonymous, defaults to _True_ */
|
|
5297
5357
|
is_anonymous?: boolean
|
|
5298
5358
|
/** Poll type, “quiz” or “regular”, defaults to “regular” */
|
|
5299
|
-
type?:
|
|
5359
|
+
type?: 'quiz' | 'regular'
|
|
5300
5360
|
/** _True_, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to _False_ */
|
|
5301
5361
|
allows_multiple_answers?: boolean
|
|
5302
5362
|
/** 0-based identifier of the correct answer option, required for polls in quiz mode */
|
|
@@ -5304,7 +5364,7 @@ export interface MethodParams {
|
|
|
5304
5364
|
/** Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing */
|
|
5305
5365
|
explanation?: string
|
|
5306
5366
|
/** Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
5307
|
-
explanation_parse_mode?:
|
|
5367
|
+
explanation_parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5308
5368
|
/** An array of special entities that appear in the poll explanation. It can be specified instead of _explanation\_parse\_mode_ */
|
|
5309
5369
|
explanation_entities?: Array<Types.MessageEntity>
|
|
5310
5370
|
/** Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with _close\_date_. */
|
|
@@ -5354,7 +5414,7 @@ export interface MethodParams {
|
|
|
5354
5414
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
5355
5415
|
direct_messages_topic_id?: number
|
|
5356
5416
|
/** Emoji on which the dice throw animation is based. Currently, must be one of “”, “”, “”, “”, “”, or “”. Dice can have values 1-6 for “”, “” and “”, values 1-5 for “” and “”, and values 1-64 for “”. Defaults to “” */
|
|
5357
|
-
emoji?:
|
|
5417
|
+
emoji?: '🎲' | '🎯' | '🏀' | '⚽' | '🎳' | '🎰'
|
|
5358
5418
|
/** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
|
|
5359
5419
|
disable_notification?: boolean
|
|
5360
5420
|
/** Protects the contents of the sent message from forwarding */
|
|
@@ -5380,7 +5440,7 @@ export interface MethodParams {
|
|
|
5380
5440
|
/** Text of the message to be sent, 1-4096 characters after entities parsing */
|
|
5381
5441
|
text: string
|
|
5382
5442
|
/** Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
5383
|
-
parse_mode?:
|
|
5443
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5384
5444
|
/** An array of special entities that appear in message text, which can be specified instead of _parse\_mode_ */
|
|
5385
5445
|
entities?: Array<Types.MessageEntity>
|
|
5386
5446
|
}
|
|
@@ -5392,7 +5452,7 @@ export interface MethodParams {
|
|
|
5392
5452
|
/** Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only */
|
|
5393
5453
|
message_thread_id?: number
|
|
5394
5454
|
/** Type of action to broadcast. Choose one, depending on what the user is about to receive: _typing_ for [text messages](https://core.telegram.org/bots/api#sendmessage), _upload\_photo_ for [photos](https://core.telegram.org/bots/api#sendphoto), _record\_video_ or _upload\_video_ for [videos](https://core.telegram.org/bots/api#sendvideo), _record\_voice_ or _upload\_voice_ for [voice notes](https://core.telegram.org/bots/api#sendvoice), _upload\_document_ for [general files](https://core.telegram.org/bots/api#senddocument), _choose\_sticker_ for [stickers](https://core.telegram.org/bots/api#sendsticker), _find\_location_ for [location data](https://core.telegram.org/bots/api#sendlocation), _record\_video\_note_ or _upload\_video\_note_ for [video notes](https://core.telegram.org/bots/api#sendvideonote). */
|
|
5395
|
-
action:
|
|
5455
|
+
action: 'typing' | 'upload_photo' | 'record_video' | 'upload_video' | 'record_voice' | 'upload_voice' | 'upload_document' | 'choose_sticker' | 'find_location' | 'record_video_note' | 'upload_video_note'
|
|
5396
5456
|
}
|
|
5397
5457
|
setMessageReaction: {
|
|
5398
5458
|
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
@@ -5412,6 +5472,14 @@ export interface MethodParams {
|
|
|
5412
5472
|
/** Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
|
|
5413
5473
|
limit?: number
|
|
5414
5474
|
}
|
|
5475
|
+
getUserProfileAudios: {
|
|
5476
|
+
/** Unique identifier of the target user */
|
|
5477
|
+
user_id: number
|
|
5478
|
+
/** Sequential number of the first audio to be returned. By default, all audios are returned. */
|
|
5479
|
+
offset?: number
|
|
5480
|
+
/** Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
|
|
5481
|
+
limit?: number
|
|
5482
|
+
}
|
|
5415
5483
|
setUserEmojiStatus: {
|
|
5416
5484
|
/** Unique identifier of the target user */
|
|
5417
5485
|
user_id: number
|
|
@@ -5556,7 +5624,7 @@ export interface MethodParams {
|
|
|
5556
5624
|
/** Invite link name; 0-32 characters */
|
|
5557
5625
|
name?: string
|
|
5558
5626
|
/** The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days). */
|
|
5559
|
-
subscription_period:
|
|
5627
|
+
subscription_period: 2592000
|
|
5560
5628
|
/** The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000 */
|
|
5561
5629
|
subscription_price: number
|
|
5562
5630
|
}
|
|
@@ -5669,7 +5737,7 @@ export interface MethodParams {
|
|
|
5669
5737
|
/** Topic name, 1-128 characters */
|
|
5670
5738
|
name: string
|
|
5671
5739
|
/** Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F) */
|
|
5672
|
-
icon_color?:
|
|
5740
|
+
icon_color?: 7322096 | 16766590 | 13338331 | 9367192 | 16749490 | 16478047
|
|
5673
5741
|
/** Unique identifier of the custom emoji shown as the topic icon. Use [getForumTopicIconStickers](https://core.telegram.org/bots/api#getforumtopiciconstickers) to get all allowed custom emoji identifiers. */
|
|
5674
5742
|
icon_custom_emoji_id?: string
|
|
5675
5743
|
}
|
|
@@ -5809,6 +5877,11 @@ export interface MethodParams {
|
|
|
5809
5877
|
/** A two-letter ISO 639-1 language code or an empty string */
|
|
5810
5878
|
language_code?: string
|
|
5811
5879
|
}
|
|
5880
|
+
setMyProfilePhoto: {
|
|
5881
|
+
/** The new profile photo to set */
|
|
5882
|
+
photo: Types.InputProfilePhoto
|
|
5883
|
+
}
|
|
5884
|
+
removeMyProfilePhoto: void | Record<string, never>
|
|
5812
5885
|
setChatMenuButton: void | {
|
|
5813
5886
|
/** Unique identifier for the target private chat. If not specified, default bot's menu button will be changed */
|
|
5814
5887
|
chat_id?: number
|
|
@@ -5842,7 +5915,7 @@ export interface MethodParams {
|
|
|
5842
5915
|
/** Text that will be shown along with the gift; 0-128 characters */
|
|
5843
5916
|
text?: string
|
|
5844
5917
|
/** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
|
|
5845
|
-
text_parse_mode?:
|
|
5918
|
+
text_parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5846
5919
|
/** An array of special entities that appear in the gift text. It can be specified instead of _text\_parse\_mode_. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
|
|
5847
5920
|
text_entities?: Array<Types.MessageEntity>
|
|
5848
5921
|
}
|
|
@@ -5850,13 +5923,13 @@ export interface MethodParams {
|
|
|
5850
5923
|
/** Unique identifier of the target user who will receive a Telegram Premium subscription */
|
|
5851
5924
|
user_id: number
|
|
5852
5925
|
/** Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12 */
|
|
5853
|
-
month_count:
|
|
5926
|
+
month_count: 3 | 6 | 12
|
|
5854
5927
|
/** Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months */
|
|
5855
|
-
star_count:
|
|
5928
|
+
star_count: 1000 | 1500 | 2500
|
|
5856
5929
|
/** Text that will be shown along with the service message about the subscription; 0-128 characters */
|
|
5857
5930
|
text?: string
|
|
5858
5931
|
/** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
|
|
5859
|
-
text_parse_mode?:
|
|
5932
|
+
text_parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
5860
5933
|
/** An array of special entities that appear in the gift text. It can be specified instead of _text\_parse\_mode_. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
|
|
5861
5934
|
text_entities?: Array<Types.MessageEntity>
|
|
5862
5935
|
}
|
|
@@ -6046,11 +6119,11 @@ export interface MethodParams {
|
|
|
6046
6119
|
/** Content of the story */
|
|
6047
6120
|
content: Types.InputStoryContent
|
|
6048
6121
|
/** Period after which the story is moved to the archive, in seconds; must be one of `6 * 3600`, `12 * 3600`, `86400`, or `2 * 86400` */
|
|
6049
|
-
active_period:
|
|
6122
|
+
active_period: 21600 | 43200 | 86400 | 172800
|
|
6050
6123
|
/** Caption of the story, 0-2048 characters after entities parsing */
|
|
6051
6124
|
caption?: string
|
|
6052
6125
|
/** Mode for parsing entities in the story caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
6053
|
-
parse_mode?:
|
|
6126
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
6054
6127
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
6055
6128
|
caption_entities?: Array<Types.MessageEntity>
|
|
6056
6129
|
/** An array of clickable areas to be shown on the story */
|
|
@@ -6068,7 +6141,7 @@ export interface MethodParams {
|
|
|
6068
6141
|
/** Unique identifier of the story that should be reposted */
|
|
6069
6142
|
from_story_id: number
|
|
6070
6143
|
/** Period after which the story is moved to the archive, in seconds; must be one of `6 * 3600`, `12 * 3600`, `86400`, or `2 * 86400` */
|
|
6071
|
-
active_period:
|
|
6144
|
+
active_period: 21600 | 43200 | 86400 | 172800
|
|
6072
6145
|
/** Pass _True_ to keep the story accessible after it expires */
|
|
6073
6146
|
post_to_chat_page?: boolean
|
|
6074
6147
|
/** Pass _True_ if the content of the story must be protected from forwarding and screenshotting */
|
|
@@ -6084,7 +6157,7 @@ export interface MethodParams {
|
|
|
6084
6157
|
/** Caption of the story, 0-2048 characters after entities parsing */
|
|
6085
6158
|
caption?: string
|
|
6086
6159
|
/** Mode for parsing entities in the story caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
6087
|
-
parse_mode?:
|
|
6160
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
6088
6161
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
6089
6162
|
caption_entities?: Array<Types.MessageEntity>
|
|
6090
6163
|
/** An array of clickable areas to be shown on the story */
|
|
@@ -6108,7 +6181,7 @@ export interface MethodParams {
|
|
|
6108
6181
|
/** New text of the message, 1-4096 characters after entities parsing */
|
|
6109
6182
|
text: string
|
|
6110
6183
|
/** Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
6111
|
-
parse_mode?:
|
|
6184
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
6112
6185
|
/** An array of special entities that appear in message text, which can be specified instead of _parse\_mode_ */
|
|
6113
6186
|
entities?: Array<Types.MessageEntity>
|
|
6114
6187
|
/** Link preview generation options for the message */
|
|
@@ -6128,7 +6201,7 @@ export interface MethodParams {
|
|
|
6128
6201
|
/** New caption of the message, 0-1024 characters after entities parsing */
|
|
6129
6202
|
caption?: string
|
|
6130
6203
|
/** Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
|
|
6131
|
-
parse_mode?:
|
|
6204
|
+
parse_mode?: 'HTML' | 'MarkdownV2' | 'Markdown'
|
|
6132
6205
|
/** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
|
|
6133
6206
|
caption_entities?: Array<Types.MessageEntity>
|
|
6134
6207
|
/** Pass _True_, if the caption must be shown above the message media. Supported only for animation, photo and video messages. */
|
|
@@ -6290,7 +6363,7 @@ export interface MethodParams {
|
|
|
6290
6363
|
/** A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See [](https://core.telegram.org/stickers)[https://core.telegram.org/stickers](https://core.telegram.org/stickers) for technical requirements. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
|
|
6291
6364
|
sticker: InputFile
|
|
6292
6365
|
/** Format of the sticker, must be one of “static”, “animated”, “video” */
|
|
6293
|
-
sticker_format:
|
|
6366
|
+
sticker_format: 'static' | 'animated' | 'video'
|
|
6294
6367
|
}
|
|
6295
6368
|
createNewStickerSet: {
|
|
6296
6369
|
/** User identifier of created sticker set owner */
|
|
@@ -6302,7 +6375,7 @@ export interface MethodParams {
|
|
|
6302
6375
|
/** An array of 1-50 initial stickers to be added to the sticker set */
|
|
6303
6376
|
stickers: Array<Types.InputSticker>
|
|
6304
6377
|
/** Type of stickers in the set, pass “regular”, “mask”, or “custom\_emoji”. By default, a regular sticker set is created. */
|
|
6305
|
-
sticker_type?:
|
|
6378
|
+
sticker_type?: 'regular' | 'mask' | 'custom_emoji'
|
|
6306
6379
|
/** Pass _True_ if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only */
|
|
6307
6380
|
needs_repainting?: boolean
|
|
6308
6381
|
}
|
|
@@ -6366,7 +6439,7 @@ export interface MethodParams {
|
|
|
6366
6439
|
/** 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#animation-requirements)[https://core.telegram.org/stickers#animation-requirements](https://core.telegram.org/stickers#animation-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-requirements)[https://core.telegram.org/stickers#video-requirements](https://core.telegram.org/stickers#video-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 »](https://core.telegram.org/bots/api#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. */
|
|
6367
6440
|
thumbnail?: InputFile | string
|
|
6368
6441
|
/** 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 */
|
|
6369
|
-
format:
|
|
6442
|
+
format: 'static' | 'animated' | 'video'
|
|
6370
6443
|
}
|
|
6371
6444
|
setCustomEmojiStickerSetThumbnail: {
|
|
6372
6445
|
/** Sticker set name */
|
|
@@ -6492,7 +6565,7 @@ export interface MethodParams {
|
|
|
6492
6565
|
/** Price breakdown, an array of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in [Telegram Stars](https://t.me/BotNews/90). */
|
|
6493
6566
|
prices: Array<Types.LabeledPrice>
|
|
6494
6567
|
/** The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars. */
|
|
6495
|
-
subscription_period?:
|
|
6568
|
+
subscription_period?: 2592000
|
|
6496
6569
|
/** 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](https://core.telegram.org/bots/payments/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](https://t.me/BotNews/90). */
|
|
6497
6570
|
max_tip_amount?: number
|
|
6498
6571
|
/** 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_. */
|
|
@@ -6649,6 +6722,7 @@ export interface MethodResults {
|
|
|
6649
6722
|
sendChatAction: true
|
|
6650
6723
|
setMessageReaction: true
|
|
6651
6724
|
getUserProfilePhotos: Types.UserProfilePhotos
|
|
6725
|
+
getUserProfileAudios: Types.UserProfileAudios
|
|
6652
6726
|
setUserEmojiStatus: true
|
|
6653
6727
|
getFile: Types.File
|
|
6654
6728
|
banChatMember: true
|
|
@@ -6706,6 +6780,8 @@ export interface MethodResults {
|
|
|
6706
6780
|
getMyDescription: Types.BotDescription
|
|
6707
6781
|
setMyShortDescription: true
|
|
6708
6782
|
getMyShortDescription: Types.BotShortDescription
|
|
6783
|
+
setMyProfilePhoto: true
|
|
6784
|
+
removeMyProfilePhoto: true
|
|
6709
6785
|
setChatMenuButton: true
|
|
6710
6786
|
getChatMenuButton: Types.MenuButton
|
|
6711
6787
|
setMyDefaultAdministratorRights: true
|