1
0
telegram/set_sticker_position_in_set.go
2018-02-16 04:28:59 +05:00

30 lines
721 B
Go

package telegram
import json "github.com/pquerna/ffjson/ffjson"
type SetStickerPositionInSetParameters struct {
Sticker string `json:"sticker"`
Position int `json:"position"`
}
// SetStickerPositionInSet move a sticker in a set created by the bot to a
// specific position. Returns True on success.
func (bot *Bot) SetStickerPositionInSet(sticker string, position int) (bool, error) {
dst, err := json.Marshal(&SetStickerPositionInSetParameters{
Sticker: sticker,
Position: position,
})
if err != nil {
return false, err
}
resp, err := bot.request(dst, "setStickerPositionInSet")
if err != nil {
return false, err
}
var data bool
err = json.Unmarshal(*resp.Result, &data)
return data, err
}