Skip to main content

stickers.addStickerToSet

Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.

func (c *Client) StickersAddStickerToSet(ctx context.Context, request *StickersAddStickerToSetRequest) (MessagesStickerSetClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.StickersAddStickerToSet(ctx, &tg.StickersAddStickerToSetRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // MessagesStickerSetClass
return nil
})

Parameters

NameTypeRequiredDescription
StickersetInputStickerSetClassyesThe stickerset
StickerInputStickerSetItemyesThe sticker

Returns

MessagesStickerSetClass

Possible errors

CodeTypeDescription
400STICKERPACK_STICKERS_TOO_MUCHThere are too many stickers in this stickerpack, you can't add any more.
406STICKERSET_INVALIDThe provided sticker set is invalid.
400STICKERS_TOO_MUCHThere are too many stickers in this stickerpack, you can't add any more.
400STICKER_PNG_NOPNGOne of the specified stickers is not a valid PNG file.
400STICKER_TGS_NOTGSInvalid TGS sticker provided.

References