Re-generate Bot API

This commit is contained in:
Alex Root Junior 2023-10-29 02:15:50 +03:00
parent 180a7297ff
commit a355daba49
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
18 changed files with 247 additions and 156 deletions

View file

@ -811,15 +811,18 @@ class Chat(TelegramObject):
user_id: int,
is_anonymous: Optional[bool] = None,
can_manage_chat: Optional[bool] = None,
can_post_messages: Optional[bool] = None,
can_edit_messages: Optional[bool] = None,
can_delete_messages: Optional[bool] = None,
can_manage_video_chats: Optional[bool] = None,
can_restrict_members: Optional[bool] = None,
can_promote_members: Optional[bool] = None,
can_change_info: Optional[bool] = None,
can_invite_users: Optional[bool] = None,
can_post_messages: Optional[bool] = None,
can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_post_stories: Optional[bool] = None,
can_edit_stories: Optional[bool] = None,
can_delete_stories: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
**kwargs: Any,
) -> PromoteChatMember:
@ -835,16 +838,19 @@ class Chat(TelegramObject):
:param user_id: Unique identifier of the target user
:param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden
:param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
:param can_post_messages: Pass :code:`True` if the administrator can create channel posts, channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages, channels only
:param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
:param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users
:param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats
:param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members
:param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics
:param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)
: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_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only
:param can_post_stories: Pass :code:`True` if the administrator can post stories in the channel; channels only
:param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users; channels only
:param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users; channels only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only
:return: instance of method :class:`aiogram.methods.promote_chat_member.PromoteChatMember`
"""
@ -858,15 +864,18 @@ class Chat(TelegramObject):
user_id=user_id,
is_anonymous=is_anonymous,
can_manage_chat=can_manage_chat,
can_post_messages=can_post_messages,
can_edit_messages=can_edit_messages,
can_delete_messages=can_delete_messages,
can_manage_video_chats=can_manage_video_chats,
can_restrict_members=can_restrict_members,
can_promote_members=can_promote_members,
can_change_info=can_change_info,
can_invite_users=can_invite_users,
can_post_messages=can_post_messages,
can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages,
can_post_stories=can_post_stories,
can_edit_stories=can_edit_stories,
can_delete_stories=can_delete_stories,
can_manage_topics=can_manage_topics,
**kwargs,
).as_(self._bot)

View file

@ -18,13 +18,13 @@ class ChatAdministratorRights(TelegramObject):
is_anonymous: bool
""":code:`True`, if the user's presence in the chat is hidden"""
can_manage_chat: bool
""":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
""":code:`True`, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
can_delete_messages: bool
""":code:`True`, if the administrator can delete messages of other users"""
can_manage_video_chats: bool
""":code:`True`, if the administrator can manage video chats"""
can_restrict_members: bool
""":code:`True`, if the administrator can restrict, ban or unban chat members"""
""":code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"""
can_promote_members: bool
""":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
can_change_info: bool
@ -32,7 +32,7 @@ class ChatAdministratorRights(TelegramObject):
can_invite_users: bool
""":code:`True`, if the user is allowed to invite new users to the chat"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
@ -42,7 +42,7 @@ class ChatAdministratorRights(TelegramObject):
can_edit_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only"""
can_delete_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can delete stories posted by other users"""
"""*Optional*. :code:`True`, if the administrator can delete stories posted by other users; channels 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

@ -63,7 +63,7 @@ class ChatJoinRequest(TelegramObject):
from_user: User = Field(..., alias="from")
"""User that sent the join request"""
user_chat_id: int
"""Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user."""
"""Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."""
date: DateTime
"""Date the request was sent in Unix time"""
bio: Optional[str] = None

View file

@ -25,13 +25,13 @@ class ChatMemberAdministrator(ChatMember):
is_anonymous: bool
""":code:`True`, if the user's presence in the chat is hidden"""
can_manage_chat: bool
""":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
""":code:`True`, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
can_delete_messages: bool
""":code:`True`, if the administrator can delete messages of other users"""
can_manage_video_chats: bool
""":code:`True`, if the administrator can manage video chats"""
can_restrict_members: bool
""":code:`True`, if the administrator can restrict, ban or unban chat members"""
""":code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"""
can_promote_members: bool
""":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
can_change_info: bool
@ -39,7 +39,7 @@ class ChatMemberAdministrator(ChatMember):
can_invite_users: bool
""":code:`True`, if the user is allowed to invite new users to the chat"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
@ -49,7 +49,7 @@ class ChatMemberAdministrator(ChatMember):
can_edit_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only"""
can_delete_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can delete stories posted by other users"""
"""*Optional*. :code:`True`, if the administrator can delete stories posted by other users; channels 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

View file

@ -54,7 +54,7 @@ class Update(TelegramObject):
my_chat_member: Optional[ChatMemberUpdated] = None
"""*Optional*. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."""
chat_member: Optional[ChatMemberUpdated] = None
"""*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of *allowed_updates* to receive these updates."""
"""*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify :code:`"chat_member"` in the list of *allowed_updates* to receive these updates."""
chat_join_request: Optional[ChatJoinRequest] = None
"""*Optional*. A request to join the chat has been sent. The bot must have the *can_invite_users* administrator right in the chat to receive these updates."""