mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Bot Api 3.6
This commit is contained in:
@@ -486,24 +486,25 @@ class TeleBot:
|
||||
return apihelper.delete_message(self.token, chat_id, message_id)
|
||||
|
||||
def send_photo(self, chat_id, photo, caption=None, reply_to_message_id=None, reply_markup=None,
|
||||
disable_notification=None):
|
||||
parse_mode=None, disable_notification=None):
|
||||
"""
|
||||
Use this method to send photos.
|
||||
:param disable_notification:
|
||||
:param chat_id:
|
||||
:param photo:
|
||||
:param caption:
|
||||
:param parse_mode
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:return: API reply.
|
||||
"""
|
||||
return types.Message.de_json(
|
||||
apihelper.send_photo(self.token, chat_id, photo, caption, reply_to_message_id, reply_markup,
|
||||
disable_notification))
|
||||
parse_mode, disable_notification))
|
||||
|
||||
def send_audio(self, chat_id, audio, caption=None, duration=None, performer=None, title=None,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=None, disable_notification=None, timeout=None):
|
||||
reply_markup=None, parse_mode=None, disable_notification=None, timeout=None):
|
||||
"""
|
||||
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.
|
||||
:param chat_id:Unique identifier for the message recipient
|
||||
@@ -511,16 +512,17 @@ class TeleBot:
|
||||
:param duration:Duration of the audio in seconds
|
||||
:param performer:Performer
|
||||
:param title:Track name
|
||||
:param parse_mode
|
||||
:param reply_to_message_id:If the message is a reply, ID of the original message
|
||||
:param reply_markup:
|
||||
:return: Message
|
||||
"""
|
||||
return types.Message.de_json(
|
||||
apihelper.send_audio(self.token, chat_id, audio, caption, duration, performer, title, reply_to_message_id,
|
||||
reply_markup, disable_notification, timeout))
|
||||
reply_markup, parse_mode, disable_notification, timeout))
|
||||
|
||||
def send_voice(self, chat_id, voice, caption=None, duration=None, reply_to_message_id=None, reply_markup=None,
|
||||
disable_notification=None, timeout=None):
|
||||
parse_mode=None, disable_notification=None, timeout=None):
|
||||
"""
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
|
||||
:param chat_id:Unique identifier for the message recipient.
|
||||
@@ -528,25 +530,27 @@ class TeleBot:
|
||||
:param duration:Duration of sent audio in seconds
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:param parse_mode
|
||||
:return: Message
|
||||
"""
|
||||
return types.Message.de_json(
|
||||
apihelper.send_voice(self.token, chat_id, voice, caption, duration, reply_to_message_id, reply_markup,
|
||||
disable_notification, timeout))
|
||||
parse_mode, disable_notification, timeout))
|
||||
|
||||
def send_document(self, chat_id, data, reply_to_message_id=None, caption=None, reply_markup=None,
|
||||
disable_notification=None, timeout=None):
|
||||
parse_mode=None, disable_notification=None, timeout=None):
|
||||
"""
|
||||
Use this method to send general files.
|
||||
:param chat_id:
|
||||
:param data:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:param parse_mode
|
||||
:return: API reply.
|
||||
"""
|
||||
return types.Message.de_json(
|
||||
apihelper.send_data(self.token, chat_id, data, 'document', reply_to_message_id, reply_markup,
|
||||
disable_notification, timeout, caption=caption))
|
||||
parse_mode, disable_notification, timeout, caption=caption))
|
||||
|
||||
def send_sticker(self, chat_id, data, reply_to_message_id=None, reply_markup=None, disable_notification=None,
|
||||
timeout=None):
|
||||
@@ -563,20 +567,22 @@ class TeleBot:
|
||||
disable_notification, timeout))
|
||||
|
||||
def send_video(self, chat_id, data, duration=None, caption=None, reply_to_message_id=None, reply_markup=None,
|
||||
disable_notification=None, timeout=None):
|
||||
parse_mode=None, supports_streaming=None, disable_notification=None, timeout=None):
|
||||
"""
|
||||
Use this method to send video files, Telegram clients support mp4 videos.
|
||||
:param chat_id: Integer : Unique identifier for the message recipient — User or GroupChat id
|
||||
:param data: InputFile or String : Video to send. You can either pass a file_id as String to resend a video that is already on the Telegram server
|
||||
:param duration: Integer : Duration of sent video in seconds
|
||||
:param caption: String : Video caption (may also be used when resending videos by file_id).
|
||||
:param parse_mode:
|
||||
:param supports_streaming:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
return types.Message.de_json(
|
||||
apihelper.send_video(self.token, chat_id, data, duration, caption, reply_to_message_id, reply_markup,
|
||||
disable_notification, timeout))
|
||||
parse_mode, supports_streaming, disable_notification, timeout))
|
||||
|
||||
def send_video_note(self, chat_id, data, duration=None, length=None, reply_to_message_id=None, reply_markup=None,
|
||||
disable_notification=None, timeout=None):
|
||||
|
||||
Reference in New Issue
Block a user