1
0
Fork 0

Added deleteStickerFromSet method

This commit is contained in:
Maxim Lebedev 2017-09-05 00:13:34 +05:00
parent 6d12e821bb
commit 4e7131fb4c
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
package telegram
import (
json "github.com/pquerna/ffjson/ffjson"
http "github.com/valyala/fasthttp"
)
// DeleteStickerFromSet delete a sticker from a set created by the bot. Returns True on success.
func (bot *Bot) DeleteStickerFromSet(sticker string) (bool, error) {
var args http.Args
args.Add("sticker", sticker) // File identifier of the sticker
resp, err := bot.get("deleteStickerFromSet", &args)
if err != nil {
return nil, err
}
var data bool
err = json.Unmarshal(*resp.Result, &data)
return data, err
}