Skip to content
Back to top
View this page

# PaidMediaInfo

class telegram.PaidMediaInfo(star_count, paid_media, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Describes the paid media added to a message.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `star_count` and `paid_media` are equal.

  Available In

  - `telegram.ExternalReplyInfo.paid_media`

  - `telegram.Message.effective_attachment`

  - `telegram.Message.paid_media`

  Added in version 21.4.

  Parameters:

    - star_count (`int`) – The number of Telegram Stars that must be paid to buy access to the media.

    - paid_media (Sequence[`telegram.PaidMedia`]) – Information about the paid media.

  star_count

    The number of Telegram Stars that must be paid to buy access to the media.

    Type:

      `int`

  paid_media

    Information about the paid media.

    Type:

      tuple[`telegram.PaidMedia`]

  classmethod de_json(data, bot=None)

    Converts JSON data to a Telegram object.

    Parameters:

      - data (dict[`str`, …]) – The JSON data.

      - bot (`telegram.Bot`, optional) –

        The bot associated with this object. Defaults to `None`, in which case shortcut methods will not be available.

        Changed in version 21.4: `bot` is now optional and defaults to `None`

    Returns:

      The Telegram object.