Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 def send_sticker(self, chat_id, data, reply_to_message_id=None, reply_markup=None, disable_notification=None):
     """
     Use this method to send .webp stickers.
     :param chat_id:
     :param data:
     :param reply_to_message_id:
     :param reply_markup:
     :return: API reply.
     """
     return types.Message.de_json(
         apihelper.send_data(self.token, chat_id, data, 'sticker', reply_to_message_id, reply_markup,
                             disable_notification))
Esempio n. 6
0
 def send_document(self, chat_id, data, reply_to_message_id=None, reply_markup=None, disable_notification=None):
     """
     Use this method to send general files.
     :param chat_id:
     :param data:
     :param reply_to_message_id:
     :param reply_markup:
     :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))
Esempio n. 7
0
 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)
Esempio n. 8
0
 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)
Esempio n. 9
0
 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)
Esempio n. 10
0
 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)