diff --git a/pyrogram/types/input_media/input_media_animation.py b/pyrogram/types/input_media/input_media_animation.py index 2eae1a66..2e91a214 100644 --- a/pyrogram/types/input_media/input_media_animation.py +++ b/pyrogram/types/input_media/input_media_animation.py @@ -59,6 +59,9 @@ class InputMediaAnimation(InputMedia): duration (``int``, *optional*): Animation duration. + + has_spoiler (``bool``, *optional*): + Pass True if the photo needs to be covered with a spoiler animation. """ def __init__( @@ -70,7 +73,8 @@ class InputMediaAnimation(InputMedia): caption_entities: List[MessageEntity] = None, width: int = 0, height: int = 0, - duration: int = 0 + duration: int = 0, + has_spoiler: bool = None ): super().__init__(media, caption, parse_mode, caption_entities) @@ -78,3 +82,4 @@ class InputMediaAnimation(InputMedia): self.width = width self.height = height self.duration = duration + self.has_spoiler = has_spoiler diff --git a/pyrogram/types/input_media/input_media_photo.py b/pyrogram/types/input_media/input_media_photo.py index ce8b41a2..f4fd0e03 100644 --- a/pyrogram/types/input_media/input_media_photo.py +++ b/pyrogram/types/input_media/input_media_photo.py @@ -45,6 +45,9 @@ class InputMediaPhoto(InputMedia): caption_entities (List of :obj:`~pyrogram.types.MessageEntity`): List of special entities that appear in the caption, which can be specified instead of *parse_mode*. + + has_spoiler (``bool``, *optional*): + Pass True if the photo needs to be covered with a spoiler animation. """ def __init__( @@ -52,6 +55,9 @@ class InputMediaPhoto(InputMedia): media: Union[str, BinaryIO], caption: str = "", parse_mode: Optional["enums.ParseMode"] = None, - caption_entities: List[MessageEntity] = None + caption_entities: List[MessageEntity] = None, + has_spoiler: bool = None ): super().__init__(media, caption, parse_mode, caption_entities) + + self.has_spoiler = has_spoiler diff --git a/pyrogram/types/input_media/input_media_video.py b/pyrogram/types/input_media/input_media_video.py index c163cba9..ab1823d3 100644 --- a/pyrogram/types/input_media/input_media_video.py +++ b/pyrogram/types/input_media/input_media_video.py @@ -63,6 +63,9 @@ class InputMediaVideo(InputMedia): supports_streaming (``bool``, *optional*): Pass True, if the uploaded video is suitable for streaming. + + has_spoiler (``bool``, *optional*): + Pass True if the photo needs to be covered with a spoiler animation. """ def __init__( @@ -75,7 +78,8 @@ class InputMediaVideo(InputMedia): width: int = 0, height: int = 0, duration: int = 0, - supports_streaming: bool = True + supports_streaming: bool = True, + has_spoiler: bool = None, ): super().__init__(media, caption, parse_mode, caption_entities) @@ -84,3 +88,4 @@ class InputMediaVideo(InputMedia): self.height = height self.duration = duration self.supports_streaming = supports_streaming + self.has_spoiler = has_spoiler