@@ -255,6 +255,7 @@ def polling(self, none_stop=False, interval=0, timeout=20):
255255 Warning: Do not call this function more than once!
256256
257257 Always get updates.
258+ :param interval:
258259 :param none_stop: Do not stop polling when an ApiException occurs.
259260 :param timeout: Timeout in seconds for long polling.
260261 :return:
@@ -462,6 +463,7 @@ def send_photo(self, chat_id, photo, caption=None, reply_to_message_id=None, rep
462463 disable_notification = None ):
463464 """
464465 Use this method to send photos.
466+ :param disable_notification:
465467 :param chat_id:
466468 :param photo:
467469 :param caption:
@@ -871,6 +873,86 @@ def answer_callback_query(self, callback_query_id, text=None, show_alert=None, u
871873 """
872874 return apihelper .answer_callback_query (self .token , callback_query_id , text , show_alert , url , cache_time )
873875
876+ # def send_sticker(self, chat_id, sticker, disable_notification=None, reply_to_message_id=None, reply_markup=None):
877+ # """
878+ # Use this method to send .webp stickers. On success, the sent Message is returned.
879+ # :param chat_id:
880+ # :param sticker:
881+ # :param disable_notification:
882+ # :param reply_to_message_id:
883+ # :param reply_markup:
884+ # :return:
885+ # """
886+ # result = apihelper.send_sticker(self.token, chat_id, sticker, disable_notification, reply_markup, reply_markup)
887+ # return types.Message.de_json(result)
888+
889+ def get_sticker_set (self , name ):
890+ """
891+ Use this method to get a sticker set. On success, a StickerSet object is returned.
892+ :param token:
893+ :param name:
894+ :return:
895+ """
896+ result = apihelper .get_sticker_set (self .token , name )
897+ return types .StickerSet .de_json (result )
898+
899+ def upload_sticker_file (self , user_id , png_sticker ):
900+ """
901+ Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet
902+ methods (can be used multiple times). Returns the uploaded File on success.
903+ :param user_id:
904+ :param png_sticker:
905+ :return:
906+ """
907+ result = apihelper .upload_sticker_file (self .token , user_id , png_sticker )
908+ return types .File .de_json (result )
909+
910+ def create_new_sticker_set (self , user_id , name , title , png_sticker , emojis , contains_masks = None ,
911+ mask_position = None ):
912+ """
913+ Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set.
914+ Returns True on success.
915+ :param user_id:
916+ :param name:
917+ :param title:
918+ :param png_sticker:
919+ :param emojis:
920+ :param contains_masks:
921+ :param mask_position:
922+ :return:
923+ """
924+ return apihelper .create_new_sticker_set (self .token , user_id , name , title , png_sticker , emojis , contains_masks ,
925+ mask_position )
926+
927+ def add_sticker_to_set (self , user_id , name , png_sticker , emojis , mask_position ):
928+ """
929+ Use this method to add a new sticker to a set created by the bot. Returns True on success.
930+ :param user_id:
931+ :param name:
932+ :param png_sticker:
933+ :param emojis:
934+ :param mask_position:
935+ :return:
936+ """
937+ return apihelper .add_sticker_to_set (self .token , user_id , name , png_sticker , emojis , mask_position )
938+
939+ def set_sticker_position_in_set (self , sticker , position ):
940+ """
941+ Use this method to move a sticker in a set created by the bot to a specific position . Returns True on success.
942+ :param sticker:
943+ :param position:
944+ :return:
945+ """
946+ return apihelper .set_sticker_position_in_set (self .token , sticker , position )
947+
948+ def delete_sticker_from_set (self , sticker ):
949+ """
950+ Use this method to delete a sticker from a set created by the bot. Returns True on success.
951+ :param sticker:
952+ :return:
953+ """
954+ return apihelper .delete_sticker_from_set (self .token , sticker )
955+
874956 def register_for_reply (self , message , callback ):
875957 """
876958 Registers a callback function to be notified when a reply to `message` arrives.
@@ -1301,3 +1383,31 @@ def answer_inline_query(self, *args, **kwargs):
13011383 @util .async ()
13021384 def answer_callback_query (self , * args , ** kwargs ):
13031385 return TeleBot .answer_callback_query (self , * args , ** kwargs )
1386+
1387+ @util .async ()
1388+ def send_sticker (self , * args , ** kwargs ):
1389+ return TeleBot .send_sticker (self , * args , ** kwargs )
1390+
1391+ @util .async ()
1392+ def get_sticker_set (self , * args , ** kwargs ):
1393+ return TeleBot .get_sticker_set (self , * args , ** kwargs )
1394+
1395+ @util .async ()
1396+ def upload_sticker_file (self , * args , ** kwargs ):
1397+ return TeleBot .upload_sticker_file (self , * args , ** kwargs )
1398+
1399+ @util .async ()
1400+ def create_new_sticker_set (self , * args , ** kwargs ):
1401+ return TeleBot .create_new_sticker_set (self , * args , ** kwargs )
1402+
1403+ @util .async ()
1404+ def add_sticker_to_set (self , * args , ** kwargs ):
1405+ return TeleBot .add_sticker_to_set (self , * args , ** kwargs )
1406+
1407+ @util .async ()
1408+ def set_sticker_position_in_set (self , * args , ** kwargs ):
1409+ return TeleBot .set_sticker_position_in_set (self , * args , ** kwargs )
1410+
1411+ @util .async ()
1412+ def delete_sticker_from_set (self , * args , ** kwargs ):
1413+ return TeleBot .delete_sticker_from_set (self , * args , ** kwargs )
0 commit comments