mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2021-05-13 03:08:02 +03:00
Add some comment
This commit is contained in:
@@ -121,16 +121,58 @@ class TeleBot:
|
||||
return apihelper.forward_message(self.token, chat_id, from_chat_id, message_id)
|
||||
|
||||
def send_photo(self, chat_id, photo, caption=None, reply_to_message_id=None, reply_markup=None):
|
||||
"""
|
||||
Use this method to send photos.
|
||||
:param chat_id:
|
||||
:param photo:
|
||||
:param caption:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
return 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):
|
||||
"""
|
||||
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
|
||||
:param chat_id:
|
||||
:param data:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
return apihelper.send_data(self.token, chat_id, data, 'audio', reply_to_message_id, reply_markup)
|
||||
|
||||
def send_document(self, chat_id, data, reply_to_message_id=None, reply_markup=None):
|
||||
"""
|
||||
Use this method to send general files.
|
||||
:param chat_id:
|
||||
:param data:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
return apihelper.send_data(self.token, chat_id, data, 'document', reply_to_message_id, reply_markup)
|
||||
|
||||
def send_sticker(self, chat_id, data, reply_to_message_id=None, reply_markup=None):
|
||||
"""
|
||||
Use this method to send .webp stickers.
|
||||
:param chat_id:
|
||||
:param data:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
return apihelper.send_data(self.token, chat_id, data, 'sticker', reply_to_message_id, reply_markup)
|
||||
|
||||
def send_video(self, chat_id, data, reply_to_message_id=None, reply_markup=None):
|
||||
"""
|
||||
Use this method to send video files, Telegram clients support mp4 videos.
|
||||
:param chat_id:
|
||||
:param data:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
return apihelper.send_data(self.token, chat_id, data, 'video', reply_to_message_id, reply_markup)
|
||||
|
||||
Reference in New Issue
Block a user