mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix edit inlinemessage will return bool not Message object.
This commit is contained in:
parent
eb8e87fdec
commit
d0666071d8
@ -478,9 +478,11 @@ class TeleBot:
|
|||||||
|
|
||||||
def edit_message_text(self, text, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None,
|
def edit_message_text(self, text, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None,
|
||||||
disable_web_page_preview=None, reply_markup=None):
|
disable_web_page_preview=None, reply_markup=None):
|
||||||
return types.Message.de_json(
|
result = apihelper.edit_message_text(self.token, text, chat_id, message_id, inline_message_id, parse_mode,
|
||||||
apihelper.edit_message_text(self.token, text, chat_id, message_id, inline_message_id, parse_mode,
|
disable_web_page_preview, reply_markup)
|
||||||
disable_web_page_preview, reply_markup))
|
if type(result) == bool: # if edit inline message return is bool not Message.
|
||||||
|
return result
|
||||||
|
return types.Message.de_json(result)
|
||||||
|
|
||||||
def edit_message_replay_markup(self, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
def edit_message_replay_markup(self, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
||||||
return types.Message.de_json(
|
return types.Message.de_json(
|
||||||
|
Loading…
Reference in New Issue
Block a user