From f2b36838e6134c4db9b3f4d78d9cd2fe40e25724 Mon Sep 17 00:00:00 2001 From: Syfaro Date: Mon, 4 Jan 2016 10:15:57 -0600 Subject: [PATCH] Add new inline query related feature. --- types.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/types.go b/types.go index 4f1bc2b..9c74082 100644 --- a/types.go +++ b/types.go @@ -19,9 +19,10 @@ type APIResponse struct { // Update is an update response, from GetUpdates. type Update struct { - UpdateID int `json:"update_id"` - Message Message `json:"message"` - InlineQuery InlineQuery `json:"inline_query"` + UpdateID int `json:"update_id"` + Message Message `json:"message"` + InlineQuery InlineQuery `json:"inline_query"` + ChosenInlineResult ChosenInlineResult `json:"chosen_inline_result"` } // User is a user on Telegram. @@ -361,3 +362,10 @@ type InlineQueryResultVideo struct { Title string `json:"title"` Description string `json:"description"` } + +// ChosenInlineResult is an inline query result chosen by a User +type ChosenInlineResult struct { + ResultID string `json:"result_id"` + From User `json:"from"` + Query string `json:"query"` +}