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

@ -29,7 +29,7 @@ class GetUpdates(TelegramMethod[List[Update]]):
timeout: Optional[int] = None
"""Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only."""
allowed_updates: Optional[List[str]] = None
"""A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used."""
"""A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -22,25 +22,31 @@ class PromoteChatMember(TelegramMethod[bool]):
is_anonymous: Optional[bool] = None
"""Pass :code:`True` if the administrator's presence in the chat is hidden"""
can_manage_chat: Optional[bool] = None
"""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"""
can_post_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can create channel posts, channels only"""
can_edit_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can edit messages of other users and can pin messages, channels only"""
"""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"""
can_delete_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can delete messages of other users"""
can_manage_video_chats: Optional[bool] = None
"""Pass :code:`True` if the administrator can manage video chats"""
can_restrict_members: Optional[bool] = None
"""Pass :code:`True` if the administrator can restrict, ban or unban chat members"""
"""Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics"""
can_promote_members: Optional[bool] = None
"""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)"""
can_change_info: Optional[bool] = None
"""Pass :code:`True` if the administrator can change chat title, photo and other settings"""
can_invite_users: Optional[bool] = None
"""Pass :code:`True` if the administrator can invite new users to the chat"""
can_post_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; channels only"""
can_edit_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can pin messages, supergroups only"""
can_post_stories: Optional[bool] = None
"""Pass :code:`True` if the administrator can post stories in the channel; channels only"""
can_edit_stories: Optional[bool] = None
"""Pass :code:`True` if the administrator can edit stories posted by other users; channels only"""
can_delete_stories: Optional[bool] = None
"""Pass :code:`True` if the administrator can delete stories posted by other users; channels 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"""
@ -55,15 +61,18 @@ class PromoteChatMember(TelegramMethod[bool]):
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,
**__pydantic_kwargs: Any,
) -> None:
@ -76,15 +85,18 @@ class PromoteChatMember(TelegramMethod[bool]):
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,
**__pydantic_kwargs,
)

View file

@ -35,7 +35,7 @@ class SetWebhook(TelegramMethod[bool]):
max_connections: Optional[int] = None
"""The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput."""
allowed_updates: Optional[List[str]] = None
"""A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used."""
"""A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used."""
drop_pending_updates: Optional[bool] = None
"""Pass :code:`True` to drop all pending updates"""
secret_token: Optional[str] = None