mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-23 23:34:28 +00:00
Add show_above_text to Message.edit bound method
This commit is contained in:
parent
210b054544
commit
2ccdf23e6e
@ -34,6 +34,7 @@ class EditMessageText:
|
|||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
entities: List["types.MessageEntity"] = None,
|
entities: List["types.MessageEntity"] = None,
|
||||||
disable_web_page_preview: bool = None,
|
disable_web_page_preview: bool = None,
|
||||||
|
show_above_text: bool = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
) -> "types.Message":
|
) -> "types.Message":
|
||||||
@ -63,6 +64,10 @@ class EditMessageText:
|
|||||||
disable_web_page_preview (``bool``, *optional*):
|
disable_web_page_preview (``bool``, *optional*):
|
||||||
Disables link previews for links in this message.
|
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*):
|
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
||||||
Date when the message will be automatically sent.
|
Date when the message will be automatically sent.
|
||||||
|
|
||||||
@ -89,6 +94,7 @@ class EditMessageText:
|
|||||||
peer=await self.resolve_peer(chat_id),
|
peer=await self.resolve_peer(chat_id),
|
||||||
id=message_id,
|
id=message_id,
|
||||||
no_webpage=disable_web_page_preview or None,
|
no_webpage=disable_web_page_preview or None,
|
||||||
|
invert_media=show_above_text or None,
|
||||||
schedule_date=utils.datetime_to_timestamp(schedule_date),
|
schedule_date=utils.datetime_to_timestamp(schedule_date),
|
||||||
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
||||||
**await utils.parse_text_entities(self, text, parse_mode, entities)
|
**await utils.parse_text_entities(self, text, parse_mode, entities)
|
||||||
|
@ -3574,6 +3574,7 @@ class Message(Object, Update):
|
|||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
entities: List["types.MessageEntity"] = None,
|
entities: List["types.MessageEntity"] = None,
|
||||||
disable_web_page_preview: bool = None,
|
disable_web_page_preview: bool = None,
|
||||||
|
show_above_text: bool = None,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
) -> "Message":
|
) -> "Message":
|
||||||
"""Bound method *edit_text* of :obj:`~pyrogram.types.Message`.
|
"""Bound method *edit_text* of :obj:`~pyrogram.types.Message`.
|
||||||
@ -3609,6 +3610,10 @@ class Message(Object, Update):
|
|||||||
disable_web_page_preview (``bool``, *optional*):
|
disable_web_page_preview (``bool``, *optional*):
|
||||||
Disables link previews for links in this message.
|
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*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
@ -3625,6 +3630,7 @@ class Message(Object, Update):
|
|||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
entities=entities,
|
entities=entities,
|
||||||
disable_web_page_preview=disable_web_page_preview,
|
disable_web_page_preview=disable_web_page_preview,
|
||||||
|
show_above_text=show_above_text,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user