From 188ebb70e9ab3f2f564893596ae2bd2f72a50983 Mon Sep 17 00:00:00 2001 From: ZeN Date: Sat, 5 Nov 2022 16:51:21 +0300 Subject: [PATCH] added field "can_manage_topics" to some methods --- aiogram/types/chat_administrator_rights.py | 2 ++ aiogram/types/chat_member.py | 2 ++ aiogram/types/chat_member_administrator.py | 2 ++ aiogram/types/chat_member_restricted.py | 2 ++ aiogram/types/chat_permissions.py | 2 ++ 5 files changed, 10 insertions(+) diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py index 20f4b65c..eb38b693 100644 --- a/aiogram/types/chat_administrator_rights.py +++ b/aiogram/types/chat_administrator_rights.py @@ -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""" diff --git a/aiogram/types/chat_member.py b/aiogram/types/chat_member.py index d430e0ce..49bd4d1b 100644 --- a/aiogram/types/chat_member.py +++ b/aiogram/types/chat_member.py @@ -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""" diff --git a/aiogram/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index 896033d2..1c9a8aae 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -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""" diff --git a/aiogram/types/chat_member_restricted.py b/aiogram/types/chat_member_restricted.py index 7e244024..f8fa94f9 100644 --- a/aiogram/types/chat_member_restricted.py +++ b/aiogram/types/chat_member_restricted.py @@ -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 diff --git a/aiogram/types/chat_permissions.py b/aiogram/types/chat_permissions.py index 15ddaba4..ee1b2ff5 100644 --- a/aiogram/types/chat_permissions.py +++ b/aiogram/types/chat_permissions.py @@ -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"""