mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-09 00:14:50 +00:00
Add reply_markup argument for edit_message_* methods
This commit is contained in:
parent
34d7f3372f
commit
ac9a263f3d
1 changed files with 12 additions and 2 deletions
|
|
@ -2526,7 +2526,8 @@ class Client:
|
||||||
message_id: int,
|
message_id: int,
|
||||||
text: str,
|
text: str,
|
||||||
parse_mode: str = "",
|
parse_mode: str = "",
|
||||||
disable_web_page_preview: bool = None):
|
disable_web_page_preview: bool = None,
|
||||||
|
reply_markup=None):
|
||||||
"""Use this method to edit text messages.
|
"""Use this method to edit text messages.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -2550,6 +2551,9 @@ class Client:
|
||||||
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.
|
||||||
|
|
||||||
|
reply_markup (:obj:`InlineKeyboardMarkup`):
|
||||||
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
On success, the edited :obj:`Message <pyrogram.api.types.pyrogram.Message>` is returned.
|
On success, the edited :obj:`Message <pyrogram.api.types.pyrogram.Message>` is returned.
|
||||||
|
|
||||||
|
|
@ -2563,6 +2567,7 @@ class Client:
|
||||||
peer=self.resolve_peer(chat_id),
|
peer=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,
|
||||||
|
reply_markup=reply_markup.write() if reply_markup else None,
|
||||||
**style.parse(text)
|
**style.parse(text)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -2578,7 +2583,8 @@ class Client:
|
||||||
chat_id: int or str,
|
chat_id: int or str,
|
||||||
message_id: int,
|
message_id: int,
|
||||||
caption: str,
|
caption: str,
|
||||||
parse_mode: str = ""):
|
parse_mode: str = "",
|
||||||
|
reply_markup=None):
|
||||||
"""Use this method to edit captions of messages.
|
"""Use this method to edit captions of messages.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -2599,6 +2605,9 @@ class Client:
|
||||||
if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your caption.
|
if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your caption.
|
||||||
Defaults to Markdown.
|
Defaults to Markdown.
|
||||||
|
|
||||||
|
reply_markup (:obj:`InlineKeyboardMarkup`):
|
||||||
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
On success, the edited :obj:`Message <pyrogram.api.types.pyrogram.Message>` is returned.
|
On success, the edited :obj:`Message <pyrogram.api.types.pyrogram.Message>` is returned.
|
||||||
|
|
||||||
|
|
@ -2611,6 +2620,7 @@ class Client:
|
||||||
functions.messages.EditMessage(
|
functions.messages.EditMessage(
|
||||||
peer=self.resolve_peer(chat_id),
|
peer=self.resolve_peer(chat_id),
|
||||||
id=message_id,
|
id=message_id,
|
||||||
|
reply_markup=reply_markup.write() if reply_markup else None,
|
||||||
**style.parse(caption)
|
**style.parse(caption)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue