@@ -407,6 +407,32 @@ def get_chat_members_count(self, chat_id):
407407 result = apihelper .get_chat_members_count (self .token , chat_id )
408408 return result
409409
410+ def set_chat_sticker_set (self , chat_id , sticker_set_name ):
411+ """
412+ Use this method to set a new group sticker set for a supergroup. The bot must be an administrator
413+ in the chat for this to work and must have the appropriate admin rights.
414+ Use the field can_set_sticker_set optionally returned in getChat requests to check
415+ if the bot can use this method. Returns True on success.
416+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
417+ (in the format @supergroupusername)
418+ :param sticker_set_name: Name of the sticker set to be set as the group sticker set
419+ :return:
420+ """
421+ result = apihelper .set_chat_sticker_set (self .token , chat_id , sticker_set_name )
422+ return result
423+
424+ def delete_chat_sticker_set (self , chat_id ):
425+ """
426+ Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat
427+ for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set
428+ optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
429+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
430+ (in the format @supergroupusername)
431+ :return:
432+ """
433+ result = apihelper .delete_chat_sticker_set (self .token , chat_id )
434+ return result
435+
410436 def get_chat_member (self , chat_id , user_id ):
411437 """
412438 Use this method to get information about a member of a chat. Returns a ChatMember object on success.
@@ -568,21 +594,51 @@ def send_video_note(self, chat_id, data, duration=None, length=None, reply_to_me
568594 apihelper .send_video_note (self .token , chat_id , data , duration , length , reply_to_message_id , reply_markup ,
569595 disable_notification , timeout ))
570596
571- def send_location (self , chat_id , latitude , longitude , reply_to_message_id = None , reply_markup = None ,
597+ def send_location (self , chat_id , latitude , longitude , live_period = None , reply_to_message_id = None , reply_markup = None ,
572598 disable_notification = None ):
573599 """
574600 Use this method to send point on the map.
575601 :param chat_id:
576602 :param latitude:
577603 :param longitude:
604+ :param live_period
578605 :param reply_to_message_id:
579606 :param reply_markup:
580607 :return: API reply.
581608 """
582609 return types .Message .de_json (
583- apihelper .send_location (self .token , chat_id , latitude , longitude , reply_to_message_id , reply_markup ,
610+ apihelper .send_location (self .token , chat_id , latitude , longitude , live_period , reply_to_message_id , reply_markup ,
584611 disable_notification ))
585612
613+ def edit_message_live_location (self , latitude , longitude , chat_id = None , message_id = None ,
614+ inline_message_id = None , reply_markup = None ):
615+ """
616+ Use this method to edit live location
617+ :param latitude:
618+ :param longitude:
619+ :param chat_id:
620+ :param message_id:
621+ :param inline_message_id:
622+ :param reply_markup:
623+ :return:
624+ """
625+ return types .Message .de_json (
626+ apihelper .edit_message_live_location (self , latitude , longitude , chat_id , message_id ,
627+ inline_message_id , reply_markup ))
628+
629+ def stop_message_live_location (self , chat_id = None , message_id = None , inline_message_id = None , reply_markup = None ):
630+ """
631+ Use this method to stop updating a live location message sent by the bot
632+ or via the bot (for inline bots) before live_period expires
633+ :param chat_id:
634+ :param message_id:
635+ :param inline_message_id:
636+ :param reply_markup:
637+ :return:
638+ """
639+ return types .Message .de_json (
640+ apihelper .stop_message_live_location (self , chat_id , message_id , inline_message_id , reply_markup ))
641+
586642 def send_venue (self , chat_id , latitude , longitude , title , address , foursquare_id = None , disable_notification = None ,
587643 reply_to_message_id = None , reply_markup = None ):
588644 """
@@ -1245,6 +1301,14 @@ def get_chat_administrators(self, *args):
12451301 def get_chat_members_count (self , * args ):
12461302 return TeleBot .get_chat_members_count (self , * args )
12471303
1304+ @util .async ()
1305+ def set_chat_sticker_set (self , * args ):
1306+ return TeleBot .set_chat_sticker_set (self , * args )
1307+
1308+ @util .async ()
1309+ def delete_chat_sticker_set (self , * args ):
1310+ return TeleBot .delete_chat_sticker_set (self , * args )
1311+
12481312 @util .async ()
12491313 def get_chat_member (self , * args ):
12501314 return TeleBot .get_chat_member (self , * args )
@@ -1293,6 +1357,14 @@ def send_video_note(self, *args, **kwargs):
12931357 def send_location (self , * args , ** kwargs ):
12941358 return TeleBot .send_location (self , * args , ** kwargs )
12951359
1360+ @util .async ()
1361+ def edit_message_live_location (self , * args , ** kwargs ):
1362+ return TeleBot .edit_message_live_location (self , * args , ** kwargs )
1363+
1364+ @util .async ()
1365+ def stop_message_live_location (self , * args , ** kwargs ):
1366+ return TeleBot .stop_message_live_location (self , * args , ** kwargs )
1367+
12961368 @util .async ()
12971369 def send_venue (self , * args , ** kwargs ):
12981370 return TeleBot .send_venue (self , * args , ** kwargs )
0 commit comments