PaidMediaPreview

class telegram.PaidMediaPreview(width=None, height=None, duration=None, *, api_kwargs=None)[source]

Bases: telegram.PaidMedia

The paid media isn’t available before the payment.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their width, height, and duration are equal.

Added in version 21.4.

Parameters:
  • type (str) – Type of the paid media, always 'preview'.

  • width (int, optional) – Media width as defined by the sender.

  • height (int, optional) – Media height as defined by the sender.

  • duration (int, optional) – Duration of the media in seconds as defined by the sender.

type[source]

Type of the paid media, always 'preview'.

Type:

str

width[source]

Optional. Media width as defined by the sender.

Type:

int

height[source]

Optional. Media height as defined by the sender.

Type:

int

duration[source]

Optional. Duration of the media in seconds as defined by the sender.

Type:

int