Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# StickerSet

class telegram.StickerSet(name, title, is_animated, stickers, is_video, sticker_type, thumbnail=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents a sticker set.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `name` is equal.

  Note

  As of v13.11 `is_video` is a required argument and therefore the order of the arguments had to be changed. Use keyword arguments to make sure that the arguments are passed correctly.

  Returned In

  `telegram.Bot.get_sticker_set()`

  Changed in version 20.0: The parameter `contains_masks` has been removed. Use `sticker_type` instead.

  Changed in version 20.5: Removed the deprecated argument and attribute `thumb`.

  Parameters:

    - name (`str`) – Sticker set name.

    - title (`str`) – Sticker set title.

    - is_animated (`bool`) – `True`, if the sticker set contains animated stickers.

    - is_video (`bool`) –

      `True`, if the sticker set contains video stickers.

      New in version 13.11.

    - stickers (Sequence[`telegram.Sticker`]) –

      List of all set stickers.

      Changed in version 20.0: Accepts any `collections.abc.Sequence` as input instead of just a list. The input is converted to a tuple.

    - sticker_type (`str`) –

      Type of stickers in the set, currently one of `telegram.Sticker.REGULAR`, `telegram.Sticker.MASK`, `telegram.Sticker.CUSTOM_EMOJI`.

      New in version 20.0.

    - thumbnail (`telegram.PhotoSize`, optional) –

      Sticker set thumbnail in the `.WEBP`, `.TGS`, or `.WEBM` format.

      New in version 20.2.

  name

    Sticker set name.

    Type:

      `str`

  title

    Sticker set title.

    Type:

      `str`

  is_animated

    `True`, if the sticker set contains animated stickers.

    Type:

      `bool`

  is_video

    `True`, if the sticker set contains video stickers.

    New in version 13.11.

    Type:

      `bool`

  stickers

    List of all set stickers.

    Changed in version 20.0: This attribute is now an immutable tuple.

    Type:

      Tuple[`telegram.Sticker`]

  sticker_type

    Type of stickers in the set, currently one of `telegram.Sticker.REGULAR`, `telegram.Sticker.MASK`, `telegram.Sticker.CUSTOM_EMOJI`.

    New in version 20.0.

    Type:

      `str`

  thumbnail

    Optional. Sticker set thumbnail in the `.WEBP`, `.TGS`, or `.WEBM` format.

    New in version 20.2.

    Type:

      `telegram.PhotoSize`

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json()`.