The paid media is a video. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`video` are equal. .. versionadded:: 21.4 Args: type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.P
| 215 | |
| 216 | |
| 217 | class PaidMediaVideo(PaidMedia): |
| 218 | """ |
| 219 | The paid media is a video. |
| 220 | |
| 221 | Objects of this class are comparable in terms of equality. Two objects of this class are |
| 222 | considered equal, if their :attr:`video` are equal. |
| 223 | |
| 224 | .. versionadded:: 21.4 |
| 225 | |
| 226 | Args: |
| 227 | type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.VIDEO`. |
| 228 | video (:class:`telegram.Video`): The video. |
| 229 | |
| 230 | Attributes: |
| 231 | type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.VIDEO`. |
| 232 | video (:class:`telegram.Video`): The video. |
| 233 | """ |
| 234 | |
| 235 | __slots__ = ("video",) |
| 236 | |
| 237 | def __init__( |
| 238 | self, |
| 239 | video: Video, |
| 240 | *, |
| 241 | api_kwargs: JSONDict | None = None, |
| 242 | ) -> None: |
| 243 | super().__init__(type=PaidMedia.VIDEO, api_kwargs=api_kwargs) |
| 244 | |
| 245 | with self._unfrozen(): |
| 246 | self.video: Video = video |
| 247 | |
| 248 | self._id_attrs = (self.type, self.video) |
| 249 | |
| 250 | @classmethod |
| 251 | def de_json(cls, data: JSONDict, bot: "Bot | None" = None) -> "PaidMediaVideo": |
| 252 | data = cls._parse_data(data) |
| 253 | |
| 254 | data["video"] = de_json_optional(data.get("video"), Video, bot) |
| 255 | return super().de_json(data=data, bot=bot) # type: ignore[return-value] |
| 256 | |
| 257 | |
| 258 | class PaidMediaLivePhoto(PaidMedia): |
no outgoing calls
searching dependent graphs…