Add invert_media to Message obj

This commit is contained in:
KurimuzonAkuma 2023-10-29 12:48:04 +03:00
parent a642de2d37
commit 76a44a8b57

View File

@ -142,6 +142,9 @@ class Message(Object, Update):
This field will contain the enumeration type of the media message. This field will contain the enumeration type of the media message.
You can use ``media = getattr(message, message.media.value)`` to access the media message. You can use ``media = getattr(message, message.media.value)`` to access the media message.
invert_media (``bool``, *optional*):
Invert media.
edit_date (:py:obj:`~datetime.datetime`, *optional*): edit_date (:py:obj:`~datetime.datetime`, *optional*):
Date the message was last edited. Date the message was last edited.
@ -377,6 +380,7 @@ class Message(Object, Update):
scheduled: bool = None, scheduled: bool = None,
from_scheduled: bool = None, from_scheduled: bool = None,
media: "enums.MessageMediaType" = None, media: "enums.MessageMediaType" = None,
invert_media: bool = None,
edit_date: datetime = None, edit_date: datetime = None,
media_group_id: str = None, media_group_id: str = None,
author_signature: str = None, author_signature: str = None,
@ -467,6 +471,7 @@ class Message(Object, Update):
self.scheduled = scheduled self.scheduled = scheduled
self.from_scheduled = from_scheduled self.from_scheduled = from_scheduled
self.media = media self.media = media
self.invert_media = invert_media
self.edit_date = edit_date self.edit_date = edit_date
self.media_group_id = media_group_id self.media_group_id = media_group_id
self.author_signature = author_signature self.author_signature = author_signature
@ -918,6 +923,7 @@ class Message(Object, Update):
scheduled=is_scheduled, scheduled=is_scheduled,
from_scheduled=message.from_scheduled, from_scheduled=message.from_scheduled,
media=media_type, media=media_type,
invert_media=getattr(message, "invert_media", None),
edit_date=utils.timestamp_to_datetime(message.edit_date), edit_date=utils.timestamp_to_datetime(message.edit_date),
media_group_id=message.grouped_id, media_group_id=message.grouped_id,
photo=photo, photo=photo,