all repos — telegram-bot-api @ aea186240dd3e8d1829b19797a6bcabbf7af79f1

Golang bindings for the Telegram Bot API

Merge pull request #292 from blasphemy/inline-sticker

add ability to respond to inline queries with stickers
Syfaro syfaro@huefox.com
Tue, 21 Jul 2020 02:42:48 -0500
commit

aea186240dd3e8d1829b19797a6bcabbf7af79f1

parent

dd5b918046a9f6b61e5351a553350d102b12abe3

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

jump to
M helpers.gohelpers.go

@@ -571,6 +571,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

@@ -751,6 +751,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