Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# PaidMediaPhoto

class telegram.PaidMediaPhoto(photo, *, api_kwargs=None)

  Bases: `telegram.PaidMedia`

  The paid media is a photo.

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

  Available In

  - `telegram.ExternalReplyInfo.paid_media`

  - `telegram.PaidMediaInfo.paid_media`

  - `telegram.TransactionPartnerUser.paid_media`

  Added in version 21.4.

  Parameters:

    - type (`str`) – Type of the paid media, always `'photo'`.

    - photo (Sequence[`telegram.PhotoSize`]) – The photo.

  type

    Type of the paid media, always `'photo'`.

    Type:

      `str`

  photo

    The photo.

    Type:

      tuple[`telegram.PhotoSize`]

  classmethod de_json(data, bot=None)

    Converts JSON data to the appropriate `PaidMedia` object, i.e. takes care of selecting the correct subclass.

    Parameters:

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

      - bot (`telegram.Bot`, optional) – The bot associated with this object.

    Returns:

      The Telegram object.