mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Add the field has_media_spoiler to the class Message
This commit is contained in:
parent
e0dda5ab26
commit
ef29b3c519
@ -136,6 +136,9 @@ class Message(Object, Update):
|
|||||||
has_protected_content (``bool``, *optional*):
|
has_protected_content (``bool``, *optional*):
|
||||||
True, if the message can't be forwarded.
|
True, if the message can't be forwarded.
|
||||||
|
|
||||||
|
has_media_spoiler (``bool``, *optional*):
|
||||||
|
True, if the message media is covered by a spoiler animation.
|
||||||
|
|
||||||
text (``str``, *optional*):
|
text (``str``, *optional*):
|
||||||
For text messages, the actual UTF-8 text of the message, 0-4096 characters.
|
For text messages, the actual UTF-8 text of the message, 0-4096 characters.
|
||||||
If the message contains entities (bold, italic, ...) you can access *text.markdown* or
|
If the message contains entities (bold, italic, ...) you can access *text.markdown* or
|
||||||
@ -332,6 +335,7 @@ class Message(Object, Update):
|
|||||||
media_group_id: str = None,
|
media_group_id: str = None,
|
||||||
author_signature: str = None,
|
author_signature: str = None,
|
||||||
has_protected_content: bool = None,
|
has_protected_content: bool = None,
|
||||||
|
has_media_spoiler: bool = None,
|
||||||
text: Str = None,
|
text: Str = None,
|
||||||
entities: List["types.MessageEntity"] = None,
|
entities: List["types.MessageEntity"] = None,
|
||||||
caption_entities: List["types.MessageEntity"] = None,
|
caption_entities: List["types.MessageEntity"] = None,
|
||||||
@ -408,6 +412,7 @@ class Message(Object, Update):
|
|||||||
self.media_group_id = media_group_id
|
self.media_group_id = media_group_id
|
||||||
self.author_signature = author_signature
|
self.author_signature = author_signature
|
||||||
self.has_protected_content = has_protected_content
|
self.has_protected_content = has_protected_content
|
||||||
|
self.has_media_spoiler = has_media_spoiler
|
||||||
self.text = text
|
self.text = text
|
||||||
self.entities = entities
|
self.entities = entities
|
||||||
self.caption_entities = caption_entities
|
self.caption_entities = caption_entities
|
||||||
@ -777,6 +782,7 @@ class Message(Object, Update):
|
|||||||
),
|
),
|
||||||
author_signature=message.post_author,
|
author_signature=message.post_author,
|
||||||
has_protected_content=message.noforwards,
|
has_protected_content=message.noforwards,
|
||||||
|
has_media_spoiler=media and media.spoiler,
|
||||||
forward_from=forward_from,
|
forward_from=forward_from,
|
||||||
forward_sender_name=forward_sender_name,
|
forward_sender_name=forward_sender_name,
|
||||||
forward_from_chat=forward_from_chat,
|
forward_from_chat=forward_from_chat,
|
||||||
|
Loading…
Reference in New Issue
Block a user