create_new_sticker_set()

Client.create_new_sticker_set(user_id: int | str, name: str, title: str, stickers: List[types.InputSticker], sticker_format: str = 'static', sticker_type: str = 'regular', needs_repainting: bool = None) types.StickerSet

Create a new sticker set owned by a user.

The bot must be an administrator in the chat for this to work.

Usable by Users Bots
Parameters:
  • user_id (int | str) – User identifier of the sticker set owner.

  • name (str) – 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>”.

  • title (str) – Sticker set title, 1-64 characters.

  • stickers (List of InputSticker) – A list of 1-50 initial stickers to be added to the sticker set.

  • sticker_format (str, optional) – Format of stickers in the set: “static”, “animated”, or “video”. Defaults to “static”.

  • sticker_type (str, optional) – Type of stickers: “regular”, “mask”, or “custom_emoji”. Defaults to “regular”.

  • needs_repainting (bool, 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:

StickerSet – On success, the created StickerSet is returned.

Example

await app.create_new_sticker_set(user_id, "my_set_by_bot", "My Sticker Set", stickers)