@@ -1009,14 +1009,14 @@ def answerCallbackQuery(self, callback_query_id, text=None, show_alert=False, **
1009
1009
return result
1010
1010
1011
1011
@log
1012
+ @message
1012
1013
def editMessageText (self ,
1013
1014
text ,
1014
1015
chat_id = None ,
1015
1016
message_id = None ,
1016
1017
inline_message_id = None ,
1017
1018
parse_mode = None ,
1018
1019
disable_web_page_preview = None ,
1019
- reply_markup = None ,
1020
1020
** kwargs ):
1021
1021
"""Use this method to edit text messages sent by the bot or via the bot
1022
1022
(for inline bots).
@@ -1043,6 +1043,10 @@ def editMessageText(self,
1043
1043
A JSON-serialized object for an inline keyboard.
1044
1044
1045
1045
Keyword Args:
1046
+ reply_markup (Optional[:class:`telegram.ReplyMarkup`]): Additional
1047
+ interface options. A JSON-serialized object for an inline
1048
+ keyboard, custom reply keyboard, instructions to hide reply
1049
+ keyboard or to force a reply from the user.
1046
1050
timeout (Optional[float]): If this value is specified, use it as
1047
1051
the definitive timeout (in seconds) for urlopen() operations.
1048
1052
@@ -1070,15 +1074,8 @@ def editMessageText(self,
1070
1074
data ['parse_mode' ] = parse_mode
1071
1075
if disable_web_page_preview :
1072
1076
data ['disable_web_page_preview' ] = disable_web_page_preview
1073
- if reply_markup :
1074
- if isinstance (reply_markup , ReplyMarkup ):
1075
- data ['reply_markup' ] = reply_markup .to_json ()
1076
- else :
1077
- data ['reply_markup' ] = reply_markup
1078
-
1079
- result = request .post (url , data , timeout = kwargs .get ('timeout' ))
1080
1077
1081
- return Message . de_json ( result )
1078
+ return url , data
1082
1079
1083
1080
@log
1084
1081
@message
0 commit comments