1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00
This commit is contained in:
coder2020official 2021-07-28 23:06:31 +05:00
parent 02b886465e
commit 9c1b19a9e4
2 changed files with 5 additions and 2 deletions

View File

@ -2117,6 +2117,7 @@ class TeleBot:
message_id: Optional[int]=None,
inline_message_id: Optional[str]=None,
parse_mode: Optional[str]=None,
caption_entities: Optional[List[types.MessageEntity]]=None,
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
"""
Use this method to edit captions of messages

View File

@ -1123,7 +1123,7 @@ def edit_message_text(token, text, chat_id=None, message_id=None, inline_message
def edit_message_caption(token, caption, chat_id=None, message_id=None, inline_message_id=None,
parse_mode=None, reply_markup=None):
parse_mode=None, caption_entities=None,reply_markup=None):
method_url = r'editMessageCaption'
payload = {'caption': caption}
if chat_id:
@ -1134,6 +1134,8 @@ def edit_message_caption(token, caption, chat_id=None, message_id=None, inline_m
payload['inline_message_id'] = inline_message_id
if parse_mode:
payload['parse_mode'] = parse_mode
if caption_entities:
payload['caption_entities'] = caption_entities
if reply_markup:
payload['reply_markup'] = _convert_markup(reply_markup)
return _make_request(token, method_url, params=payload, method='post')