Skip to content

Commit 3de4d15

Browse files
authored
Add files via upload
1 parent b321fe6 commit 3de4d15

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

pyrogram/types/messages_and_media/message.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ class Message(Object, Update):
136136
has_protected_content (``bool``, *optional*):
137137
True, if the message can't be forwarded.
138138
139-
has_media_spoiler (``bool``, *optional*):
140-
True, if the message media is covered by a spoiler animation.
141-
142139
text (``str``, *optional*):
143140
For text messages, the actual UTF-8 text of the message, 0-4096 characters.
144141
If the message contains entities (bold, italic, ...) you can access *text.markdown* or
@@ -335,7 +332,6 @@ def __init__(
335332
media_group_id: str = None,
336333
author_signature: str = None,
337334
has_protected_content: bool = None,
338-
has_media_spoiler: bool = None,
339335
text: Str = None,
340336
entities: List["types.MessageEntity"] = None,
341337
caption_entities: List["types.MessageEntity"] = None,
@@ -412,7 +408,6 @@ def __init__(
412408
self.media_group_id = media_group_id
413409
self.author_signature = author_signature
414410
self.has_protected_content = has_protected_content
415-
self.has_media_spoiler = has_media_spoiler
416411
self.text = text
417412
self.entities = entities
418413
self.caption_entities = caption_entities
@@ -663,13 +658,11 @@ async def _parse(
663658

664659
media = message.media
665660
media_type = None
666-
has_media_spoiler = None
667661

668662
if media:
669663
if isinstance(media, raw.types.MessageMediaPhoto):
670664
photo = types.Photo._parse(client, media.photo, media.ttl_seconds)
671665
media_type = enums.MessageMediaType.PHOTO
672-
has_media_spoiler = media.spoiler
673666
elif isinstance(media, raw.types.MessageMediaGeo):
674667
location = types.Location._parse(client, media.geo)
675668
media_type = enums.MessageMediaType.LOCATION
@@ -698,7 +691,6 @@ async def _parse(
698691
video_attributes = attributes.get(raw.types.DocumentAttributeVideo, None)
699692
animation = types.Animation._parse(client, doc, video_attributes, file_name)
700693
media_type = enums.MessageMediaType.ANIMATION
701-
has_media_spoiler = media.spoiler
702694
elif raw.types.DocumentAttributeSticker in attributes:
703695
sticker = await types.Sticker._parse(client, doc, attributes)
704696
media_type = enums.MessageMediaType.STICKER
@@ -711,7 +703,6 @@ async def _parse(
711703
else:
712704
video = types.Video._parse(client, doc, video_attributes, file_name, media.ttl_seconds)
713705
media_type = enums.MessageMediaType.VIDEO
714-
has_media_spoiler = media.spoiler
715706
elif raw.types.DocumentAttributeAudio in attributes:
716707
audio_attributes = attributes[raw.types.DocumentAttributeAudio]
717708

@@ -786,7 +777,6 @@ async def _parse(
786777
),
787778
author_signature=message.post_author,
788779
has_protected_content=message.noforwards,
789-
has_media_spoiler=has_media_spoiler,
790780
forward_from=forward_from,
791781
forward_sender_name=forward_sender_name,
792782
forward_from_chat=forward_from_chat,
@@ -989,7 +979,6 @@ async def reply_animation(
989979
caption: str = "",
990980
parse_mode: Optional["enums.ParseMode"] = None,
991981
caption_entities: List["types.MessageEntity"] = None,
992-
has_spoiler: bool = None,
993982
duration: int = 0,
994983
width: int = 0,
995984
height: int = 0,
@@ -1043,9 +1032,6 @@ async def reply_animation(
10431032
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
10441033
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
10451034
1046-
has_spoiler (``bool``, *optional*):
1047-
Pass True if the animation needs to be covered with a spoiler animation.
1048-
10491035
duration (``int``, *optional*):
10501036
Duration of sent animation in seconds.
10511037
@@ -1114,7 +1100,6 @@ async def reply_animation(
11141100
caption=caption,
11151101
parse_mode=parse_mode,
11161102
caption_entities=caption_entities,
1117-
has_spoiler=has_spoiler,
11181103
duration=duration,
11191104
width=width,
11201105
height=height,
@@ -1891,7 +1876,6 @@ async def reply_photo(
18911876
caption: str = "",
18921877
parse_mode: Optional["enums.ParseMode"] = None,
18931878
caption_entities: List["types.MessageEntity"] = None,
1894-
has_spoiler: bool = None,
18951879
ttl_seconds: int = None,
18961880
disable_notification: bool = None,
18971881
reply_to_message_id: int = None,
@@ -1942,9 +1926,6 @@ async def reply_photo(
19421926
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
19431927
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
19441928
1945-
has_spoiler (``bool``, *optional*):
1946-
Pass True if the photo needs to be covered with a spoiler animation.
1947-
19481929
ttl_seconds (``int``, *optional*):
19491930
Self-Destruct Timer.
19501931
If you set a timer, the photo will self-destruct in *ttl_seconds*
@@ -2003,7 +1984,6 @@ async def reply_photo(
20031984
caption=caption,
20041985
parse_mode=parse_mode,
20051986
caption_entities=caption_entities,
2006-
has_spoiler=has_spoiler,
20071987
ttl_seconds=ttl_seconds,
20081988
disable_notification=disable_notification,
20091989
reply_to_message_id=reply_to_message_id,
@@ -2362,7 +2342,6 @@ async def reply_video(
23622342
caption: str = "",
23632343
parse_mode: Optional["enums.ParseMode"] = None,
23642344
caption_entities: List["types.MessageEntity"] = None,
2365-
has_spoiler: bool = None,
23662345
ttl_seconds: int = None,
23672346
duration: int = 0,
23682347
width: int = 0,
@@ -2418,9 +2397,6 @@ async def reply_video(
24182397
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
24192398
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
24202399
2421-
has_spoiler (``bool``, *optional*):
2422-
Pass True if the video needs to be covered with a spoiler animation.
2423-
24242400
ttl_seconds (``int``, *optional*):
24252401
Self-Destruct Timer.
24262402
If you set a timer, the video will self-destruct in *ttl_seconds*
@@ -2497,7 +2473,6 @@ async def reply_video(
24972473
caption=caption,
24982474
parse_mode=parse_mode,
24992475
caption_entities=caption_entities,
2500-
has_spoiler=has_spoiler,
25012476
ttl_seconds=ttl_seconds,
25022477
duration=duration,
25032478
width=width,

0 commit comments

Comments
 (0)