mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Added use_independent_chat_permissions for restrictchatmember
This commit is contained in:
@ -2917,7 +2917,8 @@ class TeleBot:
|
||||
can_add_web_page_previews: Optional[bool]=None,
|
||||
can_change_info: Optional[bool]=None,
|
||||
can_invite_users: Optional[bool]=None,
|
||||
can_pin_messages: Optional[bool]=None) -> bool:
|
||||
can_pin_messages: Optional[bool]=None,
|
||||
use_independent_chat_permissions: Optional[bool]=None) -> bool:
|
||||
"""
|
||||
Use this method to restrict a user in a supergroup.
|
||||
The bot must be an administrator in the supergroup for this to work and must have
|
||||
@ -2965,6 +2966,12 @@ class TeleBot:
|
||||
:param can_pin_messages: Pass True, if the user is allowed to pin messages. Ignored in public supergroups
|
||||
:type can_pin_messages: :obj:`bool`
|
||||
|
||||
:param use_independent_chat_permissions: Pass True if chat permissions are set independently. Otherwise,
|
||||
the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
|
||||
can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and
|
||||
can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.
|
||||
:type use_independent_chat_permissions: :obj:`bool`
|
||||
|
||||
:return: True on success
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
@ -2973,7 +2980,7 @@ class TeleBot:
|
||||
can_send_messages, can_send_media_messages,
|
||||
can_send_polls, can_send_other_messages,
|
||||
can_add_web_page_previews, can_change_info,
|
||||
can_invite_users, can_pin_messages)
|
||||
can_invite_users, can_pin_messages, use_independent_chat_permissions)
|
||||
|
||||
def promote_chat_member(
|
||||
self, chat_id: Union[int, str], user_id: int,
|
||||
|
Reference in New Issue
Block a user