mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
upd
This commit is contained in:
parent
02b886465e
commit
9c1b19a9e4
@ -2116,7 +2116,8 @@ class TeleBot:
|
|||||||
self, caption: str, chat_id: Optional[Union[int, str]]=None,
|
self, caption: str, chat_id: Optional[Union[int, str]]=None,
|
||||||
message_id: Optional[int]=None,
|
message_id: Optional[int]=None,
|
||||||
inline_message_id: Optional[str]=None,
|
inline_message_id: Optional[str]=None,
|
||||||
parse_mode: 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]:
|
reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> Union[types.Message, bool]:
|
||||||
"""
|
"""
|
||||||
Use this method to edit captions of messages
|
Use this method to edit captions of messages
|
||||||
|
@ -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,
|
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'
|
method_url = r'editMessageCaption'
|
||||||
payload = {'caption': caption}
|
payload = {'caption': caption}
|
||||||
if chat_id:
|
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
|
payload['inline_message_id'] = inline_message_id
|
||||||
if parse_mode:
|
if parse_mode:
|
||||||
payload['parse_mode'] = parse_mode
|
payload['parse_mode'] = parse_mode
|
||||||
|
if caption_entities:
|
||||||
|
payload['caption_entities'] = caption_entities
|
||||||
if reply_markup:
|
if reply_markup:
|
||||||
payload['reply_markup'] = _convert_markup(reply_markup)
|
payload['reply_markup'] = _convert_markup(reply_markup)
|
||||||
return _make_request(token, method_url, params=payload, method='post')
|
return _make_request(token, method_url, params=payload, method='post')
|
||||||
|
Loading…
Reference in New Issue
Block a user