forked from go-telegram/bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inline_query.go
679 lines (581 loc) · 27.3 KB
/
inline_query.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
package models
import (
"encoding/json"
)
// InlineQuery https://core.telegram.org/bots/api#inlinequery
type InlineQuery struct {
ID string `json:"id"`
From *User `json:"from"`
Query string `json:"query"`
Offset string `json:"offset"`
ChatType string `json:"chat_type,omitempty"`
Location *Location `json:"location,omitempty"`
}
// AnswerInlineQuery https://core.telegram.org/bots/api#answerinlinequery
type AnswerInlineQuery struct {
InlineQueryID string `json:"inline_query_id"`
Results []InlineQueryResult `json:"results"`
CacheTime int `json:"cache_time,omitempty"`
IsPersonal bool `json:"is_personal,omitempty"`
NextOffset string `json:"next_offset,omitempty"`
SwitchPmText string `json:"switch_pm_text,omitempty"`
SwitchPmParameter string `json:"switch_pm_parameter,omitempty"`
}
// InlineQueryResultsButton https://core.telegram.org/bots/api#inlinequeryresultsbutton
type InlineQueryResultsButton struct {
Text string `json:"text"`
WebApp *WebAppInfo `json:"web_app"`
StartParameter string `json:"start_parameter,omitempty"`
}
// InlineQueryResult https://core.telegram.org/bots/api#inlinequeryresult
type InlineQueryResult interface {
inlineQueryResultTag()
MarshalCustom() ([]byte, error)
}
// InlineQueryResultArticle https://core.telegram.org/bots/api#inlinequeryresultarticle
type InlineQueryResultArticle struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
URL string `json:"url,omitempty"`
HideURL bool `json:"hide_url,omitempty"`
Description string `json:"description,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
func (InlineQueryResultArticle) inlineQueryResultTag() {}
func (m *InlineQueryResultArticle) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultArticle
}{
Type: "article",
InlineQueryResultArticle: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultPhoto https://core.telegram.org/bots/api#inlinequeryresultphoto
type InlineQueryResultPhoto struct {
ID string `json:"id"`
PhotoURL string `json:"photo_url"`
ThumbnailURL string `json:"thumbnail_url"`
PhotoWidth int `json:"photo_width,omitempty"`
PhotoHeight int `json:"photo_height,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultPhoto) inlineQueryResultTag() {}
func (m *InlineQueryResultPhoto) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultPhoto
}{
Type: "photo",
InlineQueryResultPhoto: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultGif https://core.telegram.org/bots/api#inlinequeryresultgif
type InlineQueryResultGif struct {
ID string `json:"id"`
GifURL string `json:"gif_url"`
GifWidth int `json:"gif_width,omitempty"`
GifHeight int `json:"gif_height,omitempty"`
GifDuration int `json:"gif_duration,omitempty"`
ThumbnailURL string `json:"thumbnail_url"`
ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultGif) inlineQueryResultTag() {}
func (m *InlineQueryResultGif) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultGif
}{
Type: "gif",
InlineQueryResultGif: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultMpeg4Gif https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
type InlineQueryResultMpeg4Gif struct {
ID string `json:"id"`
Mpeg4URL string `json:"mpeg4_url"`
Mpeg4Width int `json:"mpeg4_width,omitempty"`
Mpeg4Height int `json:"mpeg4_height,omitempty"`
Mpeg4Duration int `json:"mpeg4_duration,omitempty"`
ThumbnailURL string `json:"thumbnail_url"`
ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultMpeg4Gif) inlineQueryResultTag() {}
func (m *InlineQueryResultMpeg4Gif) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultMpeg4Gif
}{
Type: "mpeg4_gif",
InlineQueryResultMpeg4Gif: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultVideo https://core.telegram.org/bots/api#inlinequeryresultvideo
type InlineQueryResultVideo struct {
ID string `json:"id"`
VideoURL string `json:"video_url"`
MimeType string `json:"mime_type,omitempty"`
ThumbnailURL string `json:"thumbnail_url"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
VideoWidth int `json:"video_width,omitempty"`
VideoHeight int `json:"video_height,omitempty"`
VideoDuration int `json:"video_duration,omitempty"`
Description string `json:"description,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultVideo) inlineQueryResultTag() {}
func (m *InlineQueryResultVideo) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultVideo
}{
Type: "video",
InlineQueryResultVideo: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultAudio https://core.telegram.org/bots/api#inlinequeryresultaudio
type InlineQueryResultAudio struct {
ID string `json:"id"`
AudioURL string `json:"audio_url"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
Performer string `json:"performer,omitempty"`
AudioDuration int `json:"audio_duration,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultAudio) inlineQueryResultTag() {}
func (m *InlineQueryResultAudio) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultAudio
}{
Type: "audio",
InlineQueryResultAudio: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultVoice https://core.telegram.org/bots/api#inlinequeryresultvoice
type InlineQueryResultVoice struct {
ID string `json:"id"`
VoiceURL string `json:"voice_url"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
VoiceDuration int `json:"voice_duration,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultVoice) inlineQueryResultTag() {}
func (m *InlineQueryResultVoice) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultVoice
}{
Type: "voice",
InlineQueryResultVoice: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultDocument https://core.telegram.org/bots/api#inlinequeryresultdocument
type InlineQueryResultDocument struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
DocumentURL string `json:"document_url"`
MimeType string `json:"mime_type"`
Description string `json:"description,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
func (InlineQueryResultDocument) inlineQueryResultTag() {}
func (m *InlineQueryResultDocument) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultDocument
}{
Type: "document",
InlineQueryResultDocument: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultLocation https://core.telegram.org/bots/api#inlinequeryresultlocation
type InlineQueryResultLocation struct {
ID string `json:"id"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title,omitempty"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
LivePeriod int `json:"live_period,omitempty"`
Heading int `json:"heading,omitempty"`
ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
func (InlineQueryResultLocation) inlineQueryResultTag() {}
func (m *InlineQueryResultLocation) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultLocation
}{
Type: "location",
InlineQueryResultLocation: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultVenue https://core.telegram.org/bots/api#inlinequeryresultvenue
type InlineQueryResultVenue struct {
ID string `json:"id"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title,omitempty"`
Address string `json:"address"`
FoursquareID string `json:"foursquare_id,omitempty"`
FoursquareType string `json:"foursquare_type,omitempty"`
GooglePlaceID string `json:"google_place_id,omitempty"`
GooglePlaceType string `json:"google_place_type,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
func (InlineQueryResultVenue) inlineQueryResultTag() {}
func (m *InlineQueryResultVenue) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultVenue
}{
Type: "venue",
InlineQueryResultVenue: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultContact https://core.telegram.org/bots/api#inlinequeryresultcontact
type InlineQueryResultContact struct {
ID string `json:"id"`
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name,omitempty"`
VCard string `json:"vcard,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
func (InlineQueryResultContact) inlineQueryResultTag() {}
func (m *InlineQueryResultContact) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultContact
}{
Type: "contact",
InlineQueryResultContact: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultGame https://core.telegram.org/bots/api#inlinequeryresultgame
type InlineQueryResultGame struct {
ID string `json:"id"`
GameShortName string `json:"game_short_name"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
}
func (InlineQueryResultGame) inlineQueryResultTag() {}
func (m *InlineQueryResultGame) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultGame
}{
Type: "game",
InlineQueryResultGame: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedPhoto https://core.telegram.org/bots/api#inlinequeryresultcachedphoto
type InlineQueryResultCachedPhoto struct {
ID string `json:"id"`
PhotoFileID string `json:"photo_file_id"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedPhoto) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedPhoto) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedPhoto
}{
Type: "photo",
InlineQueryResultCachedPhoto: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedGif https://core.telegram.org/bots/api#inlinequeryresultcachedgif
type InlineQueryResultCachedGif struct {
ID string `json:"id"`
GifFileID string `json:"gif_file_id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedGif) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedGif) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedGif
}{
Type: "gif",
InlineQueryResultCachedGif: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedMpeg4Gif https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif
type InlineQueryResultCachedMpeg4Gif struct {
ID string `json:"id"`
Mpeg4FileID string `json:"mpeg4_file_id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedMpeg4Gif) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedMpeg4Gif) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedMpeg4Gif
}{
Type: "mpeg4_gif",
InlineQueryResultCachedMpeg4Gif: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedSticker https://core.telegram.org/bots/api#inlinequeryresultcachedsticker
type InlineQueryResultCachedSticker struct {
ID string `json:"id"`
StickerFileID string `json:"sticker_file_id"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedSticker) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedSticker) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedSticker
}{
Type: "sticker",
InlineQueryResultCachedSticker: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedDocument https://core.telegram.org/bots/api#inlinequeryresultcacheddocument
type InlineQueryResultCachedDocument struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
DocumentFileID string `json:"document_file_id"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedDocument) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedDocument) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedDocument
}{
Type: "document",
InlineQueryResultCachedDocument: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedVideo https://core.telegram.org/bots/api#inlinequeryresultcachedvideo
type InlineQueryResultCachedVideo struct {
ID string `json:"id"`
VideoFileID string `json:"video_file_id"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedVideo) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedVideo) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedVideo
}{
Type: "video",
InlineQueryResultCachedVideo: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedVoice https://core.telegram.org/bots/api#inlinequeryresultcachedvoice
type InlineQueryResultCachedVoice struct {
ID string `json:"id"`
VoiceFileID string `json:"voice_file_id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedVoice) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedVoice) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedVoice
}{
Type: "voice",
InlineQueryResultCachedVoice: m,
}
return json.Marshal(&ret)
}
// InlineQueryResultCachedAudio https://core.telegram.org/bots/api#inlinequeryresultcachedaudio
type InlineQueryResultCachedAudio struct {
ID string `json:"id"`
AudioFileID string `json:"audio_file_id"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
func (InlineQueryResultCachedAudio) inlineQueryResultTag() {}
func (m *InlineQueryResultCachedAudio) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*InlineQueryResultCachedAudio
}{
Type: "audio",
InlineQueryResultCachedAudio: m,
}
return json.Marshal(&ret)
}
// InputMessageContent https://core.telegram.org/bots/api#inputmessagecontent
type InputMessageContent interface {
inputMessageContentTag()
}
// InputTextMessageContent https://core.telegram.org/bots/api#inputtextmessagecontent
type InputTextMessageContent struct {
MessageText string `json:"message_text"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
Entities []MessageEntity `json:"entities,omitempty"`
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
}
func (InputTextMessageContent) inputMessageContentTag() {}
// InputLocationMessageContent https://core.telegram.org/bots/api#inputlocationmessagecontent
type InputLocationMessageContent struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
LivePeriod int `json:"live_period,omitempty"`
Heading int `json:"heading,omitempty"`
ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
}
func (InputLocationMessageContent) inputMessageContentTag() {}
// InputVenueMessageContent https://core.telegram.org/bots/api#inputvenuemessagecontent
type InputVenueMessageContent struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title"`
Address string `json:"address"`
FoursquareID string `json:"foursquare_id,omitempty"`
FoursquareType string `json:"foursquare_type,omitempty"`
GooglePlaceID string `json:"google_place_id,omitempty"`
GooglePlaceType string `json:"google_place_type,omitempty"`
}
func (InputVenueMessageContent) inputMessageContentTag() {}
// InputContactMessageContent https://core.telegram.org/bots/api#inputcontactmessagecontent
type InputContactMessageContent struct {
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name,omitempty"`
VCard string `json:"vcard,omitempty"`
}
func (InputContactMessageContent) inputMessageContentTag() {}
// LabeledPrice https://core.telegram.org/bots/api#labeledprice
type LabeledPrice struct {
Label string `json:"label"`
Amount int `json:"amount"`
}
// InputInvoiceMessageContent https://core.telegram.org/bots/api#inputinvoicemessagecontent
type InputInvoiceMessageContent struct {
Title string `json:"title"`
Description string `json:"description"`
Payload string `json:"payload"`
ProviderToken string `json:"provider_token"`
Currency string `json:"currency"`
Prices []LabeledPrice `json:"prices"`
MaxTipAmount int `json:"max_tip_amount,omitempty"`
SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"`
ProviderData string `json:"provider_data,omitempty"`
PhotoURL string `json:"photo_url,omitempty"`
PhotoSize int `json:"photo_size,omitempty"`
PhotoWidth int `json:"photo_width,omitempty"`
PhotoHeight int `json:"photo_height,omitempty"`
NeedName bool `json:"need_name,omitempty"`
NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
NeedEmail bool `json:"need_email,omitempty"`
NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"`
SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
IsFlexible bool `json:"is_flexible,omitempty"`
}
func (InputInvoiceMessageContent) inputMessageContentTag() {}