createNewStickerSet()
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | User identifier of created sticker set owner |
name | string | required | Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot_username>". <bot_username> is case insensitive. 1-64 characters. |
title | string | required | Sticker set title, 1-64 characters |
stickers | InputSticker[] | required | A JSON-serialized list of 1-50 initial stickers to be added to the sticker set |
sticker_type | string | optional | Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created. |
needs_repainting | boolean | optional | Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { CreateNewStickerSetParams } from "@yaebal/types";
await bot.api.call<boolean>("createNewStickerSet", {
user_id: 123456789,
name: "...",
title: "...",
stickers: [],
} satisfies CreateNewStickerSetParams);context shortcut
also available as ctx.createNewStickerSet() on
16
context types — see @yaebal/contexts.
/** Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns *True* on success. */
ctx.createNewStickerSet(params: Omit<CreateNewStickerSetParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#createnewstickerset