@@ -19,11 +19,11 @@ type APIResponse struct {
1919
2020// Update is an update response, from GetUpdates.
2121type Update struct {
22- UpdateID int `json:"update_id"`
23- Message Message `json:"message"`
24- InlineQuery InlineQuery `json:"inline_query"`
25- ChosenInlineResult ChosenInlineResult `json:"chosen_inline_result"`
26- CallbackQuery CallbackQuery `json:"callback_query"`
22+ UpdateID int `json:"update_id"`
23+ Message * Message `json:"message"`
24+ InlineQuery * InlineQuery `json:"inline_query"`
25+ ChosenInlineResult * ChosenInlineResult `json:"chosen_inline_result"`
26+ CallbackQuery * CallbackQuery `json:"callback_query"`
2727}
2828
2929// User is a user on Telegram.
@@ -90,36 +90,36 @@ func (c *Chat) IsChannel() bool {
9090// Message is returned by almost every request, and contains data about
9191// almost anything.
9292type Message struct {
93- MessageID int `json:"message_id"`
94- From User `json:"from"` // optional
95- Date int `json:"date"`
96- Chat Chat `json:"chat"`
97- ForwardFrom User `json:"forward_from"` // optional
98- ForwardDate int `json:"forward_date"` // optional
99- ReplyToMessage * Message `json:"reply_to_message"` // optional
100- Text string `json:"text"` // optional
101- Entities []MessageEntity `json:"entities"` // optional
102- Audio Audio `json:"audio"` // optional
103- Document Document `json:"document"` // optional
104- Photo []PhotoSize `json:"photo"` // optional
105- Sticker Sticker `json:"sticker"` // optional
106- Video Video `json:"video"` // optional
107- Voice Voice `json:"voice"` // optional
108- Caption string `json:"caption"` // optional
109- Contact Contact `json:"contact"` // optional
110- Location Location `json:"location"` // optional
111- Venue Venue `json:"venue"` // optional
112- NewChatMember User `json:"new_chat_member"` // optional
113- LeftChatMember User `json:"left_chat_member"` // optional
114- NewChatTitle string `json:"new_chat_title"` // optional
115- NewChatPhoto []PhotoSize `json:"new_chat_photo"` // optional
116- DeleteChatPhoto bool `json:"delete_chat_photo"` // optional
117- GroupChatCreated bool `json:"group_chat_created"` // optional
118- SuperGroupChatCreated bool `json:"supergroup_chat_created"` // optional
119- ChannelChatCreated bool `json:"channel_chat_created"` // optional
120- MigrateToChatID int64 `json:"migrate_to_chat_id"` // optional
121- MigrateFromChatID int64 `json:"migrate_from_chat_id"` // optional
122- PinnedMessage * Message `json:"pinned_message"` // optional
93+ MessageID int `json:"message_id"`
94+ From * User `json:"from"` // optional
95+ Date int `json:"date"`
96+ Chat * Chat `json:"chat"`
97+ ForwardFrom * User `json:"forward_from"` // optional
98+ ForwardDate int `json:"forward_date"` // optional
99+ ReplyToMessage * Message `json:"reply_to_message"` // optional
100+ Text string `json:"text"` // optional
101+ Entities * []MessageEntity `json:"entities"` // optional
102+ Audio * Audio `json:"audio"` // optional
103+ Document * Document `json:"document"` // optional
104+ Photo * []PhotoSize `json:"photo"` // optional
105+ Sticker * Sticker `json:"sticker"` // optional
106+ Video * Video `json:"video"` // optional
107+ Voice * Voice `json:"voice"` // optional
108+ Caption string `json:"caption"` // optional
109+ Contact * Contact `json:"contact"` // optional
110+ Location * Location `json:"location"` // optional
111+ Venue * Venue `json:"venue"` // optional
112+ NewChatMember * User `json:"new_chat_member"` // optional
113+ LeftChatMember * User `json:"left_chat_member"` // optional
114+ NewChatTitle string `json:"new_chat_title"` // optional
115+ NewChatPhoto * []PhotoSize `json:"new_chat_photo"` // optional
116+ DeleteChatPhoto bool `json:"delete_chat_photo"` // optional
117+ GroupChatCreated bool `json:"group_chat_created"` // optional
118+ SuperGroupChatCreated bool `json:"supergroup_chat_created"` // optional
119+ ChannelChatCreated bool `json:"channel_chat_created"` // optional
120+ MigrateToChatID int64 `json:"migrate_to_chat_id"` // optional
121+ MigrateFromChatID int64 `json:"migrate_from_chat_id"` // optional
122+ PinnedMessage * Message `json:"pinned_message"` // optional
123123}
124124
125125// Time converts the message timestamp into a Time.
@@ -199,31 +199,31 @@ type Audio struct {
199199
200200// Document contains information about a document.
201201type Document struct {
202- FileID string `json:"file_id"`
203- Thumbnail PhotoSize `json:"thumb"` // optional
204- FileName string `json:"file_name"` // optional
205- MimeType string `json:"mime_type"` // optional
206- FileSize int `json:"file_size"` // optional
202+ FileID string `json:"file_id"`
203+ Thumbnail * PhotoSize `json:"thumb"` // optional
204+ FileName string `json:"file_name"` // optional
205+ MimeType string `json:"mime_type"` // optional
206+ FileSize int `json:"file_size"` // optional
207207}
208208
209209// Sticker contains information about a sticker.
210210type Sticker struct {
211- FileID string `json:"file_id"`
212- Width int `json:"width"`
213- Height int `json:"height"`
214- Thumbnail PhotoSize `json:"thumb"` // optional
215- FileSize int `json:"file_size"` // optional
211+ FileID string `json:"file_id"`
212+ Width int `json:"width"`
213+ Height int `json:"height"`
214+ Thumbnail * PhotoSize `json:"thumb"` // optional
215+ FileSize int `json:"file_size"` // optional
216216}
217217
218218// Video contains information about a video.
219219type Video struct {
220- FileID string `json:"file_id"`
221- Width int `json:"width"`
222- Height int `json:"height"`
223- Duration int `json:"duration"`
224- Thumbnail PhotoSize `json:"thumb"` // optional
225- MimeType string `json:"mime_type"` // optional
226- FileSize int `json:"file_size"` // optional
220+ FileID string `json:"file_id"`
221+ Width int `json:"width"`
222+ Height int `json:"height"`
223+ Duration int `json:"duration"`
224+ Thumbnail * PhotoSize `json:"thumb"` // optional
225+ MimeType string `json:"mime_type"` // optional
226+ FileSize int `json:"file_size"` // optional
227227}
228228
229229// Voice contains information about a voice.
@@ -319,11 +319,11 @@ type InlineKeyboardButton struct {
319319// CallbackQuery is data sent when a keyboard button with callback data
320320// is clicked.
321321type CallbackQuery struct {
322- ID string `json:"id"`
323- From User `json:"from"`
324- Message Message `json:"message"` // optional
325- InlineMessageID string `json:"inline_message_id"` // optional
326- Data string `json:"data"` // optional
322+ ID string `json:"id"`
323+ From * User `json:"from"`
324+ Message * Message `json:"message"` // optional
325+ InlineMessageID string `json:"inline_message_id"` // optional
326+ Data string `json:"data"` // optional
327327}
328328
329329// ForceReply allows the Bot to have users directly reply to it without
@@ -335,11 +335,11 @@ type ForceReply struct {
335335
336336// InlineQuery is a Query from Telegram for an inline request.
337337type InlineQuery struct {
338- ID string `json:"id"`
339- From User `json:"from"`
340- Location Location `json:"location"` // optional
341- Query string `json:"query"`
342- Offset string `json:"offset"`
338+ ID string `json:"id"`
339+ From * User `json:"from"`
340+ Location * Location `json:"location"` // optional
341+ Query string `json:"query"`
342+ Offset string `json:"offset"`
343343}
344344
345345// InlineQueryResultArticle is an inline query response article.
@@ -418,13 +418,66 @@ type InlineQueryResultVideo struct {
418418 InputMessageContent interface {} `json:"input_message_content"`
419419}
420420
421+ // InlineQueryResultAudio is an inline query response audio.
422+ type InlineQueryResultAudio struct {
423+ Type string `json:"type"` // required
424+ ID string `json:"id"` // required
425+ URL string `json:"audio_url"` // required
426+ Title string `json:"title"` // required
427+ Performer string `json:"performer"`
428+ Duration int `json:"audio_duration"`
429+ ReplyMarkup * InlineKeyboardMarkup `json:"reply_markup"`
430+ InputMessageContent interface {} `json:"input_message_content"`
431+ }
432+
433+ // InlineQueryResultVoice is an inline query response voice.
434+ type InlineQueryResultVoice struct {
435+ Type string `json:"type"` // required
436+ ID string `json:"id"` // required
437+ URL string `json:"voice_url"` // required
438+ Title string `json:"title"` // required
439+ Duration int `json:"voice_duration"`
440+ ReplyMarkup * InlineKeyboardMarkup `json:"reply_markup"`
441+ InputMessageContent interface {} `json:"input_message_content"`
442+ }
443+
444+ // InlineQueryResultDocument is an inline query response document.
445+ type InlineQueryResultDocument struct {
446+ Type string `json:"type"` // required
447+ ID string `json:"id"` // required
448+ Title string `json:"title"` // required
449+ Caption string `json:"caption"`
450+ URL string `json:"document_url"` // required
451+ MimeType string `json:"mime_type"` // required
452+ Description string `json:"description"`
453+ ReplyMarkup * InlineKeyboardMarkup `json:"reply_markup"`
454+ InputMessageContent interface {} `json:"input_message_content"`
455+ ThumbURL string `json:"thumb_url"`
456+ ThumbWidth int `json:"thumb_width"`
457+ ThumbHeight int `json:"thumb_height"`
458+ }
459+
460+ // InlineQueryResultLocation is an inline query response location.
461+ type InlineQueryResultLocation struct {
462+ Type string `json:"type"` // required
463+ ID string `json:"id"` // required
464+ Latitude float64 `json:"latitude"` // required
465+ Longitude float64 `json:"longitude"` // required
466+ Title string `json:"title"` // required
467+ ReplyMarkup * InlineKeyboardMarkup `json:"reply_markup"`
468+ InputMessageContent interface {} `json:"input_message_content"`
469+ ThumbURL string `json:"thumb_url"`
470+ ThumbWidth int `json:"thumb_width"`
471+ ThumbHeight int `json:"thumb_height"`
472+ }
473+
421474// ChosenInlineResult is an inline query result chosen by a User
422475type ChosenInlineResult struct {
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"`
476+ ResultID string `json:"result_id"`
477+ From * User `json:"from"`
478+ Location * Location `json:"location"`
479+ InlineMessageID string `json:"inline_message_id"`
480+ Query string `json:"query"`
428481}
429482
430483// InputTextMessageContent contains text for displaying
0 commit comments