@@ -17,8 +17,9 @@ type APIResponse struct {
1717
1818// Update is an update response, from GetUpdates.
1919type Update struct {
20- UpdateID int `json:"update_id"`
21- Message Message `json:"message"`
20+ UpdateID int `json:"update_id"`
21+ Message Message `json:"message"`
22+ InlineQuery InlineQuery `json:"inline_query"`
2223}
2324
2425// User is a user, contained in Message and returned by GetSelf.
@@ -257,3 +258,91 @@ type ForceReply struct {
257258 ForceReply bool `json:"force_reply"`
258259 Selective bool `json:"selective"`
259260}
261+
262+ // InlineQuery is a Query from Telegram for an inline request
263+ type InlineQuery struct {
264+ ID string `json:"id"`
265+ From User `json:"user"`
266+ Query string `json:"query"`
267+ Offset string `json:"offset"`
268+ }
269+
270+ // InlineQueryResult is the base type that all InlineQuery Results have.
271+ type InlineQueryResult struct {
272+ Type string `json:"type"` // required
273+ ID string `json:"id"` // required
274+ }
275+
276+ // InlineQueryResultArticle is an inline query response article.
277+ type InlineQueryResultArticle struct {
278+ InlineQueryResult
279+ Title string `json:"title"` // required
280+ MessageText string `json:"message_text"` // required
281+ ParseMode string `json:"parse_mode"` // required
282+ DisableWebPagePreview bool `json:"disable_web_page_preview"`
283+ URL string `json:"url"`
284+ HideURL bool `json:"hide_url"`
285+ Description string `json:"description"`
286+ ThumbURL string `json:"thumb_url"`
287+ ThumbWidth int `json:"thumb_width"`
288+ ThumbHeight int `json:"thumb_height"`
289+ }
290+
291+ // InlineQueryResultPhoto is an inline query response photo.
292+ type InlineQueryResultPhoto struct {
293+ InlineQueryResult
294+ URL string `json:"photo_url"` // required
295+ MimeType string `json:"mime_type"`
296+ Width int `json:"photo_width"`
297+ Height int `json:"photo_height"`
298+ ThumbURL string `json:"thumb_url"`
299+ Title string `json:"title"`
300+ Description string `json:"description"`
301+ Caption string `json:"caption"`
302+ MessageText string `json:"message_text"`
303+ ParseMode string `json:"parse_mode"`
304+ DisableWebPagePreview bool `json:"disable_web_page_preview"`
305+ }
306+
307+ // InlineQueryResultGIF is an inline query response GIF.
308+ type InlineQueryResultGIF struct {
309+ InlineQueryResult
310+ URL string `json:"gif_url"` // required
311+ Width int `json:"gif_width"`
312+ Height int `json:"gif_height"`
313+ ThumbURL string `json:"thumb_url"`
314+ Title string `json:"title"`
315+ Caption string `json:"caption"`
316+ MessageText string `json:"message_text"`
317+ ParseMode string `json:"parse_mode"`
318+ DisableWebPagePreview bool `json:"disable_web_page_preview"`
319+ }
320+
321+ // InlineQueryResultMPEG4GIF is an inline query response MPEG4 GIF.
322+ type InlineQueryResultMPEG4GIF struct {
323+ InlineQueryResult
324+ URL string `json:"mpeg4_url"` // required
325+ Width int `json:"mpeg4_width"`
326+ Height int `json:"mpeg4_height"`
327+ ThumbURL string `json:"thumb_url"`
328+ Title string `json:"title"`
329+ Caption string `json:"caption"`
330+ MessageText string `json:"message_text"`
331+ ParseMode string `json:"parse_mode"`
332+ DisableWebPagePreview bool `json:"disable_web_page_preview"`
333+ }
334+
335+ // InlineQueryResultVideo is an inline query response video.
336+ type InlineQueryResultVideo struct {
337+ InlineQueryResult
338+ URL string `json:"video_url"` // required
339+ MimeType string `json:"mime_type"` // required
340+ MessageText string `json:"message_text"` // required
341+ ParseMode string `json:"parse_mode"`
342+ DisableWebPagePreview bool `json:"disable_web_page_preview"`
343+ Width int `json:"video_width"`
344+ Height int `json:"video_height"`
345+ ThumbURL string `json:"thumb_url"`
346+ Title string `json:"title"`
347+ Description string `json:"description"`
348+ }
0 commit comments