mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Make edit_message_caption return the new type
This commit is contained in:
parent
fbc8cafe4d
commit
06685cfe15
@ -2472,12 +2472,15 @@ class Client:
|
||||
if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your caption.
|
||||
Defaults to Markdown.
|
||||
|
||||
Returns:
|
||||
On success, the edited :obj:`Message <pyrogram.Message>` is returned.
|
||||
|
||||
Raises:
|
||||
:class:`Error <pyrogram.Error>`
|
||||
"""
|
||||
style = self.html if parse_mode.lower() == "html" else self.markdown
|
||||
|
||||
return self.send(
|
||||
r = self.send(
|
||||
functions.messages.EditMessage(
|
||||
peer=self.resolve_peer(chat_id),
|
||||
id=message_id,
|
||||
@ -2485,6 +2488,13 @@ class Client:
|
||||
)
|
||||
)
|
||||
|
||||
for i in r.updates:
|
||||
if isinstance(i, (types.UpdateEditMessage, types.UpdateEditChannelMessage)):
|
||||
users = {i.id: i for i in r.users}
|
||||
chats = {i.id: i for i in r.chats}
|
||||
|
||||
return message_parser.parse_message(self, i.message, users, chats)
|
||||
|
||||
def delete_messages(self,
|
||||
chat_id: int or str,
|
||||
message_ids: list,
|
||||
|
Loading…
Reference in New Issue
Block a user