added field "can_manage_topics" to some methods

This commit is contained in:
ZeN 2022-11-05 16:51:21 +03:00
parent 5b169647e8
commit 188ebb70e9
No known key found for this signature in database
GPG key ID: ED6378D93306FB20
5 changed files with 10 additions and 0 deletions

View file

@ -37,3 +37,5 @@ class ChatAdministratorRights(TelegramObject):
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""

View file

@ -65,5 +65,7 @@ class ChatMember(TelegramObject):
"""*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
can_add_web_page_previews: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""*Optional*. Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever"""

View file

@ -45,5 +45,7 @@ class ChatMemberAdministrator(ChatMember):
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
custom_title: Optional[str] = None
"""*Optional*. Custom title for this user"""

View file

@ -30,6 +30,8 @@ class ChatMemberRestricted(ChatMember):
""":code:`True`, if the user is allowed to invite new users to the chat"""
can_pin_messages: bool
""":code:`True`, if the user is allowed to pin messages"""
can_manage_topics: bool
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
can_send_messages: bool
""":code:`True`, if the user is allowed to send text messages, contacts, locations and venues"""
can_send_media_messages: bool

View file

@ -28,3 +28,5 @@ class ChatPermissions(MutableTelegramObject):
"""*Optional*. :code:`True`, if the user is allowed to invite new users to the chat"""
can_pin_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored in public supergroups"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""