mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: Add invert_media parameter to edit_inline_{caption,message} methods
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
b437bc1c46
commit
cf67f9534c
2 changed files with 16 additions and 4 deletions
|
|
@ -29,7 +29,8 @@ class EditInlineCaption:
|
|||
inline_message_id: str,
|
||||
caption: str,
|
||||
parse_mode: Optional["enums.ParseMode"] = None,
|
||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
||||
invert_media: bool = None
|
||||
) -> bool:
|
||||
"""Edit the caption of inline media messages.
|
||||
|
||||
|
|
@ -49,6 +50,10 @@ class EditInlineCaption:
|
|||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||
An InlineKeyboardMarkup object.
|
||||
|
||||
invert_media (``bool``, *optional*):
|
||||
True, If the media position is inverted.
|
||||
only animation, photo, video, and webpage preview messages.
|
||||
|
||||
Returns:
|
||||
``bool``: On success, True is returned.
|
||||
|
||||
|
|
@ -62,5 +67,6 @@ class EditInlineCaption:
|
|||
inline_message_id=inline_message_id,
|
||||
text=caption,
|
||||
parse_mode=parse_mode,
|
||||
reply_markup=reply_markup
|
||||
reply_markup=reply_markup,
|
||||
invert_media=invert_media
|
||||
)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ class EditInlineText:
|
|||
text: str,
|
||||
parse_mode: Optional["enums.ParseMode"] = None,
|
||||
disable_web_page_preview: bool = None,
|
||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
||||
invert_media: bool = None
|
||||
) -> bool:
|
||||
"""Edit the text of inline messages.
|
||||
|
||||
|
|
@ -56,6 +57,10 @@ class EditInlineText:
|
|||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||
An InlineKeyboardMarkup object.
|
||||
|
||||
invert_media (``bool``, *optional*):
|
||||
True, If the media position is inverted.
|
||||
only animation, photo, video, and webpage preview messages.
|
||||
|
||||
Returns:
|
||||
``bool``: On success, True is returned.
|
||||
|
||||
|
|
@ -85,5 +90,6 @@ class EditInlineText:
|
|||
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
||||
**await self.parser.parse(text, parse_mode)
|
||||
),
|
||||
sleep_threshold=self.sleep_threshold
|
||||
sleep_threshold=self.sleep_threshold,
|
||||
invert_media=invert_media
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue