@grammyjs/types 2.5.1 → 2.7.1
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/LICENSE +1 -1
- package/index.d.ts +2 -1
- package/inline.d.ts +7 -84
- package/manage.d.ts +44 -12
- package/{callback.d.ts → markup.d.ts} +118 -24
- package/{bot-command-scope.d.ts → menu-button.d.ts} +35 -0
- package/message.d.ts +83 -77
- package/package.json +1 -1
- package/passport.d.ts +17 -17
- package/proxied.d.ts +80 -36
- package/update.d.ts +1 -1
package/proxied.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { BotCommandScope } from "./
|
|
1
|
+
import { BotCommandScope, MenuButton } from "./menu-button";
|
|
2
2
|
import {
|
|
3
3
|
ForceReply,
|
|
4
|
+
InlineKeyboardMarkup,
|
|
4
5
|
ReplyKeyboardMarkup,
|
|
5
6
|
ReplyKeyboardRemove,
|
|
6
|
-
} from "./
|
|
7
|
-
import {
|
|
7
|
+
} from "./markup";
|
|
8
|
+
import { InlineQueryResult } from "./inline";
|
|
8
9
|
import {
|
|
9
10
|
BotCommand,
|
|
11
|
+
ChatAdministratorRights,
|
|
10
12
|
ChatFromGetChat,
|
|
11
13
|
ChatInviteLink,
|
|
12
14
|
ChatMember,
|
|
@@ -24,6 +26,7 @@ import {
|
|
|
24
26
|
MessageId,
|
|
25
27
|
ParseMode,
|
|
26
28
|
Poll,
|
|
29
|
+
SentWebAppMessage,
|
|
27
30
|
StickerSet,
|
|
28
31
|
} from "./message";
|
|
29
32
|
import { PassportElementError } from "./passport";
|
|
@@ -42,7 +45,8 @@ export interface InputFileProxy<F> {
|
|
|
42
45
|
[M in keyof InputFileProxy<F>["Telegram"]]: Params<
|
|
43
46
|
M,
|
|
44
47
|
F
|
|
45
|
-
>[0] extends undefined
|
|
48
|
+
>[0] extends undefined
|
|
49
|
+
? {}
|
|
46
50
|
: NonNullable<Params<M, F>[0]>;
|
|
47
51
|
};
|
|
48
52
|
|
|
@@ -60,7 +64,7 @@ export interface InputFileProxy<F> {
|
|
|
60
64
|
limit?: number;
|
|
61
65
|
/** Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. */
|
|
62
66
|
timeout?: number;
|
|
63
|
-
/** A list of the update types you want your bot to receive. For example, specify [
|
|
67
|
+
/** A list of the update types you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
|
|
64
68
|
|
|
65
69
|
Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. */
|
|
66
70
|
allowed_updates?: readonly string[];
|
|
@@ -85,7 +89,7 @@ export interface InputFileProxy<F> {
|
|
|
85
89
|
ip_address?: string;
|
|
86
90
|
/** Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. */
|
|
87
91
|
max_connections?: number;
|
|
88
|
-
/** A list of the update types you want your bot to receive. For example, specify [
|
|
92
|
+
/** A list of the update types you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
|
|
89
93
|
Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time. */
|
|
90
94
|
allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
|
|
91
95
|
/** Pass True to drop all pending updates */
|
|
@@ -230,7 +234,7 @@ export interface InputFileProxy<F> {
|
|
|
230
234
|
performer?: string;
|
|
231
235
|
/** Track name */
|
|
232
236
|
title?: string;
|
|
233
|
-
/** 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
|
|
237
|
+
/** 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>. */
|
|
234
238
|
thumb?: F;
|
|
235
239
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
236
240
|
disable_notification?: boolean;
|
|
@@ -254,7 +258,7 @@ export interface InputFileProxy<F> {
|
|
|
254
258
|
chat_id: number | string;
|
|
255
259
|
/** File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
|
|
256
260
|
document: F | string;
|
|
257
|
-
/** 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
|
|
261
|
+
/** 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>. */
|
|
258
262
|
thumb?: F;
|
|
259
263
|
/** Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing */
|
|
260
264
|
caption?: string;
|
|
@@ -292,7 +296,7 @@ export interface InputFileProxy<F> {
|
|
|
292
296
|
width?: number;
|
|
293
297
|
/** Video height */
|
|
294
298
|
height?: number;
|
|
295
|
-
/** 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
|
|
299
|
+
/** 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>. */
|
|
296
300
|
thumb?: F;
|
|
297
301
|
/** Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing */
|
|
298
302
|
caption?: string;
|
|
@@ -330,7 +334,7 @@ export interface InputFileProxy<F> {
|
|
|
330
334
|
width?: number;
|
|
331
335
|
/** Animation height */
|
|
332
336
|
height?: number;
|
|
333
|
-
/** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass
|
|
337
|
+
/** 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>. */
|
|
334
338
|
thumb?: F;
|
|
335
339
|
/** Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing */
|
|
336
340
|
caption?: string;
|
|
@@ -395,7 +399,7 @@ export interface InputFileProxy<F> {
|
|
|
395
399
|
duration?: number;
|
|
396
400
|
/** Video width and height, i.e. diameter of the video message */
|
|
397
401
|
length?: number;
|
|
398
|
-
/**
|
|
402
|
+
/** 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>. */
|
|
399
403
|
thumb?: F;
|
|
400
404
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
401
405
|
disable_notification?: boolean;
|
|
@@ -519,7 +523,7 @@ export interface InputFileProxy<F> {
|
|
|
519
523
|
address: string;
|
|
520
524
|
/** Foursquare identifier of the venue */
|
|
521
525
|
foursquare_id?: string;
|
|
522
|
-
/** Foursquare type of the venue, if known. (For example,
|
|
526
|
+
/** Foursquare type of the venue, if known. (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) */
|
|
523
527
|
foursquare_type?: string;
|
|
524
528
|
/** Google Places identifier of the venue */
|
|
525
529
|
google_place_id?: string;
|
|
@@ -579,7 +583,7 @@ export interface InputFileProxy<F> {
|
|
|
579
583
|
options: readonly string[];
|
|
580
584
|
/** True, if the poll needs to be anonymous, defaults to True */
|
|
581
585
|
is_anonymous?: boolean;
|
|
582
|
-
/** Poll type,
|
|
586
|
+
/** Poll type, "quiz" or "regular", defaults to "regular" */
|
|
583
587
|
type?: "quiz" | "regular";
|
|
584
588
|
/** True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False */
|
|
585
589
|
allows_multiple_answers?: boolean;
|
|
@@ -617,7 +621,7 @@ export interface InputFileProxy<F> {
|
|
|
617
621
|
sendDice(args: {
|
|
618
622
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
619
623
|
chat_id: number | string;
|
|
620
|
-
/** Emoji on which the dice throw animation is based. Currently, must be one of
|
|
624
|
+
/** 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 "🎲" */
|
|
621
625
|
emoji?: string;
|
|
622
626
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
623
627
|
disable_notification?: boolean;
|
|
@@ -637,7 +641,7 @@ export interface InputFileProxy<F> {
|
|
|
637
641
|
|
|
638
642
|
/** Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
|
|
639
643
|
|
|
640
|
-
Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of
|
|
644
|
+
Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait...", the bot may use sendChatAction with action = upload_photo. The user will see a "sending photo" status for the bot.
|
|
641
645
|
|
|
642
646
|
We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive. */
|
|
643
647
|
sendChatAction(args: {
|
|
@@ -694,7 +698,7 @@ export interface InputFileProxy<F> {
|
|
|
694
698
|
|
|
695
699
|
/** Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success. */
|
|
696
700
|
unbanChatMember(args: {
|
|
697
|
-
/** Unique identifier for the target group or username of the target supergroup or channel (in the format @
|
|
701
|
+
/** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
|
|
698
702
|
chat_id: number | string;
|
|
699
703
|
/** Unique identifier of the target user */
|
|
700
704
|
user_id: number;
|
|
@@ -730,8 +734,8 @@ export interface InputFileProxy<F> {
|
|
|
730
734
|
can_edit_messages?: boolean;
|
|
731
735
|
/** Pass True, if the administrator can delete messages of other users */
|
|
732
736
|
can_delete_messages?: boolean;
|
|
733
|
-
/** Pass True, if the administrator can manage
|
|
734
|
-
|
|
737
|
+
/** Pass True, if the administrator can manage video chats */
|
|
738
|
+
can_manage_video_chats?: boolean;
|
|
735
739
|
/** Pass True, if the administrator can restrict, ban or unban chat members */
|
|
736
740
|
can_restrict_members?: boolean;
|
|
737
741
|
/** Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) */
|
|
@@ -988,6 +992,34 @@ export interface InputFileProxy<F> {
|
|
|
988
992
|
language_code?: string;
|
|
989
993
|
}): BotCommand[];
|
|
990
994
|
|
|
995
|
+
/** Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success. */
|
|
996
|
+
setChatMenuButton(args: {
|
|
997
|
+
/** Unique identifier for the target private chat. If not specified, default bot's menu button will be changed */
|
|
998
|
+
chat_id?: number;
|
|
999
|
+
/** An object for the bot's new menu button. Defaults to MenuButtonDefault */
|
|
1000
|
+
menu_button?: MenuButton;
|
|
1001
|
+
}): true;
|
|
1002
|
+
|
|
1003
|
+
/** 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 on success. */
|
|
1004
|
+
getChatMenuButton(args: {
|
|
1005
|
+
/** Unique identifier for the target private chat. If not specified, default bot's menu button will be returned */
|
|
1006
|
+
chat_id?: number;
|
|
1007
|
+
}): MenuButton;
|
|
1008
|
+
|
|
1009
|
+
/** Use this method to the change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success. */
|
|
1010
|
+
setMyDefaultAdministratorRights(args: {
|
|
1011
|
+
/** An object describing new default administrator rights. If not specified, the default administrator rights will be cleared. */
|
|
1012
|
+
rights?: ChatAdministratorRights;
|
|
1013
|
+
/** Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. */
|
|
1014
|
+
for_channels?: boolean;
|
|
1015
|
+
}): true;
|
|
1016
|
+
|
|
1017
|
+
/** Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success. */
|
|
1018
|
+
getMyDefaultAdministratorRights(args: {
|
|
1019
|
+
/** Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. */
|
|
1020
|
+
for_channels?: boolean;
|
|
1021
|
+
}): ChatAdministratorRights;
|
|
1022
|
+
|
|
991
1023
|
/** Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. */
|
|
992
1024
|
editMessageText(args: {
|
|
993
1025
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
@@ -1084,7 +1116,7 @@ export interface InputFileProxy<F> {
|
|
|
1084
1116
|
message_id: number;
|
|
1085
1117
|
}): true;
|
|
1086
1118
|
|
|
1087
|
-
/** Use this method to send static .WEBP
|
|
1119
|
+
/** Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned. */
|
|
1088
1120
|
sendSticker(args: {
|
|
1089
1121
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1090
1122
|
chat_id: number | string;
|
|
@@ -1120,18 +1152,20 @@ export interface InputFileProxy<F> {
|
|
|
1120
1152
|
png_sticker: F;
|
|
1121
1153
|
}): File;
|
|
1122
1154
|
|
|
1123
|
-
/** Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker or
|
|
1155
|
+
/** Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success. */
|
|
1124
1156
|
createNewStickerSet(args: {
|
|
1125
1157
|
/** User identifier of created sticker set owner */
|
|
1126
1158
|
user_id: number;
|
|
1127
|
-
/** Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in
|
|
1159
|
+
/** Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>". <bot_username> is case insensitive. 1-64 characters. */
|
|
1128
1160
|
name: string;
|
|
1129
1161
|
/** Sticker set title, 1-64 characters */
|
|
1130
1162
|
title: string;
|
|
1131
1163
|
/** PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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. */
|
|
1132
1164
|
png_sticker?: F | string;
|
|
1133
|
-
/** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/
|
|
1165
|
+
/** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements */
|
|
1134
1166
|
tgs_sticker?: F;
|
|
1167
|
+
/** WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements */
|
|
1168
|
+
webm_sticker?: F;
|
|
1135
1169
|
/** One or more emoji corresponding to the sticker */
|
|
1136
1170
|
emojis: string;
|
|
1137
1171
|
/** Pass True, if a set of mask stickers should be created */
|
|
@@ -1140,7 +1174,7 @@ export interface InputFileProxy<F> {
|
|
|
1140
1174
|
mask_position?: MaskPosition;
|
|
1141
1175
|
}): true;
|
|
1142
1176
|
|
|
1143
|
-
/** Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker or
|
|
1177
|
+
/** Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success. */
|
|
1144
1178
|
addStickerToSet(args: {
|
|
1145
1179
|
/** User identifier of sticker set owner */
|
|
1146
1180
|
user_id: number;
|
|
@@ -1148,8 +1182,10 @@ export interface InputFileProxy<F> {
|
|
|
1148
1182
|
name: string;
|
|
1149
1183
|
/** PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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. */
|
|
1150
1184
|
png_sticker?: F | string;
|
|
1151
|
-
/** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/
|
|
1185
|
+
/** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements */
|
|
1152
1186
|
tgs_sticker?: F;
|
|
1187
|
+
/** WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements */
|
|
1188
|
+
webm_sticker?: F;
|
|
1153
1189
|
/** One or more emoji corresponding to the sticker */
|
|
1154
1190
|
emojis: string;
|
|
1155
1191
|
/** An object for position where the mask should be placed on faces */
|
|
@@ -1170,14 +1206,14 @@ export interface InputFileProxy<F> {
|
|
|
1170
1206
|
sticker: string;
|
|
1171
1207
|
}): true;
|
|
1172
1208
|
|
|
1173
|
-
/** Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success. */
|
|
1209
|
+
/** Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success. */
|
|
1174
1210
|
setStickerSetThumb(args: {
|
|
1175
1211
|
/** Sticker set name */
|
|
1176
1212
|
name: string;
|
|
1177
1213
|
/** User identifier of the sticker set owner */
|
|
1178
1214
|
user_id: number;
|
|
1179
|
-
/** A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/
|
|
1180
|
-
thumb
|
|
1215
|
+
/** A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements, or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files ». Animated sticker set thumbnails can't be uploaded via HTTP URL. */
|
|
1216
|
+
thumb?: F | string;
|
|
1181
1217
|
}): true;
|
|
1182
1218
|
|
|
1183
1219
|
/** Use this method to send answers to an inline query. On success, True is returned.
|
|
@@ -1201,6 +1237,14 @@ export interface InputFileProxy<F> {
|
|
|
1201
1237
|
switch_pm_parameter?: string;
|
|
1202
1238
|
}): true;
|
|
1203
1239
|
|
|
1240
|
+
/** Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned. */
|
|
1241
|
+
answerWebAppQuery(args: {
|
|
1242
|
+
/** Unique identifier for the query to be answered */
|
|
1243
|
+
web_app_query_id: string;
|
|
1244
|
+
/** An object describing the message to be sent */
|
|
1245
|
+
result: InlineQueryResult;
|
|
1246
|
+
}): SentWebAppMessage;
|
|
1247
|
+
|
|
1204
1248
|
/** Use this method to send invoices. On success, the sent Message is returned. */
|
|
1205
1249
|
sendInvoice(args: {
|
|
1206
1250
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
@@ -1359,7 +1403,7 @@ export interface InputFileProxy<F> {
|
|
|
1359
1403
|
InputMediaPhoto: {
|
|
1360
1404
|
/** Type of the result, must be photo */
|
|
1361
1405
|
type: "photo";
|
|
1362
|
-
/** 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
|
|
1406
|
+
/** 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. */
|
|
1363
1407
|
media: F | string;
|
|
1364
1408
|
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
1365
1409
|
caption?: string;
|
|
@@ -1373,9 +1417,9 @@ export interface InputFileProxy<F> {
|
|
|
1373
1417
|
InputMediaVideo: {
|
|
1374
1418
|
/** Type of the result, must be video */
|
|
1375
1419
|
type: "video";
|
|
1376
|
-
/** 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
|
|
1420
|
+
/** 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. */
|
|
1377
1421
|
media: F | string;
|
|
1378
|
-
/** 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
|
|
1422
|
+
/** 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>. */
|
|
1379
1423
|
thumb?: F;
|
|
1380
1424
|
/** Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
1381
1425
|
caption?: string;
|
|
@@ -1397,9 +1441,9 @@ export interface InputFileProxy<F> {
|
|
|
1397
1441
|
InputMediaAnimation: {
|
|
1398
1442
|
/** Type of the result, must be animation */
|
|
1399
1443
|
type: "animation";
|
|
1400
|
-
/** 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
|
|
1444
|
+
/** 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. */
|
|
1401
1445
|
media: F | string;
|
|
1402
|
-
/** 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
|
|
1446
|
+
/** 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>. */
|
|
1403
1447
|
thumb?: F;
|
|
1404
1448
|
/** Caption of the animation to be sent, 0-1024 characters after entities parsing */
|
|
1405
1449
|
caption?: string;
|
|
@@ -1419,9 +1463,9 @@ export interface InputFileProxy<F> {
|
|
|
1419
1463
|
InputMediaAudio: {
|
|
1420
1464
|
/** Type of the result, must be audio */
|
|
1421
1465
|
type: "audio";
|
|
1422
|
-
/** 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
|
|
1466
|
+
/** 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. */
|
|
1423
1467
|
media: F | string;
|
|
1424
|
-
/** 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
|
|
1468
|
+
/** 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>. */
|
|
1425
1469
|
thumb?: F;
|
|
1426
1470
|
/** Caption of the audio to be sent, 0-1024 characters after entities parsing */
|
|
1427
1471
|
caption?: string;
|
|
@@ -1441,9 +1485,9 @@ export interface InputFileProxy<F> {
|
|
|
1441
1485
|
InputMediaDocument: {
|
|
1442
1486
|
/** Type of the result, must be document */
|
|
1443
1487
|
type: "document";
|
|
1444
|
-
/** 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
|
|
1488
|
+
/** 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. */
|
|
1445
1489
|
media: F | string;
|
|
1446
|
-
/** 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
|
|
1490
|
+
/** 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>. */
|
|
1447
1491
|
thumb?: F;
|
|
1448
1492
|
/** Caption of the document to be sent, 0-1024 characters after entities parsing */
|
|
1449
1493
|
caption?: string;
|
package/update.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallbackQuery } from "./
|
|
1
|
+
import { CallbackQuery } from "./markup";
|
|
2
2
|
import { ChosenInlineResult, InlineQuery } from "./inline";
|
|
3
3
|
import { Chat, ChatJoinRequest, ChatMemberUpdated, User } from "./manage";
|
|
4
4
|
import { Message, Poll, PollAnswer } from "./message";
|