all repos — telegram-bot-api @ 1930c25aa68f30333bc5b4c8745b5e05aae52be3

Golang bindings for the Telegram Bot API

add ability to respond to inline queries with stickers

(cherry picked from commit 87891c10fe27ef36715525c25ae3d9b35babc372)
Daniel Leining daniel@leining.org
Sun, 05 Jan 2020 00:35:15 -0500
commit

1930c25aa68f30333bc5b4c8745b5e05aae52be3

parent

bd27dae5668234e3d6bc89e5256808efadd70dd4

2 files changed, 21 insertions(+), 0 deletions(-)

jump to
M helpers.gohelpers.go

@@ -578,6 +578,16 @@ Title: title,

} } +// NewInlineQueryResultCachedSticker create a new inline query with cached sticker. +func NewInlineQueryResultCachedSticker(id, stickerID, title string) InlineQueryResultCachedSticker { + return InlineQueryResultCachedSticker{ + Type: "sticker", + ID: id, + StickerID: stickerID, + Title: title, + } +} + // NewInlineQueryResultAudio creates a new inline query audio. func NewInlineQueryResultAudio(id, url, title string) InlineQueryResultAudio { return InlineQueryResultAudio{
M types.gotypes.go

@@ -834,6 +834,17 @@ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`

InputMessageContent interface{} `json:"input_message_content,omitempty"` } +// InlineQueryResultCachedSticker is an inline query response with cached sticker. +type InlineQueryResultCachedSticker struct { + Type string `json:"type"` // required + ID string `json:"id"` // required + StickerID string `json:"sticker_file_id"` // required + Title string `json:"title"` // required + ParseMode string `json:"parse_mode"` + ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` + InputMessageContent interface{} `json:"input_message_content,omitempty"` +} + // InlineQueryResultAudio is an inline query response audio. type InlineQueryResultAudio struct { Type string `json:"type"` // required