Finish Bot API 3.4.
parent
72f87b43e3
commit
e840fa3b0f
48
configs.go
48
configs.go
|
@ -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
|
||||
}
|
||||
|
|
10
types.go
10
types.go
|
@ -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"`
|
||||
|
|
Loading…
Reference in New Issue