mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
added parameter "can_manage_topics" for "promoteChatMember" method
This commit is contained in:
parent
3ae5d904c9
commit
5b169647e8
2 changed files with 5 additions and 0 deletions
|
|
@ -1641,6 +1641,7 @@ class Bot(ContextInstanceMixin["Bot"]):
|
|||
can_change_info: Optional[bool] = None,
|
||||
can_invite_users: Optional[bool] = None,
|
||||
can_pin_messages: Optional[bool] = None,
|
||||
can_manage_topics: Optional[bool] = None,
|
||||
request_timeout: Optional[int] = None,
|
||||
) -> bool:
|
||||
"""
|
||||
|
|
@ -1661,6 +1662,7 @@ class Bot(ContextInstanceMixin["Bot"]):
|
|||
:param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings
|
||||
:param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat
|
||||
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only
|
||||
:param can_manage_topics: Pass :code: `True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only
|
||||
:param request_timeout: Request timeout
|
||||
:return: Returns True on success.
|
||||
"""
|
||||
|
|
@ -1678,6 +1680,7 @@ class Bot(ContextInstanceMixin["Bot"]):
|
|||
can_change_info=can_change_info,
|
||||
can_invite_users=can_invite_users,
|
||||
can_pin_messages=can_pin_messages,
|
||||
can_manage_topics=can_manage_topics,
|
||||
)
|
||||
return await self(call, request_timeout=request_timeout)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ class PromoteChatMember(TelegramMethod[bool]):
|
|||
"""Pass :code:`True` if the administrator can invite new users to the chat"""
|
||||
can_pin_messages: Optional[bool] = None
|
||||
"""Pass :code:`True` if the administrator can pin messages, supergroups only"""
|
||||
can_manage_topics: Optional[bool] = None
|
||||
"""Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only"""
|
||||
|
||||
def build_request(self, bot: Bot) -> Request:
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue