/
inline.go
296 lines (269 loc) · 7.42 KB
/
inline.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
package telegram
type InlineQueryResultType string
const (
InlineQueryResultTypeArticle InlineQueryResultType = "article"
InlineQueryResultTypePhoto InlineQueryResultType = "photo"
InlineQueryResultTypeGif InlineQueryResultType = "gif"
InlineQueryResultTypeMpeg4Gif InlineQueryResultType = "mpeg4_gif"
InlineQueryResultTypeVideo InlineQueryResultType = "video"
InlineQueryResultTypeAudio InlineQueryResultType = "audio"
InlineQueryResultTypeVoice InlineQueryResultType = "voice"
InlineQueryResultTypeDocument InlineQueryResultType = "document"
InlineQueryResultTypeLocation InlineQueryResultType = "location"
InlineQueryResultTypeVenue InlineQueryResultType = "venue"
InlineQueryResultTypeContact InlineQueryResultType = "contact"
InlineQueryResultTypeGame InlineQueryResultType = "game"
InlineQueryResultTypeSticker InlineQueryResultType = "sticker"
)
type IDAndTypeSource struct {
Type InlineQueryResultType `json:"type"`
ID string `json:"id"`
}
type TitleSource struct {
Title string `json:"title"`
}
type DescriptionSource struct {
Description string `json:"description"`
}
type InputMessageContentSource struct {
InputMessageContent interface{} `json:"input_message_content"`
}
type InlineQueryResultCachedAudio struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
AudioFileID string `json:"audio_file_id"`
CaptionSource
ParseModeSource
}
type InlineQueryResultCachedDocument struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
TitleSource
DocumentFileID string `json:"document_file_id"`
DescriptionSource
CaptionSource
ParseModeSource
}
type InlineQueryResultCachedGif struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
GifFileID string `json:"gif_file_id"`
TitleSource
CaptionSource
ParseModeSource
}
type InlineQueryResultCachedMpeg4Gif struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
Mpeg4FileID string `json:"mpeg4_file_id"`
TitleSource
CaptionSource
ParseModeSource
}
type InlineQueryResultCachedPhoto struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
PhotoFileID string `json:"photo_file_id"`
TitleSource
DescriptionSource
CaptionSource
ParseModeSource
}
type InlineQueryResultCachedSticker struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
StickerFileID string `json:"sticker_file_id"`
}
type InlineQueryResultCachedVideo struct {
ReplyMarkupSource
IDAndTypeSource
InputMessageContentSource
VideoFileID string `json:"video_file_id"`
TitleSource
DescriptionSource
CaptionSource
ParseModeSource
}
type InlineQueryResultCachedVoice struct {
ReplyMarkupSource
IDAndTypeSource
InputMessageContentSource
VoiceFileID string `json:"voice_file_id"`
TitleSource
CaptionSource
ParseModeSource
}
type InlineQueryResultArticle struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
TitleSource
Url string `json:"url"`
HideUrl bool `json:"hide_url"`
DescriptionSource
ThumbUrl string `json:"thumb_url"`
ThumbWidth int `json:"thumb_width"`
ThumbHeight int `json:"thumb_height"`
}
type InlineQueryResultAudio struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
AudioUrl string `json:"audio_url"`
TitleSource
CaptionSource
ParseModeSource
Performer string `json:"performer"`
AudioDuration int `json:"audio_duration"`
}
type InlineQueryResultContact struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Vcard string `json:"vcard"`
ThumbUrl string `json:"thumb_url"`
ThumbWidth int `json:"thumb_width"`
ThumbHeight int `json:"thumb_height"`
}
type InlineQueryResultGame struct {
IDAndTypeSource
ReplyMarkupSource
GameShortName string `json:"game_short_name"`
}
type InlineQueryResultDocument struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
TitleSource
CaptionSource
ParseModeSource
DocumentUrl string `json:"document_url"`
MimeType string `json:"mime_type"`
DescriptionSource
ThumbUrl string `json:"thumb_url"`
ThumbWidth int `json:"thumb_width"`
ThumbHeight int `json:"thumb_height"`
}
type InlineQueryResultGif struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
GifUrl string `json:"gif_url"`
GifWidth int `json:"gif_width"`
GifHeight int `json:"gif_height"`
GifDuration int `json:"gif_duration"`
ThumbUrl string `json:"thumb_url"`
TitleSource
CaptionSource
ParseModeSource
}
type InlineQueryResultLocation struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title"`
LivePeriod int `json:"live_period"`
ThumbUrl string `json:"thumb_url"`
ThumbWidth int `json:"thumb_width"`
ThumbHeight int `json:"thumb_height"`
}
type InlineQueryResultMpeg4Gif struct {
IDAndTypeSource
InputMessageContentSource
Mpeg4Url string `json:"mpeg4_url"`
Mpeg4Width int `json:"mpeg4_width"`
Mpeg4Height int `json:"mpeg4_height"`
Mpeg4Duration int `json:"mpeg4_duration"`
ThumbUrl string `json:"thumb_url"`
TitleSource
CaptionSource
ParseModeSource
ReplyMarkupSource
}
type InlineQueryResultPhoto struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
PhotoUrl string `json:"photo_url"`
ThumbUrl string `json:"thumb_url"`
PhotoWidth int `json:"photo_width"`
PhotoHeight int `json:"photo_height"`
TitleSource
DescriptionSource
CaptionSource
ParseModeSource
}
type InlineQueryResultVenue struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
TitleSource
Address string `json:"address"`
FoursquareID string `json:"foursquare_id"`
FoursquareType string `json:"foursquare_type"`
ThumbUrl string `json:"thumb_url"`
ThumbWidth int `json:"thumb_width"`
ThumbHeight int `json:"thumb_height"`
}
type InlineQueryResultVideo struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
VideoUrl string `json:"video_url"`
MimeType string `json:"mime_type"`
ThumbUrl string `json:"thumb_url"`
TitleSource
CaptionSource
ParseModeSource
VideoWidth int `json:"video_width"`
VideoHeight int `json:"video_height"`
VideoDuration int `json:"video_duration"`
DescriptionSource
}
type InlineQueryResultVoice struct {
IDAndTypeSource
InputMessageContentSource
ReplyMarkupSource
VoiceUrl string `json:"voice_url"`
TitleSource
CaptionSource
ParseModeSource
VoiceDuration int `json:"voice_duration"`
}
type InputTextMessageContent struct {
MessageText string `json:"message_text"`
ParseModeSource
DisableWebPagePreview bool `json:"disable_web_page_preview"`
}
type InputLocationMessageContent struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
LivePeriod int `json:"live_period"`
}
type InputVenueMessageContent struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
TitleSource
Address string `json:"address"`
FoursquareId string `json:"foursquare_id"`
FoursquareType string `json:"foursquare_type"`
}
type InputContactMessageContent struct {
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Vcard string `json:"vcard"`
}