Fix editing inline messages of type InputBotInlineMessageID64 (#4082)

This commit is contained in:
Nitan Alexandru Marcel
2023-04-07 18:04:08 +03:00
committed by GitHub
parent 5b1135734b
commit ced36adb03
4 changed files with 9 additions and 7 deletions

View File

@@ -300,7 +300,7 @@ class CallbackQuery(EventBuilder):
"""
Edits the message. Shorthand for
`telethon.client.messages.MessageMethods.edit_message` with
the ``entity`` set to the correct :tl:`InputBotInlineMessageID`.
the ``entity`` set to the correct :tl:`InputBotInlineMessageID` or :tl:`InputBotInlineMessageID64`.
Returns `True` if the edit was successful.
@@ -313,7 +313,7 @@ class CallbackQuery(EventBuilder):
since the message object is normally not present.
"""
self._client.loop.create_task(self.answer())
if isinstance(self.query.msg_id, types.InputBotInlineMessageID):
if isinstance(self.query.msg_id, (types.InputBotInlineMessageID, types.InputBotInlineMessageID64)):
return await self._client.edit_message(
self.query.msg_id, *args, **kwargs
)