Make Message.edit respect preview and buttons

This commit is contained in:
Lonami Exo
2019-01-12 12:45:37 +01:00
parent ae4d4ba3ef
commit d31aaa5d0d
2 changed files with 24 additions and 0 deletions

View File

@@ -235,6 +235,12 @@ class CallbackQuery(EventBuilder):
Returns the edited :tl:`Message`.
This method also creates a task to `answer` the callback.
.. note::
This method won't respect the previous message unlike
`Message.edit <telethon.tl.custom.message.Message.edit>`,
since the message object is normally not present.
"""
self._client.loop.create_task(self.answer())
return await self._client.edit_message(