@grammyjs/types 2.12.1 → 3.0.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/README.md +15 -2
- package/api.d.ts +10 -13
- package/inline.d.ts +532 -586
- package/manage.d.ts +375 -423
- package/markup.d.ts +159 -189
- package/message.d.ts +535 -633
- package/methods.d.ts +1531 -0
- package/mod.d.ts +10 -0
- package/package.json +15 -5
- package/passport.d.ts +113 -182
- package/payment.d.ts +77 -85
- package/{menu-button.d.ts → settings.d.ts} +45 -57
- package/update.d.ts +50 -52
- package/.editorconfig +0 -8
- package/deno.jsonc +0 -1
- package/index.d.ts +0 -10
- package/proxied.d.ts +0 -1702
- /package/{index.js → mod.js} +0 -0
package/inline.d.ts
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import { Chat, User } from "./manage";
|
|
2
|
-
import { InlineKeyboardMarkup } from "./markup";
|
|
3
|
-
import { Location, MessageEntity, ParseMode } from "./message";
|
|
4
|
-
import { LabeledPrice } from "./payment";
|
|
5
|
-
|
|
1
|
+
import type { Chat, User } from "./manage.js";
|
|
2
|
+
import type { InlineKeyboardMarkup } from "./markup.js";
|
|
3
|
+
import type { Location, MessageEntity, ParseMode } from "./message.js";
|
|
4
|
+
import type { LabeledPrice } from "./payment.js";
|
|
6
5
|
/** This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. */
|
|
7
6
|
export interface InlineQuery {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
/** Unique identifier for this query */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Sender */
|
|
10
|
+
from: User;
|
|
11
|
+
/** Text of the query (up to 256 characters) */
|
|
12
|
+
query: string;
|
|
13
|
+
/** Offset of the results to be returned, can be controlled by the bot */
|
|
14
|
+
offset: string;
|
|
15
|
+
/** 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 */
|
|
16
|
+
chat_type?: "sender" | Chat["type"];
|
|
17
|
+
/** Sender location, only for bots that request user location */
|
|
18
|
+
location?: Location;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
/** This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
|
|
23
21
|
- InlineQueryResultCachedAudio
|
|
24
22
|
- InlineQueryResultCachedDocument
|
|
@@ -42,553 +40,512 @@ export interface InlineQuery {
|
|
|
42
40
|
- InlineQueryResultVoice
|
|
43
41
|
|
|
44
42
|
Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public. */
|
|
45
|
-
export type InlineQueryResult =
|
|
46
|
-
| InlineQueryResultCachedAudio
|
|
47
|
-
| InlineQueryResultCachedDocument
|
|
48
|
-
| InlineQueryResultCachedGif
|
|
49
|
-
| InlineQueryResultCachedMpeg4Gif
|
|
50
|
-
| InlineQueryResultCachedPhoto
|
|
51
|
-
| InlineQueryResultCachedSticker
|
|
52
|
-
| InlineQueryResultCachedVideo
|
|
53
|
-
| InlineQueryResultCachedVoice
|
|
54
|
-
| InlineQueryResultArticle
|
|
55
|
-
| InlineQueryResultAudio
|
|
56
|
-
| InlineQueryResultContact
|
|
57
|
-
| InlineQueryResultGame
|
|
58
|
-
| InlineQueryResultDocument
|
|
59
|
-
| InlineQueryResultGif
|
|
60
|
-
| InlineQueryResultLocation
|
|
61
|
-
| InlineQueryResultMpeg4Gif
|
|
62
|
-
| InlineQueryResultPhoto
|
|
63
|
-
| InlineQueryResultVenue
|
|
64
|
-
| InlineQueryResultVideo
|
|
65
|
-
| InlineQueryResultVoice;
|
|
66
|
-
|
|
43
|
+
export type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice;
|
|
67
44
|
/** Represents a link to an article or web page. */
|
|
68
45
|
export interface InlineQueryResultArticle {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
46
|
+
/** Type of the result, must be article */
|
|
47
|
+
type: "article";
|
|
48
|
+
/** Unique identifier for this result, 1-64 Bytes */
|
|
49
|
+
id: string;
|
|
50
|
+
/** Title of the result */
|
|
51
|
+
title: string;
|
|
52
|
+
/** Content of the message to be sent */
|
|
53
|
+
input_message_content: InputMessageContent;
|
|
54
|
+
/** Inline keyboard attached to the message */
|
|
55
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
56
|
+
/** URL of the result */
|
|
57
|
+
url?: string;
|
|
58
|
+
/** Pass True if you don't want the URL to be shown in the message */
|
|
59
|
+
hide_url?: boolean;
|
|
60
|
+
/** Short description of the result */
|
|
61
|
+
description?: string;
|
|
62
|
+
/** Url of the thumbnail for the result */
|
|
63
|
+
thumbnail_url?: string;
|
|
64
|
+
/** Thumbnail width */
|
|
65
|
+
thumbnail_width?: number;
|
|
66
|
+
/** Thumbnail height */
|
|
67
|
+
thumbnail_height?: number;
|
|
91
68
|
}
|
|
92
|
-
|
|
93
69
|
/** 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. */
|
|
94
70
|
export interface InlineQueryResultPhoto {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
71
|
+
/** Type of the result, must be photo */
|
|
72
|
+
type: "photo";
|
|
73
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
74
|
+
id: string;
|
|
75
|
+
/** A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB */
|
|
76
|
+
photo_url: string;
|
|
77
|
+
/** URL of the thumbnail for the photo */
|
|
78
|
+
thumbnail_url: string;
|
|
79
|
+
/** Width of the photo */
|
|
80
|
+
photo_width?: number;
|
|
81
|
+
/** Height of the photo */
|
|
82
|
+
photo_height?: number;
|
|
83
|
+
/** Title for the result */
|
|
84
|
+
title?: string;
|
|
85
|
+
/** Short description of the result */
|
|
86
|
+
description?: string;
|
|
87
|
+
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
88
|
+
caption?: string;
|
|
89
|
+
/** Mode for parsing entities in the photo caption. See formatting options for more details. */
|
|
90
|
+
parse_mode?: ParseMode;
|
|
91
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
92
|
+
caption_entities?: MessageEntity[];
|
|
93
|
+
/** Inline keyboard attached to the message */
|
|
94
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
95
|
+
/** Content of the message to be sent instead of the photo */
|
|
96
|
+
input_message_content?: InputMessageContent;
|
|
121
97
|
}
|
|
122
|
-
|
|
123
98
|
/** 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. */
|
|
124
99
|
export interface InlineQueryResultGif {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
100
|
+
/** Type of the result, must be gif */
|
|
101
|
+
type: "gif";
|
|
102
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
103
|
+
id: string;
|
|
104
|
+
/** A valid URL for the GIF file. File size must not exceed 1MB */
|
|
105
|
+
gif_url: string;
|
|
106
|
+
/** Width of the GIF */
|
|
107
|
+
gif_width?: number;
|
|
108
|
+
/** Height of the GIF */
|
|
109
|
+
gif_height?: number;
|
|
110
|
+
/** Duration of the GIF in seconds */
|
|
111
|
+
gif_duration?: number;
|
|
112
|
+
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
|
|
113
|
+
thumbnail_url: string;
|
|
114
|
+
/** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
|
|
115
|
+
thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
|
|
116
|
+
/** Title for the result */
|
|
117
|
+
title?: string;
|
|
118
|
+
/** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
|
|
119
|
+
caption?: string;
|
|
120
|
+
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
121
|
+
parse_mode?: ParseMode;
|
|
122
|
+
/** Inline keyboard attached to the message */
|
|
123
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
124
|
+
/** Content of the message to be sent instead of the GIF animation */
|
|
125
|
+
input_message_content?: InputMessageContent;
|
|
151
126
|
}
|
|
152
|
-
|
|
153
127
|
/** 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. */
|
|
154
128
|
export interface InlineQueryResultMpeg4Gif {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
129
|
+
/** Type of the result, must be mpeg4_gif */
|
|
130
|
+
type: "mpeg4_gif";
|
|
131
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
132
|
+
id: string;
|
|
133
|
+
/** A valid URL for the MPEG4 file. File size must not exceed 1MB */
|
|
134
|
+
mpeg4_url: string;
|
|
135
|
+
/** Video width */
|
|
136
|
+
mpeg4_width?: number;
|
|
137
|
+
/** Video height */
|
|
138
|
+
mpeg4_height?: number;
|
|
139
|
+
/** Video duration in seconds */
|
|
140
|
+
mpeg4_duration?: number;
|
|
141
|
+
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
|
|
142
|
+
thumbnail_url: string;
|
|
143
|
+
/** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
|
|
144
|
+
thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
|
|
145
|
+
/** Title for the result */
|
|
146
|
+
title?: string;
|
|
147
|
+
/** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
|
|
148
|
+
caption?: string;
|
|
149
|
+
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
150
|
+
parse_mode?: ParseMode;
|
|
151
|
+
/** Inline keyboard attached to the message */
|
|
152
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
153
|
+
/** Content of the message to be sent instead of the video animation */
|
|
154
|
+
input_message_content?: InputMessageContent;
|
|
181
155
|
}
|
|
182
|
-
|
|
183
156
|
/** Represents a link to a page containing an embedded video player or a video file. 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.
|
|
184
157
|
|
|
185
158
|
If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content. */
|
|
186
159
|
export interface InlineQueryResultVideo {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
160
|
+
/** Type of the result, must be video */
|
|
161
|
+
type: "video";
|
|
162
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
163
|
+
id: string;
|
|
164
|
+
/** A valid URL for the embedded video player or video file */
|
|
165
|
+
video_url: string;
|
|
166
|
+
/** MIME type of the content of the video URL, “text/html” or “video/mp4” */
|
|
167
|
+
mime_type: "text/html" | "video/mp4";
|
|
168
|
+
/** URL of the thumbnail (JPEG only) for the video */
|
|
169
|
+
thumbnail_url: string;
|
|
170
|
+
/** Title for the result */
|
|
171
|
+
title: string;
|
|
172
|
+
/** Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
173
|
+
caption?: string;
|
|
174
|
+
/** Mode for parsing entities in the video caption. See formatting options for more details. */
|
|
175
|
+
parse_mode?: ParseMode;
|
|
176
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
177
|
+
caption_entities?: MessageEntity[];
|
|
178
|
+
/** Video width */
|
|
179
|
+
video_width?: number;
|
|
180
|
+
/** Video height */
|
|
181
|
+
video_height?: number;
|
|
182
|
+
/** Video duration in seconds */
|
|
183
|
+
video_duration?: number;
|
|
184
|
+
/** Short description of the result */
|
|
185
|
+
description?: string;
|
|
186
|
+
/** Inline keyboard attached to the message */
|
|
187
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
188
|
+
/** Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video). */
|
|
189
|
+
input_message_content?: InputMessageContent;
|
|
217
190
|
}
|
|
218
|
-
|
|
219
191
|
/** 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.
|
|
220
192
|
|
|
221
193
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
222
194
|
export interface InlineQueryResultAudio {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
195
|
+
/** Type of the result, must be audio */
|
|
196
|
+
type: "audio";
|
|
197
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
198
|
+
id: string;
|
|
199
|
+
/** A valid URL for the audio file */
|
|
200
|
+
audio_url: string;
|
|
201
|
+
/** Title */
|
|
202
|
+
title: string;
|
|
203
|
+
/** Caption, 0-1024 characters after entities parsing */
|
|
204
|
+
caption?: string;
|
|
205
|
+
/** Mode for parsing entities in the audio caption. See formatting options for more details. */
|
|
206
|
+
parse_mode?: ParseMode;
|
|
207
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
208
|
+
caption_entities?: MessageEntity[];
|
|
209
|
+
/** Performer */
|
|
210
|
+
performer?: string;
|
|
211
|
+
/** Audio duration in seconds */
|
|
212
|
+
audio_duration?: number;
|
|
213
|
+
/** Inline keyboard attached to the message */
|
|
214
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
215
|
+
/** Content of the message to be sent instead of the audio */
|
|
216
|
+
input_message_content?: InputMessageContent;
|
|
245
217
|
}
|
|
246
|
-
|
|
247
218
|
/** 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.
|
|
248
219
|
|
|
249
220
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
250
221
|
export interface InlineQueryResultVoice {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
222
|
+
/** Type of the result, must be voice */
|
|
223
|
+
type: "voice";
|
|
224
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
225
|
+
id: string;
|
|
226
|
+
/** A valid URL for the voice recording */
|
|
227
|
+
voice_url: string;
|
|
228
|
+
/** Recording title */
|
|
229
|
+
title: string;
|
|
230
|
+
/** Caption, 0-1024 characters after entities parsing */
|
|
231
|
+
caption?: string;
|
|
232
|
+
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */
|
|
233
|
+
parse_mode?: ParseMode;
|
|
234
|
+
/** Recording duration in seconds */
|
|
235
|
+
voice_duration?: number;
|
|
236
|
+
/** Inline keyboard attached to the message */
|
|
237
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
238
|
+
/** Content of the message to be sent instead of the voice recording */
|
|
239
|
+
input_message_content?: InputMessageContent;
|
|
269
240
|
}
|
|
270
|
-
|
|
271
241
|
/** 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.
|
|
272
242
|
|
|
273
243
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
274
244
|
export interface InlineQueryResultDocument {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
245
|
+
/** Type of the result, must be document */
|
|
246
|
+
type: "document";
|
|
247
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
248
|
+
id: string;
|
|
249
|
+
/** Title for the result */
|
|
250
|
+
title: string;
|
|
251
|
+
/** Caption of the document to be sent, 0-1024 characters after entities parsing */
|
|
252
|
+
caption?: string;
|
|
253
|
+
/** Mode for parsing entities in the document caption. See formatting options for more details. */
|
|
254
|
+
parse_mode?: ParseMode;
|
|
255
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
256
|
+
caption_entities?: MessageEntity[];
|
|
257
|
+
/** A valid URL for the file */
|
|
258
|
+
document_url: string;
|
|
259
|
+
/** MIME type of the content of the file, either “application/pdf” or “application/zip” */
|
|
260
|
+
mime_type: "application/pdf" | "application/zip";
|
|
261
|
+
/** Short description of the result */
|
|
262
|
+
description?: string;
|
|
263
|
+
/** Inline keyboard attached to the message */
|
|
264
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
265
|
+
/** Content of the message to be sent instead of the file */
|
|
266
|
+
input_message_content?: InputMessageContent;
|
|
267
|
+
/** URL of the thumbnail (JPEG only) for the file */
|
|
268
|
+
thumbnail_url?: string;
|
|
269
|
+
/** Thumbnail width */
|
|
270
|
+
thumbnail_width?: number;
|
|
271
|
+
/** Thumbnail height */
|
|
272
|
+
thumbnail_height?: number;
|
|
303
273
|
}
|
|
304
|
-
|
|
305
274
|
/** 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.
|
|
306
275
|
|
|
307
276
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
308
277
|
export interface InlineQueryResultLocation {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
278
|
+
/** Type of the result, must be location */
|
|
279
|
+
type: "location";
|
|
280
|
+
/** Unique identifier for this result, 1-64 Bytes */
|
|
281
|
+
id: string;
|
|
282
|
+
/** Location latitude in degrees */
|
|
283
|
+
latitude: number;
|
|
284
|
+
/** Location longitude in degrees */
|
|
285
|
+
longitude: number;
|
|
286
|
+
/** Location title */
|
|
287
|
+
title: string;
|
|
288
|
+
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
289
|
+
horizontal_accuracy?: number;
|
|
290
|
+
/** Period in seconds for which the location can be updated, should be between 60 and 86400. */
|
|
291
|
+
live_period?: number;
|
|
292
|
+
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
293
|
+
heading?: number;
|
|
294
|
+
/** The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
|
|
295
|
+
proximity_alert_radius?: number;
|
|
296
|
+
/** Inline keyboard attached to the message */
|
|
297
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
298
|
+
/** Content of the message to be sent instead of the location */
|
|
299
|
+
input_message_content?: InputMessageContent;
|
|
300
|
+
/** Url of the thumbnail for the result */
|
|
301
|
+
thumbnail_url?: string;
|
|
302
|
+
/** Thumbnail width */
|
|
303
|
+
thumbnail_width?: number;
|
|
304
|
+
/** Thumbnail height */
|
|
305
|
+
thumbnail_height?: number;
|
|
337
306
|
}
|
|
338
|
-
|
|
339
307
|
/** 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.
|
|
340
308
|
|
|
341
309
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
342
310
|
export interface InlineQueryResultVenue {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
311
|
+
/** Type of the result, must be venue */
|
|
312
|
+
type: "venue";
|
|
313
|
+
/** Unique identifier for this result, 1-64 Bytes */
|
|
314
|
+
id: string;
|
|
315
|
+
/** Latitude of the venue location in degrees */
|
|
316
|
+
latitude: number;
|
|
317
|
+
/** Longitude of the venue location in degrees */
|
|
318
|
+
longitude: number;
|
|
319
|
+
/** Title of the venue */
|
|
320
|
+
title: string;
|
|
321
|
+
/** Address of the venue */
|
|
322
|
+
address: string;
|
|
323
|
+
/** Foursquare identifier of the venue if known */
|
|
324
|
+
foursquare_id?: string;
|
|
325
|
+
/** Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */
|
|
326
|
+
foursquare_type?: string;
|
|
327
|
+
/** Google Places identifier of the venue */
|
|
328
|
+
google_place_id?: string;
|
|
329
|
+
/** Google Places type of the venue. (See supported types.) */
|
|
330
|
+
google_place_type?: string;
|
|
331
|
+
/** Inline keyboard attached to the message */
|
|
332
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
333
|
+
/** Content of the message to be sent instead of the venue */
|
|
334
|
+
input_message_content?: InputMessageContent;
|
|
335
|
+
/** Url of the thumbnail for the result */
|
|
336
|
+
thumbnail_url?: string;
|
|
337
|
+
/** Thumbnail width */
|
|
338
|
+
thumbnail_width?: number;
|
|
339
|
+
/** Thumbnail height */
|
|
340
|
+
thumbnail_height?: number;
|
|
373
341
|
}
|
|
374
|
-
|
|
375
342
|
/** 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.
|
|
376
343
|
|
|
377
344
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
378
345
|
export interface InlineQueryResultContact {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
346
|
+
/** Type of the result, must be contact */
|
|
347
|
+
type: "contact";
|
|
348
|
+
/** Unique identifier for this result, 1-64 Bytes */
|
|
349
|
+
id: string;
|
|
350
|
+
/** Contact's phone number */
|
|
351
|
+
phone_number: string;
|
|
352
|
+
/** Contact's first name */
|
|
353
|
+
first_name: string;
|
|
354
|
+
/** Contact's last name */
|
|
355
|
+
last_name?: string;
|
|
356
|
+
/** Additional data about the contact in the form of a vCard, 0-2048 bytes */
|
|
357
|
+
vcard?: string;
|
|
358
|
+
/** Inline keyboard attached to the message */
|
|
359
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
360
|
+
/** Content of the message to be sent instead of the contact */
|
|
361
|
+
input_message_content?: InputMessageContent;
|
|
362
|
+
/** Url of the thumbnail for the result */
|
|
363
|
+
thumbnail_url?: string;
|
|
364
|
+
/** Thumbnail width */
|
|
365
|
+
thumbnail_width?: number;
|
|
366
|
+
/** Thumbnail height */
|
|
367
|
+
thumbnail_height?: number;
|
|
401
368
|
}
|
|
402
|
-
|
|
403
369
|
/** Represents a Game.
|
|
404
370
|
|
|
405
371
|
Note: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them. */
|
|
406
372
|
export interface InlineQueryResultGame {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
373
|
+
/** Type of the result, must be game */
|
|
374
|
+
type: "game";
|
|
375
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
376
|
+
id: string;
|
|
377
|
+
/** Short name of the game */
|
|
378
|
+
game_short_name: string;
|
|
379
|
+
/** Inline keyboard attached to the message */
|
|
380
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
415
381
|
}
|
|
416
|
-
|
|
417
382
|
/** 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. */
|
|
418
383
|
export interface InlineQueryResultCachedPhoto {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
384
|
+
/** Type of the result, must be photo */
|
|
385
|
+
type: "photo";
|
|
386
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
387
|
+
id: string;
|
|
388
|
+
/** A valid file identifier of the photo */
|
|
389
|
+
photo_file_id: string;
|
|
390
|
+
/** Title for the result */
|
|
391
|
+
title?: string;
|
|
392
|
+
/** Short description of the result */
|
|
393
|
+
description?: string;
|
|
394
|
+
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
395
|
+
caption?: string;
|
|
396
|
+
/** Mode for parsing entities in the photo caption. See formatting options for more details. */
|
|
397
|
+
parse_mode?: ParseMode;
|
|
398
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
399
|
+
caption_entities?: MessageEntity[];
|
|
400
|
+
/** Inline keyboard attached to the message */
|
|
401
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
402
|
+
/** Content of the message to be sent instead of the photo */
|
|
403
|
+
input_message_content?: InputMessageContent;
|
|
439
404
|
}
|
|
440
|
-
|
|
441
405
|
/** 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. */
|
|
442
406
|
export interface InlineQueryResultCachedGif {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
407
|
+
/** Type of the result, must be gif */
|
|
408
|
+
type: "gif";
|
|
409
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
410
|
+
id: string;
|
|
411
|
+
/** A valid file identifier for the GIF file */
|
|
412
|
+
gif_file_id: string;
|
|
413
|
+
/** Title for the result */
|
|
414
|
+
title?: string;
|
|
415
|
+
/** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
|
|
416
|
+
caption?: string;
|
|
417
|
+
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
418
|
+
parse_mode?: ParseMode;
|
|
419
|
+
/** Inline keyboard attached to the message */
|
|
420
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
421
|
+
/** Content of the message to be sent instead of the GIF animation */
|
|
422
|
+
input_message_content?: InputMessageContent;
|
|
459
423
|
}
|
|
460
|
-
|
|
461
424
|
/** 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. */
|
|
462
425
|
export interface InlineQueryResultCachedMpeg4Gif {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
426
|
+
/** Type of the result, must be mpeg4_gif */
|
|
427
|
+
type: "mpeg4_gif";
|
|
428
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
429
|
+
id: string;
|
|
430
|
+
/** A valid file identifier for the MPEG4 file */
|
|
431
|
+
mpeg4_file_id: string;
|
|
432
|
+
/** Title for the result */
|
|
433
|
+
title?: string;
|
|
434
|
+
/** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
|
|
435
|
+
caption?: string;
|
|
436
|
+
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
437
|
+
parse_mode?: ParseMode;
|
|
438
|
+
/** Inline keyboard attached to the message */
|
|
439
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
440
|
+
/** Content of the message to be sent instead of the video animation */
|
|
441
|
+
input_message_content?: InputMessageContent;
|
|
479
442
|
}
|
|
480
|
-
|
|
481
443
|
/** 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.
|
|
482
444
|
|
|
483
445
|
Note: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.
|
|
484
446
|
*/
|
|
485
447
|
export interface InlineQueryResultCachedSticker {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
448
|
+
/** Type of the result, must be sticker */
|
|
449
|
+
type: "sticker";
|
|
450
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
451
|
+
id: string;
|
|
452
|
+
/** A valid file identifier of the sticker */
|
|
453
|
+
sticker_file_id: string;
|
|
454
|
+
/** Inline keyboard attached to the message */
|
|
455
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
456
|
+
/** Content of the message to be sent instead of the sticker */
|
|
457
|
+
input_message_content?: InputMessageContent;
|
|
496
458
|
}
|
|
497
|
-
|
|
498
459
|
/** 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.
|
|
499
460
|
|
|
500
461
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
501
462
|
export interface InlineQueryResultCachedDocument {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
463
|
+
/** Type of the result, must be document */
|
|
464
|
+
type: "document";
|
|
465
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
466
|
+
id: string;
|
|
467
|
+
/** Title for the result */
|
|
468
|
+
title: string;
|
|
469
|
+
/** A valid file identifier for the file */
|
|
470
|
+
document_file_id: string;
|
|
471
|
+
/** Short description of the result */
|
|
472
|
+
description?: string;
|
|
473
|
+
/** Caption of the document to be sent, 0-1024 characters after entities parsing */
|
|
474
|
+
caption?: string;
|
|
475
|
+
/** Mode for parsing entities in the document caption. See formatting options for more details. */
|
|
476
|
+
parse_mode?: ParseMode;
|
|
477
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
478
|
+
caption_entities?: MessageEntity[];
|
|
479
|
+
/** Inline keyboard attached to the message */
|
|
480
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
481
|
+
/** Content of the message to be sent instead of the file */
|
|
482
|
+
input_message_content?: InputMessageContent;
|
|
522
483
|
}
|
|
523
|
-
|
|
524
484
|
/** 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. */
|
|
525
485
|
export interface InlineQueryResultCachedVideo {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
486
|
+
/** Type of the result, must be video */
|
|
487
|
+
type: "video";
|
|
488
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
489
|
+
id: string;
|
|
490
|
+
/** A valid file identifier for the video file */
|
|
491
|
+
video_file_id: string;
|
|
492
|
+
/** Title for the result */
|
|
493
|
+
title: string;
|
|
494
|
+
/** Short description of the result */
|
|
495
|
+
description?: string;
|
|
496
|
+
/** Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
497
|
+
caption?: string;
|
|
498
|
+
/** Mode for parsing entities in the video caption. See formatting options for more details. */
|
|
499
|
+
parse_mode?: ParseMode;
|
|
500
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
501
|
+
caption_entities?: MessageEntity[];
|
|
502
|
+
/** Inline keyboard attached to the message */
|
|
503
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
504
|
+
/** Content of the message to be sent instead of the video */
|
|
505
|
+
input_message_content?: InputMessageContent;
|
|
546
506
|
}
|
|
547
|
-
|
|
548
507
|
/** 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.
|
|
549
508
|
|
|
550
509
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
551
510
|
export interface InlineQueryResultCachedVoice {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
511
|
+
/** Type of the result, must be voice */
|
|
512
|
+
type: "voice";
|
|
513
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
514
|
+
id: string;
|
|
515
|
+
/** A valid file identifier for the voice message */
|
|
516
|
+
voice_file_id: string;
|
|
517
|
+
/** Voice message title */
|
|
518
|
+
title: string;
|
|
519
|
+
/** Caption, 0-1024 characters after entities parsing */
|
|
520
|
+
caption?: string;
|
|
521
|
+
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */
|
|
522
|
+
parse_mode?: ParseMode;
|
|
523
|
+
/** Inline keyboard attached to the message */
|
|
524
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
525
|
+
/** Content of the message to be sent instead of the voice message */
|
|
526
|
+
input_message_content?: InputMessageContent;
|
|
568
527
|
}
|
|
569
|
-
|
|
570
528
|
/** 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.
|
|
571
529
|
|
|
572
530
|
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. */
|
|
573
531
|
export interface InlineQueryResultCachedAudio {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
532
|
+
/** Type of the result, must be audio */
|
|
533
|
+
type: "audio";
|
|
534
|
+
/** Unique identifier for this result, 1-64 bytes */
|
|
535
|
+
id: string;
|
|
536
|
+
/** A valid file identifier for the audio file */
|
|
537
|
+
audio_file_id: string;
|
|
538
|
+
/** Caption, 0-1024 characters after entities parsing */
|
|
539
|
+
caption?: string;
|
|
540
|
+
/** Mode for parsing entities in the audio caption. See formatting options for more details. */
|
|
541
|
+
parse_mode?: ParseMode;
|
|
542
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
543
|
+
caption_entities?: MessageEntity[];
|
|
544
|
+
/** Inline keyboard attached to the message */
|
|
545
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
546
|
+
/** Content of the message to be sent instead of the audio */
|
|
547
|
+
input_message_content?: InputMessageContent;
|
|
590
548
|
}
|
|
591
|
-
|
|
592
549
|
/** This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:
|
|
593
550
|
|
|
594
551
|
- InputTextMessageContent
|
|
@@ -596,129 +553,118 @@ export interface InlineQueryResultCachedAudio {
|
|
|
596
553
|
- InputVenueMessageContent
|
|
597
554
|
- InputContactMessageContent
|
|
598
555
|
- InputInvoiceMessageContent */
|
|
599
|
-
export type InputMessageContent =
|
|
600
|
-
| InputTextMessageContent
|
|
601
|
-
| InputLocationMessageContent
|
|
602
|
-
| InputVenueMessageContent
|
|
603
|
-
| InputContactMessageContent
|
|
604
|
-
| InputInvoiceMessageContent;
|
|
605
|
-
|
|
556
|
+
export type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenueMessageContent | InputContactMessageContent | InputInvoiceMessageContent;
|
|
606
557
|
/** Represents the content of a text message to be sent as the result of an inline query. */
|
|
607
558
|
export interface InputTextMessageContent {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
559
|
+
/** Text of the message to be sent, 1-4096 characters */
|
|
560
|
+
message_text: string;
|
|
561
|
+
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
562
|
+
parse_mode?: ParseMode;
|
|
563
|
+
/** List of special entities that appear in message text, which can be specified instead of parse_mode */
|
|
564
|
+
entities?: MessageEntity[];
|
|
565
|
+
/** Disables link previews for links in the sent message */
|
|
566
|
+
disable_web_page_preview?: boolean;
|
|
616
567
|
}
|
|
617
|
-
|
|
618
568
|
/** Represents the content of a location message to be sent as the result of an inline query. */
|
|
619
569
|
export interface InputLocationMessageContent {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
570
|
+
/** Latitude of the location in degrees */
|
|
571
|
+
latitude: number;
|
|
572
|
+
/** Longitude of the location in degrees */
|
|
573
|
+
longitude: number;
|
|
574
|
+
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
575
|
+
horizontal_accuracy?: number;
|
|
576
|
+
/** Period in seconds for which the location can be updated, should be between 60 and 86400. */
|
|
577
|
+
live_period?: number;
|
|
578
|
+
/** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
|
|
579
|
+
heading?: number;
|
|
580
|
+
/** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
|
|
581
|
+
proximity_alert_radius?: number;
|
|
632
582
|
}
|
|
633
|
-
|
|
634
583
|
/** Represents the content of a venue message to be sent as the result of an inline query. */
|
|
635
584
|
export interface InputVenueMessageContent {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
585
|
+
/** Latitude of the venue in degrees */
|
|
586
|
+
latitude: number;
|
|
587
|
+
/** Longitude of the venue in degrees */
|
|
588
|
+
longitude: number;
|
|
589
|
+
/** Name of the venue */
|
|
590
|
+
title: string;
|
|
591
|
+
/** Address of the venue */
|
|
592
|
+
address: string;
|
|
593
|
+
/** Foursquare identifier of the venue, if known */
|
|
594
|
+
foursquare_id?: string;
|
|
595
|
+
/** Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */
|
|
596
|
+
foursquare_type?: string;
|
|
597
|
+
/** Google Places identifier of the venue */
|
|
598
|
+
google_place_id?: string;
|
|
599
|
+
/** Google Places type of the venue. (See supported types.) */
|
|
600
|
+
google_place_type?: string;
|
|
652
601
|
}
|
|
653
|
-
|
|
654
602
|
/** Represents the content of a contact message to be sent as the result of an inline query. */
|
|
655
603
|
export interface InputContactMessageContent {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
604
|
+
/** Contact's phone number */
|
|
605
|
+
phone_number: string;
|
|
606
|
+
/** Contact's first name */
|
|
607
|
+
first_name: string;
|
|
608
|
+
/** Contact's last name */
|
|
609
|
+
last_name?: string;
|
|
610
|
+
/** Additional data about the contact in the form of a vCard, 0-2048 bytes */
|
|
611
|
+
vcard?: string;
|
|
664
612
|
}
|
|
665
|
-
|
|
666
613
|
/** Represents the content of an invoice message to be sent as the result of an inline query. */
|
|
667
614
|
export interface InputInvoiceMessageContent {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
615
|
+
/** Product name, 1-32 characters */
|
|
616
|
+
title: string;
|
|
617
|
+
/** Product description, 1-255 characters */
|
|
618
|
+
description: string;
|
|
619
|
+
/** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
|
|
620
|
+
payload: string;
|
|
621
|
+
/** Payment provider token, obtained via BotFather */
|
|
622
|
+
provider_token: string;
|
|
623
|
+
/** Three-letter ISO 4217 currency code, see more on currencies */
|
|
624
|
+
currency: string;
|
|
625
|
+
/** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
|
|
626
|
+
prices: LabeledPrice[];
|
|
627
|
+
/** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 */
|
|
628
|
+
max_tip_amount?: number;
|
|
629
|
+
/** An array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. */
|
|
630
|
+
suggested_tip_amounts?: number[];
|
|
631
|
+
/** Data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. */
|
|
632
|
+
provider_data?: string;
|
|
633
|
+
/** URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. */
|
|
634
|
+
photo_url?: string;
|
|
635
|
+
/** Photo size in bytes */
|
|
636
|
+
photo_size?: number;
|
|
637
|
+
/** Photo width */
|
|
638
|
+
photo_width?: number;
|
|
639
|
+
/** Photo height */
|
|
640
|
+
photo_height?: number;
|
|
641
|
+
/** Pass True if you require the user's full name to complete the order */
|
|
642
|
+
need_name?: boolean;
|
|
643
|
+
/** Pass True if you require the user's phone number to complete the order */
|
|
644
|
+
need_phone_number?: boolean;
|
|
645
|
+
/** Pass True if you require the user's email address to complete the order */
|
|
646
|
+
need_email?: boolean;
|
|
647
|
+
/** Pass True if you require the user's shipping address to complete the order */
|
|
648
|
+
need_shipping_address?: boolean;
|
|
649
|
+
/** Pass True if the user's phone number should be sent to provider */
|
|
650
|
+
send_phone_number_to_provider?: boolean;
|
|
651
|
+
/** Pass True if the user's email address should be sent to provider */
|
|
652
|
+
send_email_to_provider?: boolean;
|
|
653
|
+
/** Pass True if the final price depends on the shipping method */
|
|
654
|
+
is_flexible?: boolean;
|
|
708
655
|
}
|
|
709
|
-
|
|
710
656
|
/** Represents a result of an inline query that was chosen by the user and sent to their chat partner.
|
|
711
657
|
|
|
712
658
|
Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates. */
|
|
713
659
|
export interface ChosenInlineResult {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
660
|
+
/** The unique identifier for the result that was chosen */
|
|
661
|
+
result_id: string;
|
|
662
|
+
/** The user that chose the result */
|
|
663
|
+
from: User;
|
|
664
|
+
/** Sender location, only for bots that require user location */
|
|
665
|
+
location?: Location;
|
|
666
|
+
/** Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. */
|
|
667
|
+
inline_message_id?: string;
|
|
668
|
+
/** The query that was used to obtain the result */
|
|
669
|
+
query: string;
|
|
724
670
|
}
|