grammy-tools 1.36.2

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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +339 -0
  3. package/out/bot.d.ts +314 -0
  4. package/out/bot.js +669 -0
  5. package/out/composer.d.ts +764 -0
  6. package/out/composer.js +704 -0
  7. package/out/context.d.ts +1618 -0
  8. package/out/context.js +1976 -0
  9. package/out/convenience/constants.d.ts +98 -0
  10. package/out/convenience/constants.js +37 -0
  11. package/out/convenience/frameworks.d.ts +216 -0
  12. package/out/convenience/frameworks.js +370 -0
  13. package/out/convenience/inline_query.d.ts +401 -0
  14. package/out/convenience/inline_query.js +461 -0
  15. package/out/convenience/input_media.d.ts +72 -0
  16. package/out/convenience/input_media.js +82 -0
  17. package/out/convenience/keyboard.d.ts +763 -0
  18. package/out/convenience/keyboard.js +935 -0
  19. package/out/convenience/session.d.ts +345 -0
  20. package/out/convenience/session.js +455 -0
  21. package/out/convenience/webhook.d.ts +59 -0
  22. package/out/convenience/webhook.js +80 -0
  23. package/out/core/api.d.ts +1628 -0
  24. package/out/core/api.js +1907 -0
  25. package/out/core/client.d.ts +180 -0
  26. package/out/core/client.js +226 -0
  27. package/out/core/error.d.ts +53 -0
  28. package/out/core/error.js +87 -0
  29. package/out/core/payload.d.ts +39 -0
  30. package/out/core/payload.js +199 -0
  31. package/out/filter.d.ts +959 -0
  32. package/out/filter.js +378 -0
  33. package/out/mod.d.ts +14 -0
  34. package/out/mod.js +43 -0
  35. package/out/platform.node.d.ts +16 -0
  36. package/out/platform.node.js +43 -0
  37. package/out/shim.node.d.ts +2 -0
  38. package/out/shim.node.js +7 -0
  39. package/out/types.d.ts +1 -0
  40. package/out/types.js +17 -0
  41. package/out/types.node.d.ts +78 -0
  42. package/out/types.node.js +107 -0
  43. package/out/web.d.ts +1 -0
  44. package/out/web.mjs +5172 -0
  45. package/package.json +71 -0
@@ -0,0 +1,401 @@
1
+ import { type InlineQueryResultArticle, type InlineQueryResultAudio, type InlineQueryResultCachedAudio, type InlineQueryResultCachedDocument, type InlineQueryResultCachedGif, type InlineQueryResultCachedMpeg4Gif, type InlineQueryResultCachedPhoto, type InlineQueryResultCachedSticker, type InlineQueryResultCachedVideo, type InlineQueryResultCachedVoice, type InlineQueryResultContact, type InlineQueryResultDocument, type InlineQueryResultGame, type InlineQueryResultGif, type InlineQueryResultLocation, type InlineQueryResultMpeg4Gif, type InlineQueryResultPhoto, type InlineQueryResultVenue, type InlineQueryResultVideo, type InlineQueryResultVoice, type InputContactMessageContent, type InputInvoiceMessageContent, type InputLocationMessageContent, type InputTextMessageContent, type InputVenueMessageContent, type LabeledPrice } from "../types.js";
2
+ type InlineQueryResultOptions<T, K extends keyof T> = Omit<T, "type" | "id" | "input_message_content" | K>;
3
+ type OptionalKeys<T> = {
4
+ [K in keyof T]-?: undefined extends T[K] ? K : never;
5
+ };
6
+ type OptionalFields<T> = Pick<T, OptionalKeys<T>[keyof T]>;
7
+ /**
8
+ * Holds a number of helper methods for building `InlineQueryResult*` objects.
9
+ *
10
+ * For example, letting the user pick one out of three photos can be done like
11
+ * this.
12
+ *
13
+ * ```ts
14
+ * const results = [
15
+ * InlineQueryResultBuilder.photo('id0', 'https://grammy.dev/images/Y.png'),
16
+ * InlineQueryResultBuilder.photo('id1', 'https://grammy.dev/images/Y.png'),
17
+ * InlineQueryResultBuilder.photo('id2', 'https://grammy.dev/images/Y.png'),
18
+ * ];
19
+ * await ctx.answerInlineQuery(results)
20
+ * ```
21
+ *
22
+ * If you want the message content to be different from the content in the
23
+ * inline query result, you can perform another method call on the resulting
24
+ * objects.
25
+ *
26
+ * ```ts
27
+ * const results = [
28
+ * InlineQueryResultBuilder.photo("id0", "https://grammy.dev/images/Y.png")
29
+ * .text("Picked photo 0!"),
30
+ * InlineQueryResultBuilder.photo("id1", "https://grammy.dev/images/Y.png")
31
+ * .text("Picked photo 1!"),
32
+ * InlineQueryResultBuilder.photo("id2", "https://grammy.dev/images/Y.png")
33
+ * .text("Picked photo 2!"),
34
+ * ];
35
+ * await ctx.answerInlineQuery(results)
36
+ * ```
37
+ *
38
+ * Be sure to check the
39
+ * [documentation](https://core.telegram.org/bots/api#inline-mode) on inline
40
+ * mode.
41
+ */
42
+ export declare const InlineQueryResultBuilder: {
43
+ /**
44
+ * Builds an InlineQueryResultArticle object as specified by
45
+ * https://core.telegram.org/bots/api#inlinequeryresultarticle. Requires you
46
+ * to specify the actual message content by calling another function on the
47
+ * object returned from this method.
48
+ *
49
+ * @param id Unique identifier for this result, 1-64 Bytes
50
+ * @param title Title of the result
51
+ * @param options Remaining options
52
+ */
53
+ article(id: string, title: string, options?: InlineQueryResultOptions<InlineQueryResultArticle, "title">): {
54
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultArticle;
55
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultArticle;
56
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultArticle;
57
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultArticle;
58
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultArticle;
59
+ };
60
+ /**
61
+ * Builds an InlineQueryResultAudio object as specified by
62
+ * https://core.telegram.org/bots/api#inlinequeryresultaudio.
63
+ *
64
+ * @param id Unique identifier for this result, 1-64 bytes
65
+ * @param title Title
66
+ * @param audio_url A valid URL for the audio file
67
+ * @param options Remaining options
68
+ */
69
+ audio(id: string, title: string, audio_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultAudio, "title" | "audio_url">): InlineQueryResultAudio & {
70
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultAudio;
71
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultAudio;
72
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultAudio;
73
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultAudio;
74
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultAudio;
75
+ };
76
+ /**
77
+ * Builds an InlineQueryResultCachedAudio object as specified by
78
+ * https://core.telegram.org/bots/api#inlinequeryresultcachedaudio.
79
+ *
80
+ * @param id Unique identifier for this result, 1-64 bytes
81
+ * @param audio_file_id A valid file identifier for the audio file
82
+ * @param options Remaining options
83
+ */
84
+ audioCached(id: string, audio_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedAudio, "audio_file_id">): InlineQueryResultCachedAudio & {
85
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedAudio;
86
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedAudio;
87
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedAudio;
88
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedAudio;
89
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedAudio;
90
+ };
91
+ /**
92
+ * Builds an InlineQueryResultContact object as specified by
93
+ * https://core.telegram.org/bots/api#inlinequeryresultcontact.
94
+ *
95
+ * @param id Unique identifier for this result, 1-64 Bytes
96
+ * @param phone_number Contact's phone number
97
+ * @param first_name Contact's first name
98
+ * @param options Remaining options
99
+ */
100
+ contact(id: string, phone_number: string, first_name: string, options?: InlineQueryResultOptions<InlineQueryResultContact, "phone_number" | "first_name">): InlineQueryResultContact & {
101
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultContact;
102
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultContact;
103
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultContact;
104
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultContact;
105
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultContact;
106
+ };
107
+ /**
108
+ * Builds an InlineQueryResultDocument object as specified by
109
+ * https://core.telegram.org/bots/api#inlinequeryresultdocument with
110
+ * mime_type set to "application/pdf".
111
+ *
112
+ * @param id Unique identifier for this result, 1-64 bytes
113
+ * @param title Title for the result
114
+ * @param document_url A valid URL for the file
115
+ * @param options Remaining options
116
+ */
117
+ documentPdf(id: string, title: string, document_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultDocument, "mime_type" | "title" | "document_url">): InlineQueryResultDocument & {
118
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultDocument;
119
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultDocument;
120
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultDocument;
121
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultDocument;
122
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultDocument;
123
+ };
124
+ /**
125
+ * Builds an InlineQueryResultDocument object as specified by
126
+ * https://core.telegram.org/bots/api#inlinequeryresultdocument with
127
+ * mime_type set to "application/zip".
128
+ *
129
+ * @param id Unique identifier for this result, 1-64 bytes
130
+ * @param title Title for the result
131
+ * @param document_url A valid URL for the file
132
+ * @param options Remaining options
133
+ */
134
+ documentZip(id: string, title: string, document_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultDocument, "mime_type" | "title" | "document_url">): InlineQueryResultDocument & {
135
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultDocument;
136
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultDocument;
137
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultDocument;
138
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultDocument;
139
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultDocument;
140
+ };
141
+ /**
142
+ * Builds an InlineQueryResultCachedDocument object as specified by
143
+ * https://core.telegram.org/bots/api#inlinequeryresultcacheddocument.
144
+ *
145
+ * @param id Unique identifier for this result, 1-64 bytes
146
+ * @param title Title for the result
147
+ * @param document_file_id A valid file identifier for the file
148
+ * @param options Remaining options
149
+ */
150
+ documentCached(id: string, title: string, document_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedDocument, "title" | "document_file_id">): InlineQueryResultCachedDocument & {
151
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedDocument;
152
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedDocument;
153
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedDocument;
154
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedDocument;
155
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedDocument;
156
+ };
157
+ /**
158
+ * Builds an InlineQueryResultGame object as specified by
159
+ * https://core.telegram.org/bots/api#inlinequeryresultgame.
160
+ *
161
+ * @param id Unique identifier for this result, 1-64 bytes
162
+ * @param game_short_name Short name of the game
163
+ * @param options Remaining options
164
+ */
165
+ game(id: string, game_short_name: string, options?: InlineQueryResultOptions<InlineQueryResultGame, "game_short_name">): {
166
+ reply_markup?: import("@grammyjs/types/markup.js").InlineKeyboardMarkup | undefined;
167
+ type: string;
168
+ id: string;
169
+ game_short_name: string;
170
+ };
171
+ /**
172
+ * Builds an InlineQueryResultGif object as specified by
173
+ * https://core.telegram.org/bots/api#inlinequeryresultgif.
174
+ *
175
+ * @param id Unique identifier for this result, 1-64 bytes
176
+ * @param gif_url A valid URL for the GIF file. File size must not exceed 1MB
177
+ * @param thumbnail_url URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
178
+ * @param options Remaining options
179
+ */
180
+ gif(id: string, gif_url: string | URL, thumbnail_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultGif, "gif_url" | "thumbnail_url">): InlineQueryResultGif & {
181
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultGif;
182
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultGif;
183
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultGif;
184
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultGif;
185
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultGif;
186
+ };
187
+ /**
188
+ * Builds an InlineQueryResultCachedGif object as specified by
189
+ * https://core.telegram.org/bots/api#inlinequeryresultcachedgif.
190
+ *
191
+ * @param id Unique identifier for this result, 1-64 bytes
192
+ * @param gif_file_id A valid file identifier for the GIF file
193
+ * @param options Remaining options
194
+ */
195
+ gifCached(id: string, gif_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedGif, "gif_file_id">): InlineQueryResultCachedGif & {
196
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedGif;
197
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedGif;
198
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedGif;
199
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedGif;
200
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedGif;
201
+ };
202
+ /**
203
+ * Builds an InlineQueryResultLocation object as specified by
204
+ * https://core.telegram.org/bots/api#inlinequeryresultlocation.
205
+ *
206
+ * @param id Unique identifier for this result, 1-64 Bytes
207
+ * @param title Location title
208
+ * @param latitude Location latitude in degrees
209
+ * @param longitude Location longitude in degrees
210
+ * @param options Remaining options
211
+ */
212
+ location(id: string, title: string, latitude: number, longitude: number, options?: InlineQueryResultOptions<InlineQueryResultLocation, "title" | "latitude" | "longitude">): InlineQueryResultLocation & {
213
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultLocation;
214
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultLocation;
215
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultLocation;
216
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultLocation;
217
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultLocation;
218
+ };
219
+ /**
220
+ * Builds an InlineQueryResultMpeg4Gif object as specified by
221
+ * https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif.
222
+ *
223
+ * @param id Unique identifier for this result, 1-64 bytes
224
+ * @param mpeg4_url A valid URL for the MPEG4 file. File size must not exceed 1MB
225
+ * @param thumbnail_url URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
226
+ * @param options Remaining options
227
+ */
228
+ mpeg4gif(id: string, mpeg4_url: string | URL, thumbnail_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultMpeg4Gif, "mpeg4_url" | "thumbnail_url">): InlineQueryResultMpeg4Gif & {
229
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultMpeg4Gif;
230
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultMpeg4Gif;
231
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultMpeg4Gif;
232
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultMpeg4Gif;
233
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultMpeg4Gif;
234
+ };
235
+ /**
236
+ * Builds an InlineQueryResultCachedMpeg4Gif object as specified by
237
+ * https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif.
238
+ *
239
+ * @param id Unique identifier for this result, 1-64 bytes
240
+ * @param mpeg4_file_id A valid file identifier for the MPEG4 file
241
+ * @param options Remaining options
242
+ */
243
+ mpeg4gifCached(id: string, mpeg4_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedMpeg4Gif, "mpeg4_file_id">): InlineQueryResultCachedMpeg4Gif & {
244
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedMpeg4Gif;
245
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedMpeg4Gif;
246
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedMpeg4Gif;
247
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedMpeg4Gif;
248
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedMpeg4Gif;
249
+ };
250
+ /**
251
+ * Builds an InlineQueryResultPhoto object as specified by
252
+ * https://core.telegram.org/bots/api#inlinequeryresultphoto with the
253
+ * thumbnail defaulting to the photo itself.
254
+ *
255
+ * @param id Unique identifier for this result, 1-64 bytes
256
+ * @param photo_url A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
257
+ * @param options Remaining options
258
+ */
259
+ photo(id: string, photo_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultPhoto, "photo_url">): InlineQueryResultPhoto & {
260
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultPhoto;
261
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultPhoto;
262
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultPhoto;
263
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultPhoto;
264
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultPhoto;
265
+ };
266
+ /**
267
+ * Builds an InlineQueryResultCachedPhoto object as specified by
268
+ * https://core.telegram.org/bots/api#inlinequeryresultcachedphoto.
269
+ *
270
+ * @param id Unique identifier for this result, 1-64 bytes
271
+ * @param photo_file_id A valid file identifier of the photo
272
+ * @param options Remaining options
273
+ */
274
+ photoCached(id: string, photo_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedPhoto, "photo_file_id">): InlineQueryResultCachedPhoto & {
275
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedPhoto;
276
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedPhoto;
277
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedPhoto;
278
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedPhoto;
279
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedPhoto;
280
+ };
281
+ /**
282
+ * Builds an InlineQueryResultCachedSticker object as specified by
283
+ * https://core.telegram.org/bots/api#inlinequeryresultcachedsticker.
284
+ *
285
+ * @param id Unique identifier for this result, 1-64 bytes
286
+ * @param sticker_file_id A valid file identifier of the sticker
287
+ * @param options Remaining options
288
+ */
289
+ stickerCached(id: string, sticker_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedSticker, "sticker_file_id">): InlineQueryResultCachedSticker & {
290
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedSticker;
291
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedSticker;
292
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedSticker;
293
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedSticker;
294
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedSticker;
295
+ };
296
+ /**
297
+ * Builds an InlineQueryResultVenue object as specified by
298
+ * https://core.telegram.org/bots/api#inlinequeryresultvenue.
299
+ *
300
+ * @param id Unique identifier for this result, 1-64 Bytes
301
+ * @param title Title of the venue
302
+ * @param latitude Latitude of the venue location in degrees
303
+ * @param longitude Longitude of the venue location in degrees
304
+ * @param address Address of the venue
305
+ * @param options Remaining options
306
+ */
307
+ venue(id: string, title: string, latitude: number, longitude: number, address: string, options?: InlineQueryResultOptions<InlineQueryResultVenue, "title" | "latitude" | "longitude" | "address">): InlineQueryResultVenue & {
308
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultVenue;
309
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultVenue;
310
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultVenue;
311
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultVenue;
312
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultVenue;
313
+ };
314
+ /**
315
+ * Builds an InlineQueryResultVideo object as specified by
316
+ * https://core.telegram.org/bots/api#inlinequeryresultvideo with mime_type
317
+ * set to "text/html". This will send an embedded video player. Requires you
318
+ * to specify the actual message content by calling another function on the
319
+ * object returned from this method.
320
+ *
321
+ * @param id Unique identifier for this result, 1-64 bytes
322
+ * @param title Title for the result
323
+ * @param video_url A valid URL for the embedded video player
324
+ * @param thumbnail_url URL of the thumbnail (JPEG only) for the video
325
+ * @param options Remaining options
326
+ */
327
+ videoHtml(id: string, title: string, video_url: string | URL, thumbnail_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultVideo, "mime_type" | "title" | "video_url" | "thumbnail_url">): {
328
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultVideo;
329
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultVideo;
330
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultVideo;
331
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultVideo;
332
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultVideo;
333
+ };
334
+ /**
335
+ * Builds an InlineQueryResultVideo object as specified by
336
+ * https://core.telegram.org/bots/api#inlinequeryresultvideo with mime_type
337
+ * set to "video/mp4".
338
+ *
339
+ * @param id Unique identifier for this result, 1-64 bytes
340
+ * @param title Title for the result
341
+ * @param video_url A valid URL for the video file
342
+ * @param thumbnail_url URL of the thumbnail (JPEG only) for the video
343
+ * @param options Remaining options
344
+ */
345
+ videoMp4(id: string, title: string, video_url: string | URL, thumbnail_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultVideo, "mime_type" | "title" | "video_url" | "thumbnail_url">): InlineQueryResultVideo & {
346
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultVideo;
347
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultVideo;
348
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultVideo;
349
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultVideo;
350
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultVideo;
351
+ };
352
+ /**
353
+ * Builds an InlineQueryResultCachedVideo object as specified by
354
+ * https://core.telegram.org/bots/api#inlinequeryresultcachedvideo.
355
+ *
356
+ * @param id Unique identifier for this result, 1-64 bytes
357
+ * @param title Title for the result
358
+ * @param video_file_id A valid file identifier for the video file
359
+ * @param options Remaining options
360
+ */
361
+ videoCached(id: string, title: string, video_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedVideo, "title" | "video_file_id">): InlineQueryResultCachedVideo & {
362
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedVideo;
363
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedVideo;
364
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedVideo;
365
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedVideo;
366
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedVideo;
367
+ };
368
+ /**
369
+ * Builds an InlineQueryResultVoice object as specified by
370
+ * https://core.telegram.org/bots/api#inlinequeryresultvoice.
371
+ *
372
+ * @param id Unique identifier for this result, 1-64 bytes
373
+ * @param title Voice message title
374
+ * @param voice_url A valid URL for the voice recording
375
+ * @param options Remaining options
376
+ */
377
+ voice(id: string, title: string, voice_url: string | URL, options?: InlineQueryResultOptions<InlineQueryResultVoice, "title" | "voice_url">): InlineQueryResultVoice & {
378
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultVoice;
379
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultVoice;
380
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultVoice;
381
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultVoice;
382
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultVoice;
383
+ };
384
+ /**
385
+ * Builds an InlineQueryResultCachedVoice object as specified by
386
+ * https://core.telegram.org/bots/api#inlinequeryresultcachedvoice.
387
+ *
388
+ * @param id Unique identifier for this result, 1-64 bytes
389
+ * @param title Voice message title
390
+ * @param voice_file_id A valid file identifier for the voice message
391
+ * @param options Remaining options
392
+ */
393
+ voiceCached(id: string, title: string, voice_file_id: string, options?: InlineQueryResultOptions<InlineQueryResultCachedVoice, "title" | "voice_file_id">): InlineQueryResultCachedVoice & {
394
+ text(message_text: string, options?: OptionalFields<InputTextMessageContent>): InlineQueryResultCachedVoice;
395
+ location(latitude: number, longitude: number, options?: OptionalFields<InputLocationMessageContent>): InlineQueryResultCachedVoice;
396
+ venue(title: string, latitude: number, longitude: number, address: string, options: OptionalFields<InputVenueMessageContent>): InlineQueryResultCachedVoice;
397
+ contact(first_name: string, phone_number: string, options?: OptionalFields<InputContactMessageContent>): InlineQueryResultCachedVoice;
398
+ invoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], options?: OptionalFields<InputInvoiceMessageContent>): InlineQueryResultCachedVoice;
399
+ };
400
+ };
401
+ export {};