Add file_name support to send_document method

This commit is contained in:
Vlad Galatskiy 2021-06-27 11:38:45 +03:00 committed by GitHub
parent 38c4c21030
commit e56f134a7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1114,7 +1114,8 @@ class TeleBot:
timeout: Optional[int]=None,
thumb: Optional[Union[Any, str]]=None,
caption_entities: Optional[List[types.MessageEntity]]=None,
allow_sending_without_reply: Optional[bool]=None) -> types.Message:
allow_sending_without_reply: Optional[bool]=None,
file_name: Optional[str]=None) -> types.Message:
"""
Use this method to send general files.
:param chat_id:
@ -1128,6 +1129,7 @@ class TeleBot:
:param thumb: InputFile or String : Thumbnail of the file sent
:param caption_entities:
:param allow_sending_without_reply:
:param file_name:
:return: API reply.
"""
parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
@ -1136,7 +1138,7 @@ class TeleBot:
apihelper.send_data(
self.token, chat_id, data, 'document', reply_to_message_id, reply_markup,
parse_mode, disable_notification, timeout, caption, thumb, caption_entities,
allow_sending_without_reply))
allow_sending_without_reply, file_name))
def send_sticker(
self, chat_id: Union[int, str], data: Union[Any, str],