mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Fix editing inline messages of type InputBotInlineMessageID64 (#4082)
This commit is contained in:

committed by
GitHub

parent
5b1135734b
commit
ced36adb03
@@ -1064,7 +1064,7 @@ class MessageMethods:
|
||||
from it, so the next parameter will be assumed to be the
|
||||
message text.
|
||||
|
||||
You may also pass a :tl:`InputBotInlineMessageID`,
|
||||
You may also pass a :tl:`InputBotInlineMessageID` or :tl:`InputBotInlineMessageID64`,
|
||||
which is the only way to edit messages that were sent
|
||||
after the user selects an inline query result.
|
||||
|
||||
@@ -1136,7 +1136,7 @@ class MessageMethods:
|
||||
|
||||
Returns
|
||||
The edited `Message <telethon.tl.custom.message.Message>`,
|
||||
unless `entity` was a :tl:`InputBotInlineMessageID` in which
|
||||
unless `entity` was a :tl:`InputBotInlineMessageID` or :tl:`InputBotInlineMessageID64` in which
|
||||
case this method returns a boolean.
|
||||
|
||||
Raises
|
||||
@@ -1162,7 +1162,7 @@ class MessageMethods:
|
||||
# or
|
||||
await client.edit_message(message, 'hello!!!')
|
||||
"""
|
||||
if isinstance(entity, types.InputBotInlineMessageID):
|
||||
if isinstance(entity, (types.InputBotInlineMessageID, types.InputBotInlineMessageID64)):
|
||||
text = text or message
|
||||
message = entity
|
||||
elif isinstance(entity, types.Message):
|
||||
@@ -1178,7 +1178,7 @@ class MessageMethods:
|
||||
attributes=attributes,
|
||||
force_document=force_document)
|
||||
|
||||
if isinstance(entity, types.InputBotInlineMessageID):
|
||||
if isinstance(entity, (types.InputBotInlineMessageID, types.InputBotInlineMessageID64)):
|
||||
request = functions.messages.EditInlineBotMessageRequest(
|
||||
id=entity,
|
||||
message=text,
|
||||
|
Reference in New Issue
Block a user