mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
New audio,voice supported.
This commit is contained in:
@@ -231,7 +231,7 @@ class TeleBot:
|
||||
return types.Message.de_json(
|
||||
apihelper.send_photo(self.token, chat_id, photo, caption, reply_to_message_id, reply_markup))
|
||||
|
||||
def send_audio(self, chat_id, data, reply_to_message_id=None, reply_markup=None):
|
||||
def send_audio(self, chat_id, audio, duration=None, performer=None, title=None, reply_to_message_id=None, reply_markup=None):
|
||||
"""
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable
|
||||
voice message. For this to work, your audio must be in an .ogg file encoded with OPUS
|
||||
@@ -242,7 +242,11 @@ class TeleBot:
|
||||
:return: API reply.
|
||||
"""
|
||||
return types.Message.de_json(
|
||||
apihelper.send_data(self.token, chat_id, data, 'audio', reply_to_message_id, reply_markup))
|
||||
apihelper.send_audio(self.token, chat_id, audio,duration,performer,title, reply_to_message_id, reply_markup))
|
||||
|
||||
def send_voice(self, chat_id, voice, duration=None, reply_to_message_id=None, reply_markup=None):
|
||||
return types.Message.de_json(
|
||||
apihelper.send_voice(self.token, chat_id, voice, duration, reply_to_message_id,reply_markup))
|
||||
|
||||
def send_document(self, chat_id, data, reply_to_message_id=None, reply_markup=None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user