mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-05 23: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,
|
inline_message_id: str,
|
||||||
caption: str,
|
caption: str,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
reply_markup: "types.InlineKeyboardMarkup" = None,
|
||||||
|
invert_media: bool = None
|
||||||
) -> bool:
|
) -> bool:
|
||||||
"""Edit the caption of inline media messages.
|
"""Edit the caption of inline media messages.
|
||||||
|
|
||||||
|
|
@ -49,6 +50,10 @@ class EditInlineCaption:
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
True, If the media position is inverted.
|
||||||
|
only animation, photo, video, and webpage preview messages.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
``bool``: On success, True is returned.
|
``bool``: On success, True is returned.
|
||||||
|
|
||||||
|
|
@ -62,5 +67,6 @@ class EditInlineCaption:
|
||||||
inline_message_id=inline_message_id,
|
inline_message_id=inline_message_id,
|
||||||
text=caption,
|
text=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup,
|
||||||
|
invert_media=invert_media
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ class EditInlineText:
|
||||||
text: str,
|
text: str,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
disable_web_page_preview: bool = None,
|
disable_web_page_preview: bool = None,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
reply_markup: "types.InlineKeyboardMarkup" = None,
|
||||||
|
invert_media: bool = None
|
||||||
) -> bool:
|
) -> bool:
|
||||||
"""Edit the text of inline messages.
|
"""Edit the text of inline messages.
|
||||||
|
|
||||||
|
|
@ -56,6 +57,10 @@ class EditInlineText:
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
True, If the media position is inverted.
|
||||||
|
only animation, photo, video, and webpage preview messages.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
``bool``: On success, True is returned.
|
``bool``: On success, True is returned.
|
||||||
|
|
||||||
|
|
@ -85,5 +90,6 @@ class EditInlineText:
|
||||||
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 self.parser.parse(text, parse_mode)
|
**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