Finish Bot API 3.4.

bot-api-6.1
Syfaro 2017-12-29 13:06:58 -06:00
parent 72f87b43e3
commit e840fa3b0f
2 changed files with 53 additions and 5 deletions

View File

@ -1715,3 +1715,51 @@ func (config DeleteStickerConfig) values() (url.Values, error) {
return v, nil
}
// SetChatStickerSetConfig allows you to set the sticker set for a supergroup.
type SetChatStickerSetConfig struct {
ChatID int64
SuperGroupUsername string
StickerSetName string
}
func (config SetChatStickerSetConfig) method() string {
return "setChatStickerSet"
}
func (config SetChatStickerSetConfig) values() (url.Values, error) {
v := url.Values{}
if config.SuperGroupUsername == "" {
v.Add("chat_id", strconv.FormatInt(config.ChatID, 10))
} else {
v.Add("chat_id", config.SuperGroupUsername)
}
v.Add("sticker_set_name", config.StickerSetName)
return v, nil
}
// DeleteChatStickerSetConfig allows you to remove a supergroup's sticker set.
type DeleteChatStickerSetConfig struct {
ChatID int64
SuperGroupUsername string
}
func (config DeleteChatStickerSetConfig) method() string {
return "deleteChatStickerSet"
}
func (config DeleteChatStickerSetConfig) values() (url.Values, error) {
v := url.Values{}
if config.SuperGroupUsername == "" {
v.Add("chat_id", strconv.FormatInt(config.ChatID, 10))
} else {
v.Add("chat_id", config.SuperGroupUsername)
}
return v, nil
}

View File

@ -658,12 +658,12 @@ type InlineQueryResultDocument struct {
// InlineQueryResultLocation is an inline query response location.
type InlineQueryResultLocation struct {
Type string `json:"type"` // required
ID string `json:"id"` // required
Latitude float64 `json:"latitude"` // required
Longitude float64 `json:"longitude"` // required
Type string `json:"type"` // required
ID string `json:"id"` // required
Latitude float64 `json:"latitude"` // required
Longitude float64 `json:"longitude"` // required
LivePeriod int `json:"live_period"` // optional
Title string `json:"title"` // required
Title string `json:"title"` // required
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
InputMessageContent interface{} `json:"input_message_content,omitempty"`
ThumbURL string `json:"thumb_url"`