mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add file_name support to send_document method
This commit is contained in:
parent
38c4c21030
commit
e56f134a7c
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user