PaidMediaPhoto

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

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.

Added in version 21.4.

Parameters:
type[source]

Type of the paid media, always 'photo'.

Type:

str

photo[source]

The photo.

Type:

Tuple[telegram.PhotoSize]

classmethod de_json(data, bot=None)[source]

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.