diff --git a/pyrogram/methods/messages/edit_message_text.py b/pyrogram/methods/messages/edit_message_text.py index 66868c98..828234c5 100644 --- a/pyrogram/methods/messages/edit_message_text.py +++ b/pyrogram/methods/messages/edit_message_text.py @@ -34,6 +34,7 @@ class EditMessageText: parse_mode: Optional["enums.ParseMode"] = None, entities: List["types.MessageEntity"] = None, disable_web_page_preview: bool = None, + show_above_text: bool = None, schedule_date: datetime = None, reply_markup: "types.InlineKeyboardMarkup" = None ) -> "types.Message": @@ -63,6 +64,10 @@ class EditMessageText: disable_web_page_preview (``bool``, *optional*): Disables link previews for links in this message. + show_above_text (``bool``, *optional*): + If True, link preview will be shown above the message text. + Otherwise, the link preview will be shown below the message text. + schedule_date (:py:obj:`~datetime.datetime`, *optional*): Date when the message will be automatically sent. @@ -89,6 +94,7 @@ class EditMessageText: peer=await self.resolve_peer(chat_id), id=message_id, no_webpage=disable_web_page_preview or None, + invert_media=show_above_text or None, schedule_date=utils.datetime_to_timestamp(schedule_date), reply_markup=await reply_markup.write(self) if reply_markup else None, **await utils.parse_text_entities(self, text, parse_mode, entities) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index bfea9e64..daeb4c57 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -3574,6 +3574,7 @@ class Message(Object, Update): parse_mode: Optional["enums.ParseMode"] = None, entities: List["types.MessageEntity"] = None, disable_web_page_preview: bool = None, + show_above_text: bool = None, reply_markup: "types.InlineKeyboardMarkup" = None ) -> "Message": """Bound method *edit_text* of :obj:`~pyrogram.types.Message`. @@ -3609,6 +3610,10 @@ class Message(Object, Update): disable_web_page_preview (``bool``, *optional*): Disables link previews for links in this message. + show_above_text (``bool``, *optional*): + If True, link preview will be shown above the message text. + Otherwise, the link preview will be shown below the message text. + reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*): An InlineKeyboardMarkup object. @@ -3625,6 +3630,7 @@ class Message(Object, Update): parse_mode=parse_mode, entities=entities, disable_web_page_preview=disable_web_page_preview, + show_above_text=show_above_text, reply_markup=reply_markup )