Stickers

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

parametertyperequireddescription
user_idnumberrequiredUser identifier of sticker set owner
namestringrequiredSticker set name
stickerInputStickerrequiredA 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

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { AddStickerToSetParams } from "@yaebal/types";

await bot.api.call<boolean>("addStickerToSet", {
  user_id: 123456789,
  name: "...",
  sticker: {} /* InputSticker */,
} satisfies AddStickerToSetParams);

context shortcut

also available as ctx.addStickerToSet() on 16 context types — see @yaebal/contexts.

context shortcut
/** 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">)