addStickerToSet()
Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | User identifier of sticker set owner |
name | string | required | Sticker set name |
sticker | InputSticker | required | A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed. |
returns
boolean
usage in yaebal
addStickerToSet is directly typed on Api — call it straight off bot.api.
import type { AddStickerToSetParams } from "@yaebal/types";
await bot.api.addStickerToSet({
user_id: 123456789,
name: "...",
sticker: {} /* InputSticker */,
} satisfies AddStickerToSetParams);context shortcut
also available as ctx.addStickerToSet() on
16
context types — see @yaebal/contexts.
/** Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns *True* on success. */
ctx.addStickerToSet(params: Omit<AddStickerToSetParams, "user_id"> & { user_id?: number })official Bot API docs: https://core.telegram.org/bots/api/#addstickertoset