Make edit_message_caption return the new type

This commit is contained in:
Dan 2018-04-16 12:03:31 +02:00
parent fbc8cafe4d
commit 06685cfe15

View File

@ -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,