@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/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
- /** Unique identifier for this query */
9
- id: string;
10
- /** Sender */
11
- from: User;
12
- /** Text of the query (up to 256 characters) */
13
- query: string;
14
- /** Offset of the results to be returned, can be controlled by the bot */
15
- offset: string;
16
- /** 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 */
17
- chat_type?: "sender" | Chat["type"];
18
- /** Sender location, only for bots that request user location */
19
- location?: Location;
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
- /** Type of the result, must be article */
70
- type: "article";
71
- /** Unique identifier for this result, 1-64 Bytes */
72
- id: string;
73
- /** Title of the result */
74
- title: string;
75
- /** Content of the message to be sent */
76
- input_message_content: InputMessageContent;
77
- /** Inline keyboard attached to the message */
78
- reply_markup?: InlineKeyboardMarkup;
79
- /** URL of the result */
80
- url?: string;
81
- /** Pass True if you don't want the URL to be shown in the message */
82
- hide_url?: boolean;
83
- /** Short description of the result */
84
- description?: string;
85
- /** Url of the thumbnail for the result */
86
- thumb_url?: string;
87
- /** Thumbnail width */
88
- thumb_width?: number;
89
- /** Thumbnail height */
90
- thumb_height?: number;
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
- /** Type of the result, must be photo */
96
- type: "photo";
97
- /** Unique identifier for this result, 1-64 bytes */
98
- id: string;
99
- /** A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB */
100
- photo_url: string;
101
- /** URL of the thumbnail for the photo */
102
- thumb_url: string;
103
- /** Width of the photo */
104
- photo_width?: number;
105
- /** Height of the photo */
106
- photo_height?: number;
107
- /** Title for the result */
108
- title?: string;
109
- /** Short description of the result */
110
- description?: string;
111
- /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
112
- caption?: string;
113
- /** Mode for parsing entities in the photo caption. See formatting options for more details. */
114
- parse_mode?: ParseMode;
115
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
116
- caption_entities?: MessageEntity[];
117
- /** Inline keyboard attached to the message */
118
- reply_markup?: InlineKeyboardMarkup;
119
- /** Content of the message to be sent instead of the photo */
120
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be gif */
126
- type: "gif";
127
- /** Unique identifier for this result, 1-64 bytes */
128
- id: string;
129
- /** A valid URL for the GIF file. File size must not exceed 1MB */
130
- gif_url: string;
131
- /** Width of the GIF */
132
- gif_width?: number;
133
- /** Height of the GIF */
134
- gif_height?: number;
135
- /** Duration of the GIF in seconds */
136
- gif_duration?: number;
137
- /** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
138
- thumb_url: string;
139
- /** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
140
- thumb_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
141
- /** Title for the result */
142
- title?: string;
143
- /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
144
- caption?: string;
145
- /** Mode for parsing entities in the caption. See formatting options for more details. */
146
- parse_mode?: ParseMode;
147
- /** Inline keyboard attached to the message */
148
- reply_markup?: InlineKeyboardMarkup;
149
- /** Content of the message to be sent instead of the GIF animation */
150
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be mpeg4_gif */
156
- type: "mpeg4_gif";
157
- /** Unique identifier for this result, 1-64 bytes */
158
- id: string;
159
- /** A valid URL for the MPEG4 file. File size must not exceed 1MB */
160
- mpeg4_url: string;
161
- /** Video width */
162
- mpeg4_width?: number;
163
- /** Video height */
164
- mpeg4_height?: number;
165
- /** Video duration in seconds */
166
- mpeg4_duration?: number;
167
- /** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
168
- thumb_url: string;
169
- /** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
170
- thumb_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
171
- /** Title for the result */
172
- title?: string;
173
- /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
174
- caption?: string;
175
- /** Mode for parsing entities in the caption. See formatting options for more details. */
176
- parse_mode?: ParseMode;
177
- /** Inline keyboard attached to the message */
178
- reply_markup?: InlineKeyboardMarkup;
179
- /** Content of the message to be sent instead of the video animation */
180
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be video */
188
- type: "video";
189
- /** Unique identifier for this result, 1-64 bytes */
190
- id: string;
191
- /** A valid URL for the embedded video player or video file */
192
- video_url: string;
193
- /** MIME type of the content of the video URL, “text/html” or “video/mp4” */
194
- mime_type: "text/html" | "video/mp4";
195
- /** URL of the thumbnail (JPEG only) for the video */
196
- thumb_url: string;
197
- /** Title for the result */
198
- title: string;
199
- /** Caption of the video to be sent, 0-1024 characters after entities parsing */
200
- caption?: string;
201
- /** Mode for parsing entities in the video caption. See formatting options for more details. */
202
- parse_mode?: ParseMode;
203
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
204
- caption_entities?: MessageEntity[];
205
- /** Video width */
206
- video_width?: number;
207
- /** Video height */
208
- video_height?: number;
209
- /** Video duration in seconds */
210
- video_duration?: number;
211
- /** Short description of the result */
212
- description?: string;
213
- /** Inline keyboard attached to the message */
214
- reply_markup?: InlineKeyboardMarkup;
215
- /** 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). */
216
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be audio */
224
- type: "audio";
225
- /** Unique identifier for this result, 1-64 bytes */
226
- id: string;
227
- /** A valid URL for the audio file */
228
- audio_url: string;
229
- /** Title */
230
- title: string;
231
- /** Caption, 0-1024 characters after entities parsing */
232
- caption?: string;
233
- /** Mode for parsing entities in the audio caption. See formatting options for more details. */
234
- parse_mode?: ParseMode;
235
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
236
- caption_entities?: MessageEntity[];
237
- /** Performer */
238
- performer?: string;
239
- /** Audio duration in seconds */
240
- audio_duration?: number;
241
- /** Inline keyboard attached to the message */
242
- reply_markup?: InlineKeyboardMarkup;
243
- /** Content of the message to be sent instead of the audio */
244
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be voice */
252
- type: "voice";
253
- /** Unique identifier for this result, 1-64 bytes */
254
- id: string;
255
- /** A valid URL for the voice recording */
256
- voice_url: string;
257
- /** Recording title */
258
- title: string;
259
- /** Caption, 0-1024 characters after entities parsing */
260
- caption?: string;
261
- /** Mode for parsing entities in the voice message caption. See formatting options for more details. */
262
- parse_mode?: ParseMode;
263
- /** Recording duration in seconds */
264
- voice_duration?: number;
265
- /** Inline keyboard attached to the message */
266
- reply_markup?: InlineKeyboardMarkup;
267
- /** Content of the message to be sent instead of the voice recording */
268
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be document */
276
- type: "document";
277
- /** Unique identifier for this result, 1-64 bytes */
278
- id: string;
279
- /** Title for the result */
280
- title: string;
281
- /** Caption of the document to be sent, 0-1024 characters after entities parsing */
282
- caption?: string;
283
- /** Mode for parsing entities in the document caption. See formatting options for more details. */
284
- parse_mode?: ParseMode;
285
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
286
- caption_entities?: MessageEntity[];
287
- /** A valid URL for the file */
288
- document_url: string;
289
- /** MIME type of the content of the file, either “application/pdf” or “application/zip” */
290
- mime_type: "application/pdf" | "application/zip";
291
- /** Short description of the result */
292
- description?: string;
293
- /** Inline keyboard attached to the message */
294
- reply_markup?: InlineKeyboardMarkup;
295
- /** Content of the message to be sent instead of the file */
296
- input_message_content?: InputMessageContent;
297
- /** URL of the thumbnail (JPEG only) for the file */
298
- thumb_url?: string;
299
- /** Thumbnail width */
300
- thumb_width?: number;
301
- /** Thumbnail height */
302
- thumb_height?: number;
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
- /** Type of the result, must be location */
310
- type: "location";
311
- /** Unique identifier for this result, 1-64 Bytes */
312
- id: string;
313
- /** Location latitude in degrees */
314
- latitude: number;
315
- /** Location longitude in degrees */
316
- longitude: number;
317
- /** Location title */
318
- title: string;
319
- /** The radius of uncertainty for the location, measured in meters; 0-1500 */
320
- horizontal_accuracy?: number;
321
- /** Period in seconds for which the location can be updated, should be between 60 and 86400. */
322
- live_period?: number;
323
- /** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
324
- heading?: number;
325
- /** The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
326
- proximity_alert_radius?: number;
327
- /** Inline keyboard attached to the message */
328
- reply_markup?: InlineKeyboardMarkup;
329
- /** Content of the message to be sent instead of the location */
330
- input_message_content?: InputMessageContent;
331
- /** Url of the thumbnail for the result */
332
- thumb_url?: string;
333
- /** Thumbnail width */
334
- thumb_width?: number;
335
- /** Thumbnail height */
336
- thumb_height?: number;
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
- /** Type of the result, must be venue */
344
- type: "venue";
345
- /** Unique identifier for this result, 1-64 Bytes */
346
- id: string;
347
- /** Latitude of the venue location in degrees */
348
- latitude: number;
349
- /** Longitude of the venue location in degrees */
350
- longitude: number;
351
- /** Title of the venue */
352
- title: string;
353
- /** Address of the venue */
354
- address: string;
355
- /** Foursquare identifier of the venue if known */
356
- foursquare_id?: string;
357
- /** Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */
358
- foursquare_type?: string;
359
- /** Google Places identifier of the venue */
360
- google_place_id?: string;
361
- /** Google Places type of the venue. (See supported types.) */
362
- google_place_type?: string;
363
- /** Inline keyboard attached to the message */
364
- reply_markup?: InlineKeyboardMarkup;
365
- /** Content of the message to be sent instead of the venue */
366
- input_message_content?: InputMessageContent;
367
- /** Url of the thumbnail for the result */
368
- thumb_url?: string;
369
- /** Thumbnail width */
370
- thumb_width?: number;
371
- /** Thumbnail height */
372
- thumb_height?: number;
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
- /** Type of the result, must be contact */
380
- type: "contact";
381
- /** Unique identifier for this result, 1-64 Bytes */
382
- id: string;
383
- /** Contact's phone number */
384
- phone_number: string;
385
- /** Contact's first name */
386
- first_name: string;
387
- /** Contact's last name */
388
- last_name?: string;
389
- /** Additional data about the contact in the form of a vCard, 0-2048 bytes */
390
- vcard?: string;
391
- /** Inline keyboard attached to the message */
392
- reply_markup?: InlineKeyboardMarkup;
393
- /** Content of the message to be sent instead of the contact */
394
- input_message_content?: InputMessageContent;
395
- /** Url of the thumbnail for the result */
396
- thumb_url?: string;
397
- /** Thumbnail width */
398
- thumb_width?: number;
399
- /** Thumbnail height */
400
- thumb_height?: number;
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
- /** Type of the result, must be game */
408
- type: "game";
409
- /** Unique identifier for this result, 1-64 bytes */
410
- id: string;
411
- /** Short name of the game */
412
- game_short_name: string;
413
- /** Inline keyboard attached to the message */
414
- reply_markup?: InlineKeyboardMarkup;
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
- /** Type of the result, must be photo */
420
- type: "photo";
421
- /** Unique identifier for this result, 1-64 bytes */
422
- id: string;
423
- /** A valid file identifier of the photo */
424
- photo_file_id: string;
425
- /** Title for the result */
426
- title?: string;
427
- /** Short description of the result */
428
- description?: string;
429
- /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
430
- caption?: string;
431
- /** Mode for parsing entities in the photo caption. See formatting options for more details. */
432
- parse_mode?: ParseMode;
433
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
434
- caption_entities?: MessageEntity[];
435
- /** Inline keyboard attached to the message */
436
- reply_markup?: InlineKeyboardMarkup;
437
- /** Content of the message to be sent instead of the photo */
438
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be gif */
444
- type: "gif";
445
- /** Unique identifier for this result, 1-64 bytes */
446
- id: string;
447
- /** A valid file identifier for the GIF file */
448
- gif_file_id: string;
449
- /** Title for the result */
450
- title?: string;
451
- /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
452
- caption?: string;
453
- /** Mode for parsing entities in the caption. See formatting options for more details. */
454
- parse_mode?: ParseMode;
455
- /** Inline keyboard attached to the message */
456
- reply_markup?: InlineKeyboardMarkup;
457
- /** Content of the message to be sent instead of the GIF animation */
458
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be mpeg4_gif */
464
- type: "mpeg4_gif";
465
- /** Unique identifier for this result, 1-64 bytes */
466
- id: string;
467
- /** A valid file identifier for the MPEG4 file */
468
- mpeg4_file_id: string;
469
- /** Title for the result */
470
- title?: string;
471
- /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
472
- caption?: string;
473
- /** Mode for parsing entities in the caption. See formatting options for more details. */
474
- parse_mode?: ParseMode;
475
- /** Inline keyboard attached to the message */
476
- reply_markup?: InlineKeyboardMarkup;
477
- /** Content of the message to be sent instead of the video animation */
478
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be sticker */
487
- type: "sticker";
488
- /** Unique identifier for this result, 1-64 bytes */
489
- id: string;
490
- /** A valid file identifier of the sticker */
491
- sticker_file_id: string;
492
- /** Inline keyboard attached to the message */
493
- reply_markup?: InlineKeyboardMarkup;
494
- /** Content of the message to be sent instead of the sticker */
495
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be document */
503
- type: "document";
504
- /** Unique identifier for this result, 1-64 bytes */
505
- id: string;
506
- /** Title for the result */
507
- title: string;
508
- /** A valid file identifier for the file */
509
- document_file_id: string;
510
- /** Short description of the result */
511
- description?: string;
512
- /** Caption of the document to be sent, 0-1024 characters after entities parsing */
513
- caption?: string;
514
- /** Mode for parsing entities in the document caption. See formatting options for more details. */
515
- parse_mode?: ParseMode;
516
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
517
- caption_entities?: MessageEntity[];
518
- /** Inline keyboard attached to the message */
519
- reply_markup?: InlineKeyboardMarkup;
520
- /** Content of the message to be sent instead of the file */
521
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be video */
527
- type: "video";
528
- /** Unique identifier for this result, 1-64 bytes */
529
- id: string;
530
- /** A valid file identifier for the video file */
531
- video_file_id: string;
532
- /** Title for the result */
533
- title: string;
534
- /** Short description of the result */
535
- description?: string;
536
- /** Caption of the video to be sent, 0-1024 characters after entities parsing */
537
- caption?: string;
538
- /** Mode for parsing entities in the video caption. See formatting options for more details. */
539
- parse_mode?: ParseMode;
540
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
541
- caption_entities?: MessageEntity[];
542
- /** Inline keyboard attached to the message */
543
- reply_markup?: InlineKeyboardMarkup;
544
- /** Content of the message to be sent instead of the video */
545
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be voice */
553
- type: "voice";
554
- /** Unique identifier for this result, 1-64 bytes */
555
- id: string;
556
- /** A valid file identifier for the voice message */
557
- voice_file_id: string;
558
- /** Voice message title */
559
- title: string;
560
- /** Caption, 0-1024 characters after entities parsing */
561
- caption?: string;
562
- /** Mode for parsing entities in the voice message caption. See formatting options for more details. */
563
- parse_mode?: ParseMode;
564
- /** Inline keyboard attached to the message */
565
- reply_markup?: InlineKeyboardMarkup;
566
- /** Content of the message to be sent instead of the voice message */
567
- input_message_content?: InputMessageContent;
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
- /** Type of the result, must be audio */
575
- type: "audio";
576
- /** Unique identifier for this result, 1-64 bytes */
577
- id: string;
578
- /** A valid file identifier for the audio file */
579
- audio_file_id: string;
580
- /** Caption, 0-1024 characters after entities parsing */
581
- caption?: string;
582
- /** Mode for parsing entities in the audio caption. See formatting options for more details. */
583
- parse_mode?: ParseMode;
584
- /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
585
- caption_entities?: MessageEntity[];
586
- /** Inline keyboard attached to the message */
587
- reply_markup?: InlineKeyboardMarkup;
588
- /** Content of the message to be sent instead of the audio */
589
- input_message_content?: InputMessageContent;
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
- /** Text of the message to be sent, 1-4096 characters */
609
- message_text: string;
610
- /** Mode for parsing entities in the message text. See formatting options for more details. */
611
- parse_mode?: ParseMode;
612
- /** List of special entities that appear in message text, which can be specified instead of parse_mode */
613
- entities?: MessageEntity[];
614
- /** Disables link previews for links in the sent message */
615
- disable_web_page_preview?: boolean;
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
- /** Latitude of the location in degrees */
621
- latitude: number;
622
- /** Longitude of the location in degrees */
623
- longitude: number;
624
- /** The radius of uncertainty for the location, measured in meters; 0-1500 */
625
- horizontal_accuracy?: number;
626
- /** Period in seconds for which the location can be updated, should be between 60 and 86400. */
627
- live_period?: number;
628
- /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
629
- heading?: number;
630
- /** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
631
- proximity_alert_radius?: number;
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
- /** Latitude of the venue in degrees */
637
- latitude: number;
638
- /** Longitude of the venue in degrees */
639
- longitude: number;
640
- /** Name of the venue */
641
- title: string;
642
- /** Address of the venue */
643
- address: string;
644
- /** Foursquare identifier of the venue, if known */
645
- foursquare_id?: string;
646
- /** Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */
647
- foursquare_type?: string;
648
- /** Google Places identifier of the venue */
649
- google_place_id?: string;
650
- /** Google Places type of the venue. (See supported types.) */
651
- google_place_type?: string;
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
- /** Contact's phone number */
657
- phone_number: string;
658
- /** Contact's first name */
659
- first_name: string;
660
- /** Contact's last name */
661
- last_name?: string;
662
- /** Additional data about the contact in the form of a vCard, 0-2048 bytes */
663
- vcard?: string;
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
- /** Product name, 1-32 characters */
669
- title: string;
670
- /** Product description, 1-255 characters */
671
- description: string;
672
- /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
673
- payload: string;
674
- /** Payment provider token, obtained via BotFather */
675
- provider_token: string;
676
- /** Three-letter ISO 4217 currency code, see more on currencies */
677
- currency: string;
678
- /** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
679
- prices: LabeledPrice[];
680
- /** 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 */
681
- max_tip_amount?: number;
682
- /** 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. */
683
- suggested_tip_amounts?: number[];
684
- /** 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. */
685
- provider_data?: string;
686
- /** URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. */
687
- photo_url?: string;
688
- /** Photo size in bytes */
689
- photo_size?: number;
690
- /** Photo width */
691
- photo_width?: number;
692
- /** Photo height */
693
- photo_height?: number;
694
- /** Pass True if you require the user's full name to complete the order */
695
- need_name?: boolean;
696
- /** Pass True if you require the user's phone number to complete the order */
697
- need_phone_number?: boolean;
698
- /** Pass True if you require the user's email address to complete the order */
699
- need_email?: boolean;
700
- /** Pass True if you require the user's shipping address to complete the order */
701
- need_shipping_address?: boolean;
702
- /** Pass True if the user's phone number should be sent to provider */
703
- send_phone_number_to_provider?: boolean;
704
- /** Pass True if the user's email address should be sent to provider */
705
- send_email_to_provider?: boolean;
706
- /** Pass True if the final price depends on the shipping method */
707
- is_flexible?: boolean;
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
- /** The unique identifier for the result that was chosen */
715
- result_id: string;
716
- /** The user that chose the result */
717
- from: User;
718
- /** Sender location, only for bots that require user location */
719
- location?: Location;
720
- /** 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. */
721
- inline_message_id?: string;
722
- /** The query that was used to obtain the result */
723
- query: string;
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
  }