Merge pull request #292 from blasphemy/inline-sticker

add ability to respond to inline queries with stickers
bot-api-6.1
Syfaro 2020-07-21 02:42:48 -05:00 committed by GitHub
commit aea186240d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -571,6 +571,16 @@ func NewInlineQueryResultCachedVideo(id, videoID, title string) InlineQueryResul
}
}
// 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{

View File

@ -751,6 +751,17 @@ type InlineQueryResultCachedVideo struct {
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