Skip to content

Commit 109da1a

Browse files
author
Syfaro
committed
Update some types.
1 parent 595aba3 commit 109da1a

File tree

1 file changed

+61
-59
lines changed

1 file changed

+61
-59
lines changed

types.go

Lines changed: 61 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -344,85 +344,87 @@ type InlineQuery struct {
344344

345345
// InlineQueryResultArticle is an inline query response article.
346346
type InlineQueryResultArticle struct {
347-
Type string `json:"type"` // required
348-
ID string `json:"id"` // required
349-
Title string `json:"title"` // required
350-
InputMessageContent interface{} `json:"input_message_content"` // required
351-
ReplyMarkup InlineKeyboardMarkup `json:"reply_markup"`
352-
URL string `json:"url"`
353-
HideURL bool `json:"hide_url"`
354-
Description string `json:"description"`
355-
ThumbURL string `json:"thumb_url"`
356-
ThumbWidth int `json:"thumb_width"`
357-
ThumbHeight int `json:"thumb_height"`
347+
Type string `json:"type"` // required
348+
ID string `json:"id"` // required
349+
Title string `json:"title"` // required
350+
InputMessageContent interface{} `json:"input_message_content"` // required
351+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
352+
URL string `json:"url"`
353+
HideURL bool `json:"hide_url"`
354+
Description string `json:"description"`
355+
ThumbURL string `json:"thumb_url"`
356+
ThumbWidth int `json:"thumb_width"`
357+
ThumbHeight int `json:"thumb_height"`
358358
}
359359

360360
// InlineQueryResultPhoto is an inline query response photo.
361361
type InlineQueryResultPhoto struct {
362-
Type string `json:"type"` // required
363-
ID string `json:"id"` // required
364-
URL string `json:"photo_url"` // required
365-
MimeType string `json:"mime_type"`
366-
Width int `json:"photo_width"`
367-
Height int `json:"photo_height"`
368-
ThumbURL string `json:"thumb_url"`
369-
Title string `json:"title"`
370-
Description string `json:"description"`
371-
Caption string `json:"caption"`
372-
ReplyMarkup InlineKeyboardMarkup `json:"reply_markup"`
373-
InputMessageContent interface{} `json:"input_message_content"`
362+
Type string `json:"type"` // required
363+
ID string `json:"id"` // required
364+
URL string `json:"photo_url"` // required
365+
MimeType string `json:"mime_type"`
366+
Width int `json:"photo_width"`
367+
Height int `json:"photo_height"`
368+
ThumbURL string `json:"thumb_url"`
369+
Title string `json:"title"`
370+
Description string `json:"description"`
371+
Caption string `json:"caption"`
372+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
373+
InputMessageContent interface{} `json:"input_message_content"`
374374
}
375375

376376
// InlineQueryResultGIF is an inline query response GIF.
377377
type InlineQueryResultGIF struct {
378-
Type string `json:"type"` // required
379-
ID string `json:"id"` // required
380-
URL string `json:"gif_url"` // required
381-
Width int `json:"gif_width"`
382-
Height int `json:"gif_height"`
383-
ThumbURL string `json:"thumb_url"`
384-
Title string `json:"title"`
385-
Caption string `json:"caption"`
386-
ReplyMarkup InlineKeyboardMarkup `json:"reply_markup"`
387-
InputMessageContent interface{} `json:"input_message_content"`
378+
Type string `json:"type"` // required
379+
ID string `json:"id"` // required
380+
URL string `json:"gif_url"` // required
381+
Width int `json:"gif_width"`
382+
Height int `json:"gif_height"`
383+
ThumbURL string `json:"thumb_url"`
384+
Title string `json:"title"`
385+
Caption string `json:"caption"`
386+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
387+
InputMessageContent interface{} `json:"input_message_content"`
388388
}
389389

390390
// InlineQueryResultMPEG4GIF is an inline query response MPEG4 GIF.
391391
type InlineQueryResultMPEG4GIF struct {
392-
Type string `json:"type"` // required
393-
ID string `json:"id"` // required
394-
URL string `json:"mpeg4_url"` // required
395-
Width int `json:"mpeg4_width"`
396-
Height int `json:"mpeg4_height"`
397-
ThumbURL string `json:"thumb_url"`
398-
Title string `json:"title"`
399-
Caption string `json:"caption"`
400-
ReplyMarkup InlineKeyboardMarkup `json:"reply_markup"`
401-
InputMessageContent interface{} `json:"input_message_content"`
392+
Type string `json:"type"` // required
393+
ID string `json:"id"` // required
394+
URL string `json:"mpeg4_url"` // required
395+
Width int `json:"mpeg4_width"`
396+
Height int `json:"mpeg4_height"`
397+
ThumbURL string `json:"thumb_url"`
398+
Title string `json:"title"`
399+
Caption string `json:"caption"`
400+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
401+
InputMessageContent interface{} `json:"input_message_content"`
402402
}
403403

404404
// InlineQueryResultVideo is an inline query response video.
405405
type InlineQueryResultVideo struct {
406-
Type string `json:"type"` // required
407-
ID string `json:"id"` // required
408-
URL string `json:"video_url"` // required
409-
MimeType string `json:"mime_type"` // required
410-
ThumbURL string `json:"thumb_url"`
411-
Title string `json:"title"`
412-
Caption string `json:"caption"`
413-
Width int `json:"video_width"`
414-
Height int `json:"video_height"`
415-
Duration int `json:"video_duration"`
416-
Description string `json:"description"`
417-
ReplyMarkup InlineKeyboardMarkup `json:"reply_markup"`
418-
InputMessageContent interface{} `json:"input_message_content"`
406+
Type string `json:"type"` // required
407+
ID string `json:"id"` // required
408+
URL string `json:"video_url"` // required
409+
MimeType string `json:"mime_type"` // required
410+
ThumbURL string `json:"thumb_url"`
411+
Title string `json:"title"`
412+
Caption string `json:"caption"`
413+
Width int `json:"video_width"`
414+
Height int `json:"video_height"`
415+
Duration int `json:"video_duration"`
416+
Description string `json:"description"`
417+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"`
418+
InputMessageContent interface{} `json:"input_message_content"`
419419
}
420420

421421
// ChosenInlineResult is an inline query result chosen by a User
422422
type ChosenInlineResult struct {
423-
ResultID string `json:"result_id"`
424-
From User `json:"from"`
425-
Query string `json:"query"`
423+
ResultID string `json:"result_id"`
424+
From User `json:"from"`
425+
Location Location `json:"location"`
426+
InlineMessageID string `json:"inline_message_id"`
427+
Query string `json:"query"`
426428
}
427429

428430
// InputTextMessageContent contains text for displaying

0 commit comments

Comments
 (0)