mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
All Updating messages methods done.
This commit is contained in:
@ -466,6 +466,16 @@ class TeleBot:
|
||||
apihelper.edit_message_text(self.token, text, chat_id, message_id, inline_message_id, parse_mode,
|
||||
disable_web_page_preview, reply_markup))
|
||||
|
||||
def edit_message_replay_markup(self, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
||||
return types.Message.de_json(
|
||||
apihelper.edit_message_replay_markup(self.token, chat_id, message_id, inline_message_id, reply_markup)
|
||||
)
|
||||
|
||||
def edit_message_caption(self, caption, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
||||
return types.Message.de_json(
|
||||
apihelper.edit_message_caption(self.token, caption, chat_id, message_id, inline_message_id, reply_markup)
|
||||
)
|
||||
|
||||
def reply_to(self, message, text, **kwargs):
|
||||
"""
|
||||
Convenience function for `send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)`
|
||||
|
@ -332,6 +332,34 @@ def edit_message_text(token, text, chat_id=None, message_id=None, inline_message
|
||||
return _make_request(token, method_url, params=payload)
|
||||
|
||||
|
||||
def edit_message_caption(token, caption, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
||||
method_url = r'editMessageCaption'
|
||||
payload = {'caption': caption}
|
||||
if chat_id:
|
||||
payload['chat_id'] = chat_id
|
||||
if message_id:
|
||||
payload['message_id'] = message_id
|
||||
if inline_message_id:
|
||||
payload['inline_message_id'] = inline_message_id
|
||||
if reply_markup:
|
||||
payload['reply_markup'] = _convert_markup(reply_markup)
|
||||
return _make_request(token, method_url, params=payload)
|
||||
|
||||
|
||||
def edit_message_replay_markup(token, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
||||
method_url = r'editMessageReplyMarkup'
|
||||
payload = {}
|
||||
if chat_id:
|
||||
payload['chat_id'] = chat_id
|
||||
if message_id:
|
||||
payload['message_id'] = message_id
|
||||
if inline_message_id:
|
||||
payload['inline_message_id'] = inline_message_id
|
||||
if reply_markup:
|
||||
payload['reply_markup'] = _convert_markup(reply_markup)
|
||||
return _make_request(token, method_url, params=payload)
|
||||
|
||||
|
||||
# InlineQuery
|
||||
|
||||
def answer_callback_query(token, callback_query_id, text=None, show_alert=None):
|
||||
|
Reference in New Issue
Block a user