Add missing `getCustomEmojiStickers` method from API v6.2
Valeriy Selitskiy 239034+iamwavecut@users.noreply.github.com
Fri, 15 Mar 2024 21:28:47 +0100
1 files changed,
14 insertions(+),
1 deletions(-)
jump to
M
bot.go
→
bot.go
@@ -640,7 +640,20 @@ if err != nil {
return StickerSet{}, err } - var stickers StickerSet + var stickerSet StickerSet + err = json.Unmarshal(resp.Result, &stickerSet) + + return stickerSet, err +} + +// GetCustomEmojiStickers returns a slice of Sticker objects. +func (bot *BotAPI) GetCustomEmojiStickers(config GetCustomEmojiStickersConfig) ([]Sticker, error) { + resp, err := bot.Request(config) + if err != nil { + return []Sticker{}, err + } + + var stickers []Sticker err = json.Unmarshal(resp.Result, &stickers) return stickers, err