@@ -3472,7 +3472,7 @@ def ban_chat_member(
34723472 less than 30 seconds from the current time they are considered to be banned forever
34733473 :type until_date: :obj:`int` or :obj:`datetime`
34743474
3475- :param revoke_messages: Bool: Pass True to delete all messages from the chat for the user that is being removed.
3475+ :param revoke_messages: Pass True to delete all messages from the chat for the user that is being removed.
34763476 If False, the user will be able to see messages in the group that were sent before the user was removed.
34773477 Always True for supergroups and channels.
34783478 :type revoke_messages: :obj:`bool`
@@ -3545,7 +3545,7 @@ def restrict_chat_member(
35453545 :param until_date: Date when restrictions will be lifted for the user, unix time.
35463546 If user is restricted for more than 366 days or less than 30 seconds from the current time,
35473547 they are considered to be restricted forever
3548- :type until_date: :obj:`int` or :obj:`datetime`
3548+ :type until_date: :obj:`int` or :obj:`datetime`, optional
35493549
35503550 :param can_send_messages: deprecated
35513551 :type can_send_messages: :obj:`bool`
@@ -3571,10 +3571,11 @@ def restrict_chat_member(
35713571 :param can_pin_messages: deprecated
35723572 :type can_pin_messages: :obj:`bool`
35733573
3574- :param use_independent_chat_permissions: Optional Pass True if chat permissions are set independently.
3574+ :param use_independent_chat_permissions: Pass True if chat permissions are set independently.
35753575 Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
35763576 can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes
35773577 permissions; the can_send_polls permission will imply the can_send_messages permission.
3578+ :type use_independent_chat_permissions: :obj:`bool`, optional
35783579
35793580 :param permissions: ChatPermissions object defining permissions.
35803581 :type permissions: :class:`telebot.types.ChatPermissions`
@@ -5251,14 +5252,16 @@ def reply_to(self, message: types.Message, text: str, **kwargs) -> types.Message
52515252 """
52525253 if kwargs :
52535254 reply_parameters = kwargs .pop ("reply_parameters" , None )
5255+ if "allow_sending_without_reply" in kwargs :
5256+ logger .warning ("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead." )
52545257 else :
52555258 reply_parameters = None
5256- if not reply_parameters :
5257- reply_parameters = types .ReplyParameters (message .message_id )
52585259
5259- if "allow_sending_without_reply" in kwargs :
5260- logger .warning ("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead." )
5261- reply_parameters .allow_sending_without_reply = kwargs .pop ("allow_sending_without_reply" )
5260+ if not reply_parameters :
5261+ reply_parameters = types .ReplyParameters (
5262+ message .message_id ,
5263+ allow_sending_without_reply = kwargs .pop ("allow_sending_without_reply" , None ) if kwargs else None
5264+ )
52625265
52635266 return self .send_message (message .chat .id , text , reply_parameters = reply_parameters , ** kwargs )
52645267
0 commit comments