From 1ca1390bd2ffb657cba8d3f381bacbef51a49e74 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Thu, 3 Aug 2023 23:35:46 +0300 Subject: [PATCH] Generate init --- aiogram/methods/add_sticker_to_set.py | 20 +++ aiogram/methods/answer_callback_query.py | 29 +++- aiogram/methods/answer_inline_query.py | 58 ++++++- aiogram/methods/answer_pre_checkout_query.py | 25 ++- aiogram/methods/answer_shipping_query.py | 27 ++- aiogram/methods/answer_web_app_query.py | 40 ++++- aiogram/methods/approve_chat_join_request.py | 15 +- aiogram/methods/ban_chat_member.py | 27 ++- aiogram/methods/ban_chat_sender_chat.py | 19 ++- aiogram/methods/close_forum_topic.py | 21 ++- aiogram/methods/close_general_forum_topic.py | 15 +- aiogram/methods/copy_message.py | 45 ++++- aiogram/methods/create_chat_invite_link.py | 29 +++- aiogram/methods/create_forum_topic.py | 27 ++- aiogram/methods/create_invoice_link.py | 59 ++++++- aiogram/methods/create_new_sticker_set.py | 33 +++- aiogram/methods/decline_chat_join_request.py | 15 +- aiogram/methods/delete_chat_photo.py | 15 +- aiogram/methods/delete_chat_sticker_set.py | 15 +- aiogram/methods/delete_forum_topic.py | 21 ++- aiogram/methods/delete_message.py | 19 ++- aiogram/methods/delete_my_commands.py | 29 +++- aiogram/methods/delete_sticker_from_set.py | 13 ++ aiogram/methods/delete_sticker_set.py | 13 ++ aiogram/methods/delete_webhook.py | 18 +- aiogram/methods/edit_chat_invite_link.py | 31 +++- aiogram/methods/edit_forum_topic.py | 27 ++- aiogram/methods/edit_general_forum_topic.py | 15 +- aiogram/methods/edit_message_caption.py | 33 +++- aiogram/methods/edit_message_live_location.py | 37 +++- aiogram/methods/edit_message_media.py | 35 +++- aiogram/methods/edit_message_reply_markup.py | 27 ++- aiogram/methods/edit_message_text.py | 35 +++- aiogram/methods/export_chat_invite_link.py | 15 +- aiogram/methods/forward_message.py | 31 +++- aiogram/methods/get_chat.py | 15 +- aiogram/methods/get_chat_administrators.py | 15 +- aiogram/methods/get_chat_member.py | 15 +- aiogram/methods/get_chat_member_count.py | 15 +- aiogram/methods/get_chat_menu_button.py | 15 +- aiogram/methods/get_custom_emoji_stickers.py | 15 +- aiogram/methods/get_file.py | 13 ++ aiogram/methods/get_game_high_scores.py | 27 ++- aiogram/methods/get_my_commands.py | 29 +++- .../get_my_default_administrator_rights.py | 15 +- aiogram/methods/get_my_description.py | 15 +- aiogram/methods/get_my_name.py | 15 +- aiogram/methods/get_my_short_description.py | 15 +- aiogram/methods/get_sticker_set.py | 13 ++ aiogram/methods/get_updates.py | 27 ++- aiogram/methods/get_user_profile_photos.py | 20 ++- aiogram/methods/hide_general_forum_topic.py | 15 +- aiogram/methods/leave_chat.py | 15 +- aiogram/methods/pin_chat_message.py | 25 ++- aiogram/methods/promote_chat_member.py | 47 +++++- aiogram/methods/reopen_forum_topic.py | 21 ++- aiogram/methods/reopen_general_forum_topic.py | 15 +- aiogram/methods/restrict_chat_member.py | 29 +++- aiogram/methods/revoke_chat_invite_link.py | 19 ++- aiogram/methods/send_animation.py | 53 +++++- aiogram/methods/send_audio.py | 51 +++++- aiogram/methods/send_chat_action.py | 25 ++- aiogram/methods/send_contact.py | 43 ++++- aiogram/methods/send_dice.py | 37 +++- aiogram/methods/send_document.py | 47 +++++- aiogram/methods/send_game.py | 35 +++- aiogram/methods/send_invoice.py | 75 ++++++++- aiogram/methods/send_location.py | 47 +++++- aiogram/methods/send_media_group.py | 35 +++- aiogram/methods/send_message.py | 43 ++++- aiogram/methods/send_photo.py | 45 ++++- aiogram/methods/send_poll.py | 59 ++++++- aiogram/methods/send_sticker.py | 39 ++++- aiogram/methods/send_venue.py | 51 +++++- aiogram/methods/send_video.py | 55 +++++- aiogram/methods/send_video_note.py | 43 ++++- aiogram/methods/send_voice.py | 45 ++++- .../set_chat_administrator_custom_title.py | 22 ++- aiogram/methods/set_chat_description.py | 19 ++- aiogram/methods/set_chat_menu_button.py | 21 ++- aiogram/methods/set_chat_permissions.py | 25 ++- aiogram/methods/set_chat_photo.py | 19 ++- aiogram/methods/set_chat_sticker_set.py | 21 ++- aiogram/methods/set_chat_title.py | 15 +- .../set_custom_emoji_sticker_set_thumbnail.py | 19 ++- aiogram/methods/set_game_score.py | 33 +++- aiogram/methods/set_my_commands.py | 32 +++- .../set_my_default_administrator_rights.py | 19 ++- aiogram/methods/set_my_description.py | 21 ++- aiogram/methods/set_my_name.py | 19 ++- aiogram/methods/set_my_short_description.py | 23 ++- aiogram/methods/set_passport_data_errors.py | 31 +++- aiogram/methods/set_sticker_emoji_list.py | 15 +- aiogram/methods/set_sticker_keywords.py | 19 ++- aiogram/methods/set_sticker_mask_position.py | 19 ++- .../methods/set_sticker_position_in_set.py | 15 ++ aiogram/methods/set_sticker_set_thumbnail.py | 20 ++- aiogram/methods/set_sticker_set_title.py | 15 ++ aiogram/methods/set_webhook.py | 33 +++- aiogram/methods/stop_message_live_location.py | 27 ++- aiogram/methods/stop_poll.py | 25 ++- aiogram/methods/unban_chat_member.py | 25 ++- aiogram/methods/unban_chat_sender_chat.py | 19 ++- aiogram/methods/unhide_general_forum_topic.py | 15 +- aiogram/methods/unpin_all_chat_messages.py | 15 +- .../methods/unpin_all_forum_topic_messages.py | 21 ++- aiogram/methods/unpin_chat_message.py | 19 ++- aiogram/methods/upload_sticker_file.py | 25 +++ aiogram/types/animation.py | 37 +++- aiogram/types/audio.py | 37 +++- aiogram/types/bot_command.py | 15 ++ ...t_command_scope_all_chat_administrators.py | 20 ++- .../bot_command_scope_all_group_chats.py | 20 ++- .../bot_command_scope_all_private_chats.py | 20 ++- aiogram/types/bot_command_scope_chat.py | 19 ++- .../bot_command_scope_chat_administrators.py | 21 ++- .../types/bot_command_scope_chat_member.py | 20 ++- aiogram/types/bot_command_scope_default.py | 18 +- aiogram/types/bot_description.py | 13 ++ aiogram/types/bot_name.py | 13 ++ aiogram/types/bot_short_description.py | 15 ++ aiogram/types/callback_query.py | 31 ++++ aiogram/types/chat.py | 73 ++++++++ aiogram/types/chat_administrator_rights.py | 43 ++++- aiogram/types/chat_invite_link.py | 37 +++- aiogram/types/chat_join_request.py | 29 ++++ aiogram/types/chat_location.py | 15 +- aiogram/types/chat_member_administrator.py | 51 +++++- aiogram/types/chat_member_banned.py | 20 ++- aiogram/types/chat_member_left.py | 19 ++- aiogram/types/chat_member_member.py | 19 ++- aiogram/types/chat_member_owner.py | 27 ++- aiogram/types/chat_member_restricted.py | 55 +++++- aiogram/types/chat_member_updated.py | 45 +++++ aiogram/types/chat_permissions.py | 47 +++++- aiogram/types/chat_photo.py | 27 +++ aiogram/types/chat_shared.py | 15 ++ aiogram/types/chosen_inline_result.py | 29 +++- aiogram/types/contact.py | 29 +++- aiogram/types/dice.py | 15 ++ aiogram/types/document.py | 31 +++- aiogram/types/encrypted_credentials.py | 15 ++ aiogram/types/encrypted_passport_element.py | 39 ++++- aiogram/types/error_event.py | 7 + aiogram/types/file.py | 27 ++- aiogram/types/force_reply.py | 25 ++- aiogram/types/forum_topic.py | 27 ++- aiogram/types/forum_topic_created.py | 25 ++- aiogram/types/forum_topic_edited.py | 21 ++- aiogram/types/game.py | 31 +++- aiogram/types/game_high_score.py | 15 +- aiogram/types/inline_keyboard_button.py | 39 ++++- aiogram/types/inline_keyboard_markup.py | 18 +- aiogram/types/inline_query.py | 29 ++++ aiogram/types/inline_query_result_article.py | 47 +++++- aiogram/types/inline_query_result_audio.py | 49 +++++- .../types/inline_query_result_cached_audio.py | 43 ++++- .../inline_query_result_cached_document.py | 47 +++++- .../types/inline_query_result_cached_gif.py | 45 ++++- .../inline_query_result_cached_mpeg4_gif.py | 45 ++++- .../types/inline_query_result_cached_photo.py | 47 +++++- .../inline_query_result_cached_sticker.py | 37 +++- .../types/inline_query_result_cached_video.py | 47 +++++- .../types/inline_query_result_cached_voice.py | 45 ++++- aiogram/types/inline_query_result_contact.py | 49 +++++- aiogram/types/inline_query_result_document.py | 55 +++++- aiogram/types/inline_query_result_game.py | 27 ++- aiogram/types/inline_query_result_gif.py | 55 +++++- aiogram/types/inline_query_result_location.py | 55 +++++- .../types/inline_query_result_mpeg4_gif.py | 55 +++++- aiogram/types/inline_query_result_photo.py | 53 +++++- aiogram/types/inline_query_result_venue.py | 57 ++++++- aiogram/types/inline_query_result_video.py | 57 ++++++- aiogram/types/inline_query_result_voice.py | 47 +++++- aiogram/types/inline_query_results_button.py | 22 ++- .../types/input_contact_message_content.py | 27 ++- aiogram/types/input_file.py | 10 +- .../types/input_invoice_message_content.py | 59 ++++++- .../types/input_location_message_content.py | 31 +++- aiogram/types/input_media_animation.py | 39 ++++- aiogram/types/input_media_audio.py | 37 +++- aiogram/types/input_media_document.py | 33 +++- aiogram/types/input_media_photo.py | 31 +++- aiogram/types/input_media_video.py | 41 ++++- aiogram/types/input_sticker.py | 27 ++- aiogram/types/input_text_message_content.py | 27 ++- aiogram/types/input_venue_message_content.py | 35 +++- aiogram/types/invoice.py | 29 ++++ aiogram/types/keyboard_button.py | 33 +++- aiogram/types/keyboard_button_poll_type.py | 15 +- aiogram/types/keyboard_button_request_chat.py | 35 +++- aiogram/types/keyboard_button_request_user.py | 25 ++- aiogram/types/labeled_price.py | 15 ++ aiogram/types/location.py | 31 +++- aiogram/types/login_url.py | 27 ++- aiogram/types/mask_position.py | 23 +++ aiogram/types/menu_button.py | 20 ++- aiogram/types/menu_button_commands.py | 18 +- aiogram/types/menu_button_default.py | 18 +- aiogram/types/menu_button_web_app.py | 20 ++- aiogram/types/message.py | 159 ++++++++++++++++++ .../message_auto_delete_timer_changed.py | 17 ++ aiogram/types/message_entity.py | 33 +++- aiogram/types/message_id.py | 13 ++ aiogram/types/order_info.py | 27 ++- aiogram/types/passport_data.py | 19 ++- .../passport_element_error_data_field.py | 29 +++- aiogram/types/passport_element_error_file.py | 23 ++- aiogram/types/passport_element_error_files.py | 27 ++- .../passport_element_error_front_side.py | 25 ++- .../passport_element_error_reverse_side.py | 25 ++- .../types/passport_element_error_selfie.py | 23 ++- ...passport_element_error_translation_file.py | 25 ++- ...assport_element_error_translation_files.py | 29 +++- .../passport_element_error_unspecified.py | 29 +++- aiogram/types/passport_file.py | 27 +++ aiogram/types/photo_size.py | 29 +++- aiogram/types/poll.py | 45 ++++- aiogram/types/poll_answer.py | 22 ++- aiogram/types/poll_option.py | 15 ++ aiogram/types/pre_checkout_query.py | 33 +++- aiogram/types/proximity_alert_triggered.py | 22 ++- aiogram/types/reply_keyboard_markup.py | 31 +++- aiogram/types/reply_keyboard_remove.py | 21 ++- aiogram/types/response_parameters.py | 21 ++- aiogram/types/sent_web_app_message.py | 18 +- aiogram/types/shipping_address.py | 31 ++++ aiogram/types/shipping_option.py | 20 ++- aiogram/types/shipping_query.py | 27 ++- aiogram/types/sticker.py | 47 ++++++ aiogram/types/sticker_set.py | 33 +++- aiogram/types/successful_payment.py | 33 +++- .../types/switch_inline_query_chosen_chat.py | 29 +++- aiogram/types/update.py | 49 +++++- aiogram/types/user.py | 39 +++++ aiogram/types/user_profile_photos.py | 19 ++- aiogram/types/user_shared.py | 15 ++ aiogram/types/venue.py | 33 +++- aiogram/types/video.py | 37 +++- aiogram/types/video_chat_ended.py | 13 ++ .../types/video_chat_participants_invited.py | 13 +- aiogram/types/video_chat_scheduled.py | 14 ++ aiogram/types/video_note.py | 31 +++- aiogram/types/voice.py | 29 +++- aiogram/types/web_app_data.py | 15 ++ aiogram/types/web_app_info.py | 13 ++ aiogram/types/webhook_info.py | 37 +++- aiogram/types/write_access_allowed.py | 15 +- .../api/methods/answer_pre_checkout_query.rst | 6 + docs/api/methods/answer_shipping_query.rst | 6 + .../api/methods/edit_message_reply_markup.rst | 1 + pyproject.toml | 2 +- 252 files changed, 7000 insertions(+), 219 deletions(-) diff --git a/aiogram/methods/add_sticker_to_set.py b/aiogram/methods/add_sticker_to_set.py index 2c6502a5..b9ec036e 100644 --- a/aiogram/methods/add_sticker_to_set.py +++ b/aiogram/methods/add_sticker_to_set.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from ..types import InputSticker from .base import TelegramMethod @@ -20,3 +22,21 @@ class AddStickerToSet(TelegramMethod[bool]): """Sticker set name""" sticker: InputSticker """A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + name: str, + sticker: InputSticker, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(user_id=user_id, name=name, sticker=sticker, **__pydantic_kwargs) diff --git a/aiogram/methods/answer_callback_query.py b/aiogram/methods/answer_callback_query.py index 067c8b34..15ed1bf5 100644 --- a/aiogram/methods/answer_callback_query.py +++ b/aiogram/methods/answer_callback_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramMethod @@ -27,3 +27,30 @@ class AnswerCallbackQuery(TelegramMethod[bool]): """URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button.""" cache_time: Optional[int] = None """The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + callback_query_id: str, + text: Optional[str] = None, + show_alert: Optional[bool] = None, + url: Optional[str] = None, + cache_time: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + callback_query_id=callback_query_id, + text=text, + show_alert=show_alert, + url=url, + cache_time=cache_time, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_inline_query.py b/aiogram/methods/answer_inline_query.py index 70dc1169..acfb80ab 100644 --- a/aiogram/methods/answer_inline_query.py +++ b/aiogram/methods/answer_inline_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from pydantic import Field @@ -87,3 +87,59 @@ class AnswerInlineQuery(TelegramMethod[bool]): .. deprecated:: API:6.7 https://core.telegram.org/bots/api-changelog#april-21-2023""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + inline_query_id: str, + results: List[ + Union[ + InlineQueryResultCachedAudio, + InlineQueryResultCachedDocument, + InlineQueryResultCachedGif, + InlineQueryResultCachedMpeg4Gif, + InlineQueryResultCachedPhoto, + InlineQueryResultCachedSticker, + InlineQueryResultCachedVideo, + InlineQueryResultCachedVoice, + InlineQueryResultArticle, + InlineQueryResultAudio, + InlineQueryResultContact, + InlineQueryResultGame, + InlineQueryResultDocument, + InlineQueryResultGif, + InlineQueryResultLocation, + InlineQueryResultMpeg4Gif, + InlineQueryResultPhoto, + InlineQueryResultVenue, + InlineQueryResultVideo, + InlineQueryResultVoice, + ] + ], + cache_time: Optional[int] = None, + is_personal: Optional[bool] = None, + next_offset: Optional[str] = None, + button: Optional[InlineQueryResultsButton] = None, + switch_pm_parameter: Optional[str] = None, + switch_pm_text: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + inline_query_id=inline_query_id, + results=results, + cache_time=cache_time, + is_personal=is_personal, + next_offset=next_offset, + button=button, + switch_pm_parameter=switch_pm_parameter, + switch_pm_text=switch_pm_text, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_pre_checkout_query.py b/aiogram/methods/answer_pre_checkout_query.py index 8d1679cd..479d76c9 100644 --- a/aiogram/methods/answer_pre_checkout_query.py +++ b/aiogram/methods/answer_pre_checkout_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramMethod @@ -21,3 +21,26 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]): """Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems.""" error_message: Optional[str] = None """Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + pre_checkout_query_id: str, + ok: bool, + error_message: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + pre_checkout_query_id=pre_checkout_query_id, + ok=ok, + error_message=error_message, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_shipping_query.py b/aiogram/methods/answer_shipping_query.py index 81c1eaa6..ad0e9dc0 100644 --- a/aiogram/methods/answer_shipping_query.py +++ b/aiogram/methods/answer_shipping_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from ..types import ShippingOption from .base import TelegramMethod @@ -24,3 +24,28 @@ class AnswerShippingQuery(TelegramMethod[bool]): """Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.""" error_message: Optional[str] = None """Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + shipping_query_id: str, + ok: bool, + shipping_options: Optional[List[ShippingOption]] = None, + error_message: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + shipping_query_id=shipping_query_id, + ok=ok, + shipping_options=shipping_options, + error_message=error_message, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/answer_web_app_query.py b/aiogram/methods/answer_web_app_query.py index 23def3e4..4dc87ebd 100644 --- a/aiogram/methods/answer_web_app_query.py +++ b/aiogram/methods/answer_web_app_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from ..types import ( InlineQueryResultArticle, @@ -63,3 +63,41 @@ class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]): InlineQueryResultVoice, ] """A JSON-serialized object describing the message to be sent""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + web_app_query_id: str, + result: Union[ + InlineQueryResultCachedAudio, + InlineQueryResultCachedDocument, + InlineQueryResultCachedGif, + InlineQueryResultCachedMpeg4Gif, + InlineQueryResultCachedPhoto, + InlineQueryResultCachedSticker, + InlineQueryResultCachedVideo, + InlineQueryResultCachedVoice, + InlineQueryResultArticle, + InlineQueryResultAudio, + InlineQueryResultContact, + InlineQueryResultGame, + InlineQueryResultDocument, + InlineQueryResultGif, + InlineQueryResultLocation, + InlineQueryResultMpeg4Gif, + InlineQueryResultPhoto, + InlineQueryResultVenue, + InlineQueryResultVideo, + InlineQueryResultVoice, + ], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(web_app_query_id=web_app_query_id, result=result, **__pydantic_kwargs) diff --git a/aiogram/methods/approve_chat_join_request.py b/aiogram/methods/approve_chat_join_request.py index 4e4693f8..2f4995b4 100644 --- a/aiogram/methods/approve_chat_join_request.py +++ b/aiogram/methods/approve_chat_join_request.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,16 @@ class ApproveChatJoinRequest(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/methods/ban_chat_member.py b/aiogram/methods/ban_chat_member.py index f64791fd..bbfc9f75 100644 --- a/aiogram/methods/ban_chat_member.py +++ b/aiogram/methods/ban_chat_member.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -24,3 +24,28 @@ class BanChatMember(TelegramMethod[bool]): """Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.""" revoke_messages: Optional[bool] = None """Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + user_id: int, + until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + revoke_messages: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + user_id=user_id, + until_date=until_date, + revoke_messages=revoke_messages, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/ban_chat_sender_chat.py b/aiogram/methods/ban_chat_sender_chat.py index 50d51188..cbe61943 100644 --- a/aiogram/methods/ban_chat_sender_chat.py +++ b/aiogram/methods/ban_chat_sender_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,20 @@ class BanChatSenderChat(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sender_chat_id: int """Unique identifier of the target sender chat""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + sender_chat_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, sender_chat_id=sender_chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/close_forum_topic.py b/aiogram/methods/close_forum_topic.py index 3f9f50ea..110fbce7 100644 --- a/aiogram/methods/close_forum_topic.py +++ b/aiogram/methods/close_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,22 @@ class CloseForumTopic(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_thread_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/close_general_forum_topic.py b/aiogram/methods/close_general_forum_topic.py index 3c836177..3f1a6336 100644 --- a/aiogram/methods/close_general_forum_topic.py +++ b/aiogram/methods/close_general_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class CloseGeneralForumTopic(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/copy_message.py b/aiogram/methods/copy_message.py index 4fc4b5b9..b707580e 100644 --- a/aiogram/methods/copy_message.py +++ b/aiogram/methods/copy_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -51,3 +51,46 @@ class CopyMessage(TelegramMethod[MessageId]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + from_chat_id: Union[int, str], + message_id: int, + message_thread_id: Optional[int] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + from_chat_id=from_chat_id, + message_id=message_id, + message_thread_id=message_thread_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_chat_invite_link.py b/aiogram/methods/create_chat_invite_link.py index 1bdae992..ff0b3864 100644 --- a/aiogram/methods/create_chat_invite_link.py +++ b/aiogram/methods/create_chat_invite_link.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ChatInviteLink from .base import TelegramMethod @@ -27,3 +27,30 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" creates_join_request: Optional[bool] = None """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + name: Optional[str] = None, + expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + member_limit: Optional[int] = None, + creates_join_request: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_forum_topic.py b/aiogram/methods/create_forum_topic.py index ece98d43..8b0f6925 100644 --- a/aiogram/methods/create_forum_topic.py +++ b/aiogram/methods/create_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ForumTopic from .base import TelegramMethod @@ -24,3 +24,28 @@ class CreateForumTopic(TelegramMethod[ForumTopic]): """Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)""" icon_custom_emoji_id: Optional[str] = None """Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + name: str, + icon_color: Optional[int] = None, + icon_custom_emoji_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + name=name, + icon_color=icon_color, + icon_custom_emoji_id=icon_custom_emoji_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_invoice_link.py b/aiogram/methods/create_invoice_link.py index 8b6fc883..361ea31a 100644 --- a/aiogram/methods/create_invoice_link.py +++ b/aiogram/methods/create_invoice_link.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from ..types import LabeledPrice from .base import TelegramMethod @@ -56,3 +56,60 @@ class CreateInvoiceLink(TelegramMethod[str]): """Pass :code:`True` if the user's email address should be sent to the provider""" is_flexible: Optional[bool] = None """Pass :code:`True` if the final price depends on the shipping method""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + payload: str, + provider_token: str, + currency: str, + prices: List[LabeledPrice], + max_tip_amount: Optional[int] = None, + suggested_tip_amounts: Optional[List[int]] = None, + provider_data: Optional[str] = None, + photo_url: Optional[str] = None, + photo_size: Optional[int] = None, + photo_width: Optional[int] = None, + photo_height: Optional[int] = None, + need_name: Optional[bool] = None, + need_phone_number: Optional[bool] = None, + need_email: Optional[bool] = None, + need_shipping_address: Optional[bool] = None, + send_phone_number_to_provider: Optional[bool] = None, + send_email_to_provider: Optional[bool] = None, + is_flexible: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + title=title, + description=description, + payload=payload, + provider_token=provider_token, + currency=currency, + prices=prices, + max_tip_amount=max_tip_amount, + suggested_tip_amounts=suggested_tip_amounts, + provider_data=provider_data, + photo_url=photo_url, + photo_size=photo_size, + photo_width=photo_width, + photo_height=photo_height, + need_name=need_name, + need_phone_number=need_phone_number, + need_email=need_email, + need_shipping_address=need_shipping_address, + send_phone_number_to_provider=send_phone_number_to_provider, + send_email_to_provider=send_email_to_provider, + is_flexible=is_flexible, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_new_sticker_set.py b/aiogram/methods/create_new_sticker_set.py index abf25d79..92388bd5 100644 --- a/aiogram/methods/create_new_sticker_set.py +++ b/aiogram/methods/create_new_sticker_set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from ..types import InputSticker from .base import TelegramMethod @@ -30,3 +30,34 @@ class CreateNewStickerSet(TelegramMethod[bool]): """Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.""" needs_repainting: Optional[bool] = None """Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + name: str, + title: str, + stickers: List[InputSticker], + sticker_format: str, + sticker_type: Optional[str] = None, + needs_repainting: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + name=name, + title=title, + stickers=stickers, + sticker_format=sticker_format, + sticker_type=sticker_type, + needs_repainting=needs_repainting, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/decline_chat_join_request.py b/aiogram/methods/decline_chat_join_request.py index 0334c299..b0fa2c3c 100644 --- a/aiogram/methods/decline_chat_join_request.py +++ b/aiogram/methods/decline_chat_join_request.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,16 @@ class DeclineChatJoinRequest(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_chat_photo.py b/aiogram/methods/delete_chat_photo.py index e146cdac..503ace2c 100644 --- a/aiogram/methods/delete_chat_photo.py +++ b/aiogram/methods/delete_chat_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class DeleteChatPhoto(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_chat_sticker_set.py b/aiogram/methods/delete_chat_sticker_set.py index 2162f860..50d705f0 100644 --- a/aiogram/methods/delete_chat_sticker_set.py +++ b/aiogram/methods/delete_chat_sticker_set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class DeleteChatStickerSet(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_forum_topic.py b/aiogram/methods/delete_forum_topic.py index 1e4f9b46..7d238562 100644 --- a/aiogram/methods/delete_forum_topic.py +++ b/aiogram/methods/delete_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,22 @@ class DeleteForumTopic(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_thread_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/delete_message.py b/aiogram/methods/delete_message.py index 99c972d7..59aee049 100644 --- a/aiogram/methods/delete_message.py +++ b/aiogram/methods/delete_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -37,3 +37,20 @@ class DeleteMessage(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: int """Identifier of the message to delete""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, message_id=message_id, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_my_commands.py b/aiogram/methods/delete_my_commands.py index cd91b7e7..e35ef67c 100644 --- a/aiogram/methods/delete_my_commands.py +++ b/aiogram/methods/delete_my_commands.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( BotCommandScopeAllChatAdministrators, @@ -38,3 +38,30 @@ class DeleteMyCommands(TelegramMethod[bool]): """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + scope: Optional[ + Union[ + BotCommandScopeDefault, + BotCommandScopeAllPrivateChats, + BotCommandScopeAllGroupChats, + BotCommandScopeAllChatAdministrators, + BotCommandScopeChat, + BotCommandScopeChatAdministrators, + BotCommandScopeChatMember, + ] + ] = None, + language_code: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(scope=scope, language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_sticker_from_set.py b/aiogram/methods/delete_sticker_from_set.py index 1ab3e3a8..6aae72b7 100644 --- a/aiogram/methods/delete_sticker_from_set.py +++ b/aiogram/methods/delete_sticker_from_set.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramMethod @@ -15,3 +17,14 @@ class DeleteStickerFromSet(TelegramMethod[bool]): sticker: str """File identifier of the sticker""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, sticker: str, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(sticker=sticker, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_sticker_set.py b/aiogram/methods/delete_sticker_set.py index 27b4cfc2..519c5db1 100644 --- a/aiogram/methods/delete_sticker_set.py +++ b/aiogram/methods/delete_sticker_set.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramMethod @@ -15,3 +17,14 @@ class DeleteStickerSet(TelegramMethod[bool]): name: str """Sticker set name""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(name=name, **__pydantic_kwargs) diff --git a/aiogram/methods/delete_webhook.py b/aiogram/methods/delete_webhook.py index ef1bdc88..05c39f4e 100644 --- a/aiogram/methods/delete_webhook.py +++ b/aiogram/methods/delete_webhook.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramMethod @@ -17,3 +17,19 @@ class DeleteWebhook(TelegramMethod[bool]): drop_pending_updates: Optional[bool] = None """Pass :code:`True` to drop all pending updates""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + drop_pending_updates: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(drop_pending_updates=drop_pending_updates, **__pydantic_kwargs) diff --git a/aiogram/methods/edit_chat_invite_link.py b/aiogram/methods/edit_chat_invite_link.py index f94111ed..8ec86cab 100644 --- a/aiogram/methods/edit_chat_invite_link.py +++ b/aiogram/methods/edit_chat_invite_link.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ChatInviteLink from .base import TelegramMethod @@ -29,3 +29,32 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]): """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" creates_join_request: Optional[bool] = None """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + invite_link: str, + name: Optional[str] = None, + expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + member_limit: Optional[int] = None, + creates_join_request: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + invite_link=invite_link, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py index 46ef0e58..f0afb354 100644 --- a/aiogram/methods/edit_forum_topic.py +++ b/aiogram/methods/edit_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -23,3 +23,28 @@ class EditForumTopic(TelegramMethod[bool]): """New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept""" icon_custom_emoji_id: Optional[str] = None """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_thread_id: int, + name: Optional[str] = None, + icon_custom_emoji_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + message_thread_id=message_thread_id, + name=name, + icon_custom_emoji_id=icon_custom_emoji_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_general_forum_topic.py b/aiogram/methods/edit_general_forum_topic.py index 1de088cf..fe5acadf 100644 --- a/aiogram/methods/edit_general_forum_topic.py +++ b/aiogram/methods/edit_general_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,16 @@ class EditGeneralForumTopic(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" name: str """New topic name, 1-128 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], name: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, name=name, **__pydantic_kwargs) diff --git a/aiogram/methods/edit_message_caption.py b/aiogram/methods/edit_message_caption.py index ee2f8482..4c15e6d8 100644 --- a/aiogram/methods/edit_message_caption.py +++ b/aiogram/methods/edit_message_caption.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity from .base import TelegramMethod @@ -30,3 +30,34 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]): """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_live_location.py b/aiogram/methods/edit_message_live_location.py index 43ff24e7..44406203 100644 --- a/aiogram/methods/edit_message_live_location.py +++ b/aiogram/methods/edit_message_live_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import InlineKeyboardMarkup, Message from .base import TelegramMethod @@ -34,3 +34,38 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): """The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new `inline keyboard `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + latitude: float, + longitude: float, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + horizontal_accuracy: Optional[float] = None, + heading: Optional[int] = None, + proximity_alert_radius: Optional[int] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + latitude=latitude, + longitude=longitude, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + horizontal_accuracy=horizontal_accuracy, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_media.py b/aiogram/methods/edit_message_media.py index 5d006146..a354de03 100644 --- a/aiogram/methods/edit_message_media.py +++ b/aiogram/methods/edit_message_media.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( InlineKeyboardMarkup, @@ -36,3 +36,36 @@ class EditMessageMedia(TelegramMethod[Union[Message, bool]]): """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new `inline keyboard `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + media: Union[ + InputMediaAnimation, + InputMediaDocument, + InputMediaAudio, + InputMediaPhoto, + InputMediaVideo, + ], + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + media=media, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_reply_markup.py b/aiogram/methods/edit_message_reply_markup.py index 7c8be63f..bc957a14 100644 --- a/aiogram/methods/edit_message_reply_markup.py +++ b/aiogram/methods/edit_message_reply_markup.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import InlineKeyboardMarkup, Message from .base import TelegramMethod @@ -24,3 +24,28 @@ class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]): """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_text.py b/aiogram/methods/edit_message_text.py index 357a757b..c795e0f2 100644 --- a/aiogram/methods/edit_message_text.py +++ b/aiogram/methods/edit_message_text.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity from ..types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW @@ -33,3 +33,36 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]): """Disables link previews for links in this message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + entities: Optional[List[MessageEntity]] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + text=text, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + parse_mode=parse_mode, + entities=entities, + disable_web_page_preview=disable_web_page_preview, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/export_chat_invite_link.py b/aiogram/methods/export_chat_invite_link.py index 61642387..271e35d1 100644 --- a/aiogram/methods/export_chat_invite_link.py +++ b/aiogram/methods/export_chat_invite_link.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,16 @@ class ExportChatInviteLink(TelegramMethod[str]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/forward_message.py b/aiogram/methods/forward_message.py index 86d33f8d..a0eeb79f 100644 --- a/aiogram/methods/forward_message.py +++ b/aiogram/methods/forward_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import Message from ..types.base import UNSET_PROTECT_CONTENT @@ -29,3 +29,32 @@ class ForwardMessage(TelegramMethod[Message]): """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the forwarded message from forwarding and saving""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + from_chat_id: Union[int, str], + message_id: int, + message_thread_id: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + from_chat_id=from_chat_id, + message_id=message_id, + message_thread_id=message_thread_id, + disable_notification=disable_notification, + protect_content=protect_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_chat.py b/aiogram/methods/get_chat.py index d0416238..d835aa55 100644 --- a/aiogram/methods/get_chat.py +++ b/aiogram/methods/get_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from ..types import Chat from .base import TelegramMethod @@ -18,3 +18,16 @@ class GetChat(TelegramMethod[Chat]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_chat_administrators.py b/aiogram/methods/get_chat_administrators.py index b6479ec8..99e403e2 100644 --- a/aiogram/methods/get_chat_administrators.py +++ b/aiogram/methods/get_chat_administrators.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Union +from typing import TYPE_CHECKING, Any, List, Union from ..types import ( ChatMemberAdministrator, @@ -47,3 +47,16 @@ class GetChatAdministrators( chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_chat_member.py b/aiogram/methods/get_chat_member.py index 9e8ba619..495f6287 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from ..types import ( ChatMemberAdministrator, @@ -45,3 +45,16 @@ class GetChatMember( """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_chat_member_count.py b/aiogram/methods/get_chat_member_count.py index a411d0c9..fc33c23f 100644 --- a/aiogram/methods/get_chat_member_count.py +++ b/aiogram/methods/get_chat_member_count.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class GetChatMemberCount(TelegramMethod[int]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_chat_menu_button.py b/aiogram/methods/get_chat_menu_button.py index df280b66..ee1248d0 100644 --- a/aiogram/methods/get_chat_menu_button.py +++ b/aiogram/methods/get_chat_menu_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp from .base import TelegramMethod @@ -20,3 +20,16 @@ class GetChatMenuButton( chat_id: Optional[int] = None """Unique identifier for the target private chat. If not specified, default bot's menu button will be returned""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Optional[int] = None, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_custom_emoji_stickers.py b/aiogram/methods/get_custom_emoji_stickers.py index a98582d9..5aeff72f 100644 --- a/aiogram/methods/get_custom_emoji_stickers.py +++ b/aiogram/methods/get_custom_emoji_stickers.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List +from typing import TYPE_CHECKING, Any, List from ..types import Sticker from .base import TelegramMethod @@ -18,3 +18,16 @@ class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]): custom_emoji_ids: List[str] """List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, custom_emoji_ids: List[str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(custom_emoji_ids=custom_emoji_ids, **__pydantic_kwargs) diff --git a/aiogram/methods/get_file.py b/aiogram/methods/get_file.py index 8358e250..c96ff311 100644 --- a/aiogram/methods/get_file.py +++ b/aiogram/methods/get_file.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from ..types import File from .base import TelegramMethod @@ -17,3 +19,14 @@ class GetFile(TelegramMethod[File]): file_id: str """File identifier to get information about""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, file_id: str, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(file_id=file_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_game_high_scores.py b/aiogram/methods/get_game_high_scores.py index 1251658c..cac9d61a 100644 --- a/aiogram/methods/get_game_high_scores.py +++ b/aiogram/methods/get_game_high_scores.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from ..types import GameHighScore from .base import TelegramMethod @@ -26,3 +26,28 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]): """Required if *inline_message_id* is not specified. Identifier of the sent message""" inline_message_id: Optional[str] = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + chat_id: Optional[int] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_my_commands.py b/aiogram/methods/get_my_commands.py index 4be74e21..b3386b66 100644 --- a/aiogram/methods/get_my_commands.py +++ b/aiogram/methods/get_my_commands.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( BotCommand, @@ -39,3 +39,30 @@ class GetMyCommands(TelegramMethod[List[BotCommand]]): """A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code or an empty string""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + scope: Optional[ + Union[ + BotCommandScopeDefault, + BotCommandScopeAllPrivateChats, + BotCommandScopeAllGroupChats, + BotCommandScopeAllChatAdministrators, + BotCommandScopeChat, + BotCommandScopeChatAdministrators, + BotCommandScopeChatMember, + ] + ] = None, + language_code: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(scope=scope, language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_default_administrator_rights.py b/aiogram/methods/get_my_default_administrator_rights.py index 1c7c0195..4f9ad9a6 100644 --- a/aiogram/methods/get_my_default_administrator_rights.py +++ b/aiogram/methods/get_my_default_administrator_rights.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import ChatAdministratorRights from .base import TelegramMethod @@ -18,3 +18,16 @@ class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]): for_channels: Optional[bool] = None """Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, for_channels: Optional[bool] = None, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(for_channels=for_channels, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_description.py b/aiogram/methods/get_my_description.py index db002daa..f967faf6 100644 --- a/aiogram/methods/get_my_description.py +++ b/aiogram/methods/get_my_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import BotDescription from .base import TelegramMethod @@ -18,3 +18,16 @@ class GetMyDescription(TelegramMethod[BotDescription]): language_code: Optional[str] = None """A two-letter ISO 639-1 language code or an empty string""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_name.py b/aiogram/methods/get_my_name.py index 202b21ff..909ac3f6 100644 --- a/aiogram/methods/get_my_name.py +++ b/aiogram/methods/get_my_name.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import BotName from .base import TelegramMethod @@ -16,3 +16,16 @@ class GetMyName(TelegramMethod[BotName]): language_code: Optional[str] = None """A two-letter ISO 639-1 language code or an empty string""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_short_description.py b/aiogram/methods/get_my_short_description.py index 962642e4..a9a56669 100644 --- a/aiogram/methods/get_my_short_description.py +++ b/aiogram/methods/get_my_short_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import BotShortDescription from .base import TelegramMethod @@ -18,3 +18,16 @@ class GetMyShortDescription(TelegramMethod[BotShortDescription]): language_code: Optional[str] = None """A two-letter ISO 639-1 language code or an empty string""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/get_sticker_set.py b/aiogram/methods/get_sticker_set.py index 43ab5311..2700e172 100644 --- a/aiogram/methods/get_sticker_set.py +++ b/aiogram/methods/get_sticker_set.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from ..types import StickerSet from .base import TelegramMethod @@ -16,3 +18,14 @@ class GetStickerSet(TelegramMethod[StickerSet]): name: str """Name of the sticker set""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(name=name, **__pydantic_kwargs) diff --git a/aiogram/methods/get_updates.py b/aiogram/methods/get_updates.py index 80abf78c..5c28aea3 100644 --- a/aiogram/methods/get_updates.py +++ b/aiogram/methods/get_updates.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from ..types import Update from .base import TelegramMethod @@ -30,3 +30,28 @@ class GetUpdates(TelegramMethod[List[Update]]): """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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + offset: Optional[int] = None, + limit: Optional[int] = None, + timeout: Optional[int] = None, + allowed_updates: Optional[List[str]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + offset=offset, + limit=limit, + timeout=timeout, + allowed_updates=allowed_updates, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_user_profile_photos.py b/aiogram/methods/get_user_profile_photos.py index e58bd970..488885e1 100644 --- a/aiogram/methods/get_user_profile_photos.py +++ b/aiogram/methods/get_user_profile_photos.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import UserProfilePhotos from .base import TelegramMethod @@ -22,3 +22,21 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): """Sequential number of the first photo to be returned. By default, all photos are returned.""" limit: Optional[int] = None """Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + offset: Optional[int] = None, + limit: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(user_id=user_id, offset=offset, limit=limit, **__pydantic_kwargs) diff --git a/aiogram/methods/hide_general_forum_topic.py b/aiogram/methods/hide_general_forum_topic.py index 25e6421b..a3b6ee3f 100644 --- a/aiogram/methods/hide_general_forum_topic.py +++ b/aiogram/methods/hide_general_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class HideGeneralForumTopic(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/leave_chat.py b/aiogram/methods/leave_chat.py index f1784f65..f9d43128 100644 --- a/aiogram/methods/leave_chat.py +++ b/aiogram/methods/leave_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class LeaveChat(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/pin_chat_message.py b/aiogram/methods/pin_chat_message.py index 24e7a7c1..fe99cc25 100644 --- a/aiogram/methods/pin_chat_message.py +++ b/aiogram/methods/pin_chat_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -21,3 +21,26 @@ class PinChatMessage(TelegramMethod[bool]): """Identifier of a message to pin""" disable_notification: Optional[bool] = None """Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_id: int, + disable_notification: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + message_id=message_id, + disable_notification=disable_notification, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index c74d1de9..4f9377d3 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -43,3 +43,48 @@ class PromoteChatMember(TelegramMethod[bool]): """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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + 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_pin_messages: Optional[bool] = None, + can_manage_topics: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + 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_pin_messages=can_pin_messages, + can_manage_topics=can_manage_topics, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/reopen_forum_topic.py b/aiogram/methods/reopen_forum_topic.py index 729db37c..45eb18d0 100644 --- a/aiogram/methods/reopen_forum_topic.py +++ b/aiogram/methods/reopen_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,22 @@ class ReopenForumTopic(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_thread_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/reopen_general_forum_topic.py b/aiogram/methods/reopen_general_forum_topic.py index ea3a4a47..a6dc04e0 100644 --- a/aiogram/methods/reopen_general_forum_topic.py +++ b/aiogram/methods/reopen_general_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class ReopenGeneralForumTopic(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/restrict_chat_member.py b/aiogram/methods/restrict_chat_member.py index 9240ea60..331e95f7 100644 --- a/aiogram/methods/restrict_chat_member.py +++ b/aiogram/methods/restrict_chat_member.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ChatPermissions from .base import TelegramMethod @@ -27,3 +27,30 @@ class RestrictChatMember(TelegramMethod[bool]): """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + user_id: int, + permissions: ChatPermissions, + use_independent_chat_permissions: Optional[bool] = None, + until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + user_id=user_id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + until_date=until_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/revoke_chat_invite_link.py b/aiogram/methods/revoke_chat_invite_link.py index e7d9c50e..414feb30 100644 --- a/aiogram/methods/revoke_chat_invite_link.py +++ b/aiogram/methods/revoke_chat_invite_link.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from ..types import ChatInviteLink from .base import TelegramMethod @@ -20,3 +20,20 @@ class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): """Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)""" invite_link: str """The invite link to revoke""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + invite_link: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, invite_link=invite_link, **__pydantic_kwargs) diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 088ce252..e803b0b1 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -60,3 +60,54 @@ class SendAnimation(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + animation: Union[InputFile, str], + message_thread_id: Optional[int] = None, + duration: Optional[int] = None, + width: Optional[int] = None, + height: Optional[int] = None, + thumbnail: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + animation=animation, + message_thread_id=message_thread_id, + duration=duration, + width=width, + height=height, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + has_spoiler=has_spoiler, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py index e947cbde..fd6404cb 100644 --- a/aiogram/methods/send_audio.py +++ b/aiogram/methods/send_audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -59,3 +59,52 @@ class SendAudio(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + audio: Union[InputFile, str], + message_thread_id: Optional[int] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + duration: Optional[int] = None, + performer: Optional[str] = None, + title: Optional[str] = None, + thumbnail: Optional[Union[InputFile, str]] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + audio=audio, + message_thread_id=message_thread_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + duration=duration, + performer=performer, + title=title, + thumbnail=thumbnail, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_chat_action.py b/aiogram/methods/send_chat_action.py index 009fea09..8b936ab7 100644 --- a/aiogram/methods/send_chat_action.py +++ b/aiogram/methods/send_chat_action.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -25,3 +25,26 @@ class SendChatAction(TelegramMethod[bool]): """Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.""" message_thread_id: Optional[int] = None """Unique identifier for the target message thread; supergroups only""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + action: str, + message_thread_id: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + action=action, + message_thread_id=message_thread_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_contact.py b/aiogram/methods/send_contact.py index d0454674..0053b1ea 100644 --- a/aiogram/methods/send_contact.py +++ b/aiogram/methods/send_contact.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( ForceReply, @@ -47,3 +47,44 @@ class SendContact(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + phone_number: str, + first_name: str, + message_thread_id: Optional[int] = None, + last_name: Optional[str] = None, + vcard: Optional[str] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + phone_number=phone_number, + first_name=first_name, + message_thread_id=message_thread_id, + last_name=last_name, + vcard=vcard, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py index bc58d53a..a06442d5 100644 --- a/aiogram/methods/send_dice.py +++ b/aiogram/methods/send_dice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( ForceReply, @@ -41,3 +41,38 @@ class SendDice(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_thread_id: Optional[int] = None, + emoji: Optional[str] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + message_thread_id=message_thread_id, + emoji=emoji, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py index cacb62a5..d7ac0e20 100644 --- a/aiogram/methods/send_document.py +++ b/aiogram/methods/send_document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -54,3 +54,48 @@ class SendDocument(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + document: Union[InputFile, str], + message_thread_id: Optional[int] = None, + thumbnail: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + disable_content_type_detection: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + document=document, + message_thread_id=message_thread_id, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + disable_content_type_detection=disable_content_type_detection, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_game.py b/aiogram/methods/send_game.py index f713d6a6..e7d0e667 100644 --- a/aiogram/methods/send_game.py +++ b/aiogram/methods/send_game.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import InlineKeyboardMarkup, Message from ..types.base import UNSET_PROTECT_CONTENT @@ -33,3 +33,36 @@ class SendGame(TelegramMethod[Message]): """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: int, + game_short_name: str, + message_thread_id: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + game_short_name=game_short_name, + message_thread_id=message_thread_id, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_invoice.py b/aiogram/methods/send_invoice.py index aca8aa71..71bed6df 100644 --- a/aiogram/methods/send_invoice.py +++ b/aiogram/methods/send_invoice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import InlineKeyboardMarkup, LabeledPrice, Message from ..types.base import UNSET_PROTECT_CONTENT @@ -73,3 +73,76 @@ class SendInvoice(TelegramMethod[Message]): """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + title: str, + description: str, + payload: str, + provider_token: str, + currency: str, + prices: List[LabeledPrice], + message_thread_id: Optional[int] = None, + max_tip_amount: Optional[int] = None, + suggested_tip_amounts: Optional[List[int]] = None, + start_parameter: Optional[str] = None, + provider_data: Optional[str] = None, + photo_url: Optional[str] = None, + photo_size: Optional[int] = None, + photo_width: Optional[int] = None, + photo_height: Optional[int] = None, + need_name: Optional[bool] = None, + need_phone_number: Optional[bool] = None, + need_email: Optional[bool] = None, + need_shipping_address: Optional[bool] = None, + send_phone_number_to_provider: Optional[bool] = None, + send_email_to_provider: Optional[bool] = None, + is_flexible: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + title=title, + description=description, + payload=payload, + provider_token=provider_token, + currency=currency, + prices=prices, + message_thread_id=message_thread_id, + max_tip_amount=max_tip_amount, + suggested_tip_amounts=suggested_tip_amounts, + start_parameter=start_parameter, + provider_data=provider_data, + photo_url=photo_url, + photo_size=photo_size, + photo_width=photo_width, + photo_height=photo_height, + need_name=need_name, + need_phone_number=need_phone_number, + need_email=need_email, + need_shipping_address=need_shipping_address, + send_phone_number_to_provider=send_phone_number_to_provider, + send_email_to_provider=send_email_to_provider, + is_flexible=is_flexible, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_location.py b/aiogram/methods/send_location.py index ddfb3604..4eac028c 100644 --- a/aiogram/methods/send_location.py +++ b/aiogram/methods/send_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( ForceReply, @@ -51,3 +51,48 @@ class SendLocation(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + latitude: float, + longitude: float, + message_thread_id: Optional[int] = None, + horizontal_accuracy: Optional[float] = None, + live_period: Optional[int] = None, + heading: Optional[int] = None, + proximity_alert_radius: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + latitude=latitude, + longitude=longitude, + message_thread_id=message_thread_id, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_media_group.py b/aiogram/methods/send_media_group.py index a01e4de8..3fa31852 100644 --- a/aiogram/methods/send_media_group.py +++ b/aiogram/methods/send_media_group.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( InputMediaAudio, @@ -37,3 +37,36 @@ class SendMediaGroup(TelegramMethod[List[Message]]): """If the messages are a reply, ID of the original message""" allow_sending_without_reply: Optional[bool] = None """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + media: List[ + Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo] + ], + message_thread_id: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + media=media, + message_thread_id=message_thread_id, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_message.py b/aiogram/methods/send_message.py index 1e460239..8e33687c 100644 --- a/aiogram/methods/send_message.py +++ b/aiogram/methods/send_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -49,3 +49,44 @@ class SendMessage(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + text: str, + message_thread_id: Optional[int] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + entities: Optional[List[MessageEntity]] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + text=text, + message_thread_id=message_thread_id, + parse_mode=parse_mode, + entities=entities, + disable_web_page_preview=disable_web_page_preview, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py index 6ce9d928..521b2b70 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -52,3 +52,46 @@ class SendPhoto(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + photo: Union[InputFile, str], + message_thread_id: Optional[int] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + photo=photo, + message_thread_id=message_thread_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + has_spoiler=has_spoiler, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_poll.py b/aiogram/methods/send_poll.py index 41d7e4c5..f67ca805 100644 --- a/aiogram/methods/send_poll.py +++ b/aiogram/methods/send_poll.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -66,3 +66,60 @@ class SendPoll(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + question: str, + options: List[str], + message_thread_id: Optional[int] = None, + is_anonymous: Optional[bool] = None, + type: Optional[str] = None, + allows_multiple_answers: Optional[bool] = None, + correct_option_id: Optional[int] = None, + explanation: Optional[str] = None, + explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE, + explanation_entities: Optional[List[MessageEntity]] = None, + open_period: Optional[int] = None, + close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + is_closed: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + question=question, + options=options, + message_thread_id=message_thread_id, + is_anonymous=is_anonymous, + type=type, + allows_multiple_answers=allows_multiple_answers, + correct_option_id=correct_option_id, + explanation=explanation, + explanation_parse_mode=explanation_parse_mode, + explanation_entities=explanation_entities, + open_period=open_period, + close_date=close_date, + is_closed=is_closed, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py index 384a5adb..6e270024 100644 --- a/aiogram/methods/send_sticker.py +++ b/aiogram/methods/send_sticker.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( ForceReply, @@ -44,3 +44,40 @@ class SendSticker(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + sticker: Union[InputFile, str], + message_thread_id: Optional[int] = None, + emoji: Optional[str] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + sticker=sticker, + message_thread_id=message_thread_id, + emoji=emoji, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_venue.py b/aiogram/methods/send_venue.py index ac69fdc6..85137d42 100644 --- a/aiogram/methods/send_venue.py +++ b/aiogram/methods/send_venue.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( ForceReply, @@ -55,3 +55,52 @@ class SendVenue(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + latitude: float, + longitude: float, + title: str, + address: str, + message_thread_id: Optional[int] = None, + foursquare_id: Optional[str] = None, + foursquare_type: Optional[str] = None, + google_place_id: Optional[str] = None, + google_place_type: Optional[str] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + latitude=latitude, + longitude=longitude, + title=title, + address=address, + message_thread_id=message_thread_id, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py index 1ee7c903..c61a8c92 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -62,3 +62,56 @@ class SendVideo(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + video: Union[InputFile, str], + message_thread_id: Optional[int] = None, + duration: Optional[int] = None, + width: Optional[int] = None, + height: Optional[int] = None, + thumbnail: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, + supports_streaming: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + video=video, + message_thread_id=message_thread_id, + duration=duration, + width=width, + height=height, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + has_spoiler=has_spoiler, + supports_streaming=supports_streaming, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py index cd270e94..235134dd 100644 --- a/aiogram/methods/send_video_note.py +++ b/aiogram/methods/send_video_note.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ( ForceReply, @@ -48,3 +48,44 @@ class SendVideoNote(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + video_note: Union[InputFile, str], + message_thread_id: Optional[int] = None, + duration: Optional[int] = None, + length: Optional[int] = None, + thumbnail: Optional[Union[InputFile, str]] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + video_note=video_note, + message_thread_id=message_thread_id, + duration=duration, + length=length, + thumbnail=thumbnail, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_voice.py b/aiogram/methods/send_voice.py index d9c915f4..24fd86e2 100644 --- a/aiogram/methods/send_voice.py +++ b/aiogram/methods/send_voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( UNSET_PARSE_MODE, @@ -52,3 +52,46 @@ class SendVoice(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + voice: Union[InputFile, str], + message_thread_id: Optional[int] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + duration: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + voice=voice, + message_thread_id=message_thread_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + duration=duration, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_chat_administrator_custom_title.py b/aiogram/methods/set_chat_administrator_custom_title.py index 5415594f..a7953c12 100644 --- a/aiogram/methods/set_chat_administrator_custom_title.py +++ b/aiogram/methods/set_chat_administrator_custom_title.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -21,3 +21,23 @@ class SetChatAdministratorCustomTitle(TelegramMethod[bool]): """Unique identifier of the target user""" custom_title: str """New custom title for the administrator; 0-16 characters, emoji are not allowed""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + user_id: int, + custom_title: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, user_id=user_id, custom_title=custom_title, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_chat_description.py b/aiogram/methods/set_chat_description.py index 81eaf263..0f8a4a4b 100644 --- a/aiogram/methods/set_chat_description.py +++ b/aiogram/methods/set_chat_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -19,3 +19,20 @@ class SetChatDescription(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" description: Optional[str] = None """New chat description, 0-255 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + description: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, description=description, **__pydantic_kwargs) diff --git a/aiogram/methods/set_chat_menu_button.py b/aiogram/methods/set_chat_menu_button.py index 9cbd019b..97515d5a 100644 --- a/aiogram/methods/set_chat_menu_button.py +++ b/aiogram/methods/set_chat_menu_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp from .base import TelegramMethod @@ -20,3 +20,22 @@ class SetChatMenuButton(TelegramMethod[bool]): """Unique identifier for the target private chat. If not specified, default bot's menu button will be changed""" menu_button: Optional[Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault]] = None """A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Optional[int] = None, + menu_button: Optional[ + Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, menu_button=menu_button, **__pydantic_kwargs) diff --git a/aiogram/methods/set_chat_permissions.py b/aiogram/methods/set_chat_permissions.py index 3c3ed008..232af08c 100644 --- a/aiogram/methods/set_chat_permissions.py +++ b/aiogram/methods/set_chat_permissions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import ChatPermissions from .base import TelegramMethod @@ -22,3 +22,26 @@ class SetChatPermissions(TelegramMethod[bool]): """A JSON-serialized object for new default chat permissions""" use_independent_chat_permissions: Optional[bool] = None """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + permissions: ChatPermissions, + use_independent_chat_permissions: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_chat_photo.py b/aiogram/methods/set_chat_photo.py index dc07a445..105f8f87 100644 --- a/aiogram/methods/set_chat_photo.py +++ b/aiogram/methods/set_chat_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from ..types import InputFile from .base import TelegramMethod @@ -20,3 +20,20 @@ class SetChatPhoto(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" photo: InputFile """New chat photo, uploaded using multipart/form-data""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + photo: InputFile, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, photo=photo, **__pydantic_kwargs) diff --git a/aiogram/methods/set_chat_sticker_set.py b/aiogram/methods/set_chat_sticker_set.py index 6df42a0a..62ed5d18 100644 --- a/aiogram/methods/set_chat_sticker_set.py +++ b/aiogram/methods/set_chat_sticker_set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,22 @@ class SetChatStickerSet(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" sticker_set_name: str """Name of the sticker set to be set as the group sticker set""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + sticker_set_name: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, sticker_set_name=sticker_set_name, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_chat_title.py b/aiogram/methods/set_chat_title.py index b4ce0a4a..04b52e09 100644 --- a/aiogram/methods/set_chat_title.py +++ b/aiogram/methods/set_chat_title.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,16 @@ class SetChatTitle(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" title: str """New chat title, 1-128 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], title: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, title=title, **__pydantic_kwargs) diff --git a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py index 8c8fa479..47e9c033 100644 --- a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py +++ b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramMethod @@ -19,3 +19,20 @@ class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): """Sticker set name""" custom_emoji_id: Optional[str] = None """Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + custom_emoji_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(name=name, custom_emoji_id=custom_emoji_id, **__pydantic_kwargs) diff --git a/aiogram/methods/set_game_score.py b/aiogram/methods/set_game_score.py index 590ca59d..38e5374f 100644 --- a/aiogram/methods/set_game_score.py +++ b/aiogram/methods/set_game_score.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import Message from .base import TelegramMethod @@ -30,3 +30,34 @@ class SetGameScore(TelegramMethod[Union[Message, bool]]): """Required if *inline_message_id* is not specified. Identifier of the sent message""" inline_message_id: Optional[str] = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + score: int, + force: Optional[bool] = None, + disable_edit_message: Optional[bool] = None, + chat_id: Optional[int] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + score=score, + force=force, + disable_edit_message=disable_edit_message, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_my_commands.py b/aiogram/methods/set_my_commands.py index 3aff027f..2e52771f 100644 --- a/aiogram/methods/set_my_commands.py +++ b/aiogram/methods/set_my_commands.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from ..types import ( BotCommand, @@ -41,3 +41,33 @@ class SetMyCommands(TelegramMethod[bool]): """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + commands: List[BotCommand], + scope: Optional[ + Union[ + BotCommandScopeDefault, + BotCommandScopeAllPrivateChats, + BotCommandScopeAllGroupChats, + BotCommandScopeAllChatAdministrators, + BotCommandScopeChat, + BotCommandScopeChatAdministrators, + BotCommandScopeChatMember, + ] + ] = None, + language_code: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + commands=commands, scope=scope, language_code=language_code, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_my_default_administrator_rights.py b/aiogram/methods/set_my_default_administrator_rights.py index 8817a9dc..02aa7ada 100644 --- a/aiogram/methods/set_my_default_administrator_rights.py +++ b/aiogram/methods/set_my_default_administrator_rights.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import ChatAdministratorRights from .base import TelegramMethod @@ -20,3 +20,20 @@ class SetMyDefaultAdministratorRights(TelegramMethod[bool]): """A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.""" for_channels: Optional[bool] = None """Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + rights: Optional[ChatAdministratorRights] = None, + for_channels: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(rights=rights, for_channels=for_channels, **__pydantic_kwargs) diff --git a/aiogram/methods/set_my_description.py b/aiogram/methods/set_my_description.py index fba6b8d3..ee192c88 100644 --- a/aiogram/methods/set_my_description.py +++ b/aiogram/methods/set_my_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramMethod @@ -19,3 +19,22 @@ class SetMyDescription(TelegramMethod[bool]): """New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + description: Optional[str] = None, + language_code: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + description=description, language_code=language_code, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_my_name.py b/aiogram/methods/set_my_name.py index 9b392281..3633fdc8 100644 --- a/aiogram/methods/set_my_name.py +++ b/aiogram/methods/set_my_name.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramMethod @@ -17,3 +17,20 @@ class SetMyName(TelegramMethod[bool]): """New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: Optional[str] = None, + language_code: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(name=name, language_code=language_code, **__pydantic_kwargs) diff --git a/aiogram/methods/set_my_short_description.py b/aiogram/methods/set_my_short_description.py index 0c697d4b..22fa5817 100644 --- a/aiogram/methods/set_my_short_description.py +++ b/aiogram/methods/set_my_short_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramMethod @@ -19,3 +19,24 @@ class SetMyShortDescription(TelegramMethod[bool]): """New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + short_description: Optional[str] = None, + language_code: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + short_description=short_description, + language_code=language_code, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_passport_data_errors.py b/aiogram/methods/set_passport_data_errors.py index 8dbd52b2..0ad7e8bb 100644 --- a/aiogram/methods/set_passport_data_errors.py +++ b/aiogram/methods/set_passport_data_errors.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Union +from typing import TYPE_CHECKING, Any, List, Union from ..types import ( PassportElementErrorDataField, @@ -43,3 +43,32 @@ class SetPassportDataErrors(TelegramMethod[bool]): ] ] """A JSON-serialized array describing the errors""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + errors: List[ + Union[ + PassportElementErrorDataField, + PassportElementErrorFrontSide, + PassportElementErrorReverseSide, + PassportElementErrorSelfie, + PassportElementErrorFile, + PassportElementErrorFiles, + PassportElementErrorTranslationFile, + PassportElementErrorTranslationFiles, + PassportElementErrorUnspecified, + ] + ], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(user_id=user_id, errors=errors, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_emoji_list.py b/aiogram/methods/set_sticker_emoji_list.py index b88f609e..ac268c1e 100644 --- a/aiogram/methods/set_sticker_emoji_list.py +++ b/aiogram/methods/set_sticker_emoji_list.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List +from typing import TYPE_CHECKING, Any, List from .base import TelegramMethod @@ -19,3 +19,16 @@ class SetStickerEmojiList(TelegramMethod[bool]): """File identifier of the sticker""" emoji_list: List[str] """A JSON-serialized list of 1-20 emoji associated with the sticker""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, sticker: str, emoji_list: List[str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(sticker=sticker, emoji_list=emoji_list, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_keywords.py b/aiogram/methods/set_sticker_keywords.py index 1179613b..49e68f85 100644 --- a/aiogram/methods/set_sticker_keywords.py +++ b/aiogram/methods/set_sticker_keywords.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import TelegramMethod @@ -19,3 +19,20 @@ class SetStickerKeywords(TelegramMethod[bool]): """File identifier of the sticker""" keywords: Optional[List[str]] = None """A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + sticker: str, + keywords: Optional[List[str]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(sticker=sticker, keywords=keywords, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_mask_position.py b/aiogram/methods/set_sticker_mask_position.py index 7e82b061..617e48b5 100644 --- a/aiogram/methods/set_sticker_mask_position.py +++ b/aiogram/methods/set_sticker_mask_position.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from ..types import MaskPosition from .base import TelegramMethod @@ -20,3 +20,20 @@ class SetStickerMaskPosition(TelegramMethod[bool]): """File identifier of the sticker""" mask_position: Optional[MaskPosition] = None """A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + sticker: str, + mask_position: Optional[MaskPosition] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(sticker=sticker, mask_position=mask_position, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_position_in_set.py b/aiogram/methods/set_sticker_position_in_set.py index 395d2e05..8d30eab1 100644 --- a/aiogram/methods/set_sticker_position_in_set.py +++ b/aiogram/methods/set_sticker_position_in_set.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramMethod @@ -17,3 +19,16 @@ class SetStickerPositionInSet(TelegramMethod[bool]): """File identifier of the sticker""" position: int """New sticker position in the set, zero-based""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, sticker: str, position: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(sticker=sticker, position=position, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_set_thumbnail.py b/aiogram/methods/set_sticker_set_thumbnail.py index 3624bce4..6536d298 100644 --- a/aiogram/methods/set_sticker_set_thumbnail.py +++ b/aiogram/methods/set_sticker_set_thumbnail.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import InputFile from .base import TelegramMethod @@ -22,3 +22,21 @@ class SetStickerSetThumbnail(TelegramMethod[bool]): """User identifier of the sticker set owner""" thumbnail: Optional[Union[InputFile, str]] = None """A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + user_id: int, + thumbnail: Optional[Union[InputFile, str]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(name=name, user_id=user_id, thumbnail=thumbnail, **__pydantic_kwargs) diff --git a/aiogram/methods/set_sticker_set_title.py b/aiogram/methods/set_sticker_set_title.py index 1136353f..ec25473a 100644 --- a/aiogram/methods/set_sticker_set_title.py +++ b/aiogram/methods/set_sticker_set_title.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramMethod @@ -17,3 +19,16 @@ class SetStickerSetTitle(TelegramMethod[bool]): """Sticker set name""" title: str """Sticker set title, 1-64 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, name: str, title: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(name=name, title=title, **__pydantic_kwargs) diff --git a/aiogram/methods/set_webhook.py b/aiogram/methods/set_webhook.py index 66ec86ff..92892531 100644 --- a/aiogram/methods/set_webhook.py +++ b/aiogram/methods/set_webhook.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from ..types import InputFile from .base import TelegramMethod @@ -40,3 +40,34 @@ class SetWebhook(TelegramMethod[bool]): """Pass :code:`True` to drop all pending updates""" secret_token: Optional[str] = None """A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + url: str, + certificate: Optional[InputFile] = None, + ip_address: Optional[str] = None, + max_connections: Optional[int] = None, + allowed_updates: Optional[List[str]] = None, + drop_pending_updates: Optional[bool] = None, + secret_token: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + url=url, + certificate=certificate, + ip_address=ip_address, + max_connections=max_connections, + allowed_updates=allowed_updates, + drop_pending_updates=drop_pending_updates, + secret_token=secret_token, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/stop_message_live_location.py b/aiogram/methods/stop_message_live_location.py index 9361dfae..a6680955 100644 --- a/aiogram/methods/stop_message_live_location.py +++ b/aiogram/methods/stop_message_live_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import InlineKeyboardMarkup, Message from .base import TelegramMethod @@ -24,3 +24,28 @@ class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]): """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new `inline keyboard `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/stop_poll.py b/aiogram/methods/stop_poll.py index 2e93f087..81c46b1a 100644 --- a/aiogram/methods/stop_poll.py +++ b/aiogram/methods/stop_poll.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from ..types import InlineKeyboardMarkup, Poll from .base import TelegramMethod @@ -22,3 +22,26 @@ class StopPoll(TelegramMethod[Poll]): """Identifier of the original message with the poll""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new message `inline keyboard `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_id: int, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + message_id=message_id, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/unban_chat_member.py b/aiogram/methods/unban_chat_member.py index 19ef9ef7..1094db52 100644 --- a/aiogram/methods/unban_chat_member.py +++ b/aiogram/methods/unban_chat_member.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -21,3 +21,26 @@ class UnbanChatMember(TelegramMethod[bool]): """Unique identifier of the target user""" only_if_banned: Optional[bool] = None """Do nothing if the user is not banned""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + user_id: int, + only_if_banned: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + user_id=user_id, + only_if_banned=only_if_banned, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/unban_chat_sender_chat.py b/aiogram/methods/unban_chat_sender_chat.py index e81278d3..b9816984 100644 --- a/aiogram/methods/unban_chat_sender_chat.py +++ b/aiogram/methods/unban_chat_sender_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,20 @@ class UnbanChatSenderChat(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sender_chat_id: int """Unique identifier of the target sender chat""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + sender_chat_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, sender_chat_id=sender_chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/unhide_general_forum_topic.py b/aiogram/methods/unhide_general_forum_topic.py index cebcec25..a9149bc8 100644 --- a/aiogram/methods/unhide_general_forum_topic.py +++ b/aiogram/methods/unhide_general_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class UnhideGeneralForumTopic(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/unpin_all_chat_messages.py b/aiogram/methods/unpin_all_chat_messages.py index 76927e63..aca090f3 100644 --- a/aiogram/methods/unpin_all_chat_messages.py +++ b/aiogram/methods/unpin_all_chat_messages.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -17,3 +17,16 @@ class UnpinAllChatMessages(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/methods/unpin_all_forum_topic_messages.py b/aiogram/methods/unpin_all_forum_topic_messages.py index 09729e2c..f1350ecc 100644 --- a/aiogram/methods/unpin_all_forum_topic_messages.py +++ b/aiogram/methods/unpin_all_forum_topic_messages.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import TYPE_CHECKING, Any, Union from .base import TelegramMethod @@ -19,3 +19,22 @@ class UnpinAllForumTopicMessages(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_thread_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs + ) diff --git a/aiogram/methods/unpin_chat_message.py b/aiogram/methods/unpin_chat_message.py index 3fb70154..90547140 100644 --- a/aiogram/methods/unpin_chat_message.py +++ b/aiogram/methods/unpin_chat_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union from .base import TelegramMethod @@ -19,3 +19,20 @@ class UnpinChatMessage(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: Optional[int] = None """Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: Union[int, str], + message_id: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(chat_id=chat_id, message_id=message_id, **__pydantic_kwargs) diff --git a/aiogram/methods/upload_sticker_file.py b/aiogram/methods/upload_sticker_file.py index fd1a229e..077a9822 100644 --- a/aiogram/methods/upload_sticker_file.py +++ b/aiogram/methods/upload_sticker_file.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from ..types import File, InputFile from .base import TelegramMethod @@ -20,3 +22,26 @@ class UploadStickerFile(TelegramMethod[File]): """A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `""" sticker_format: str """Format of the sticker, must be one of 'static', 'animated', 'video'""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + sticker: InputFile, + sticker_format: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + sticker=sticker, + sticker_format=sticker_format, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/animation.py b/aiogram/types/animation.py index 15354156..856a5b37 100644 --- a/aiogram/types/animation.py +++ b/aiogram/types/animation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -33,3 +33,38 @@ class Animation(TelegramObject): """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + width: int, + height: int, + duration: int, + thumbnail: Optional[PhotoSize] = None, + file_name: Optional[str] = None, + mime_type: Optional[str] = None, + file_size: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + width=width, + height=height, + duration=duration, + thumbnail=thumbnail, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/audio.py b/aiogram/types/audio.py index 0a147c36..f42e3bf2 100644 --- a/aiogram/types/audio.py +++ b/aiogram/types/audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -33,3 +33,38 @@ class Audio(TelegramObject): """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" thumbnail: Optional[PhotoSize] = None """*Optional*. Thumbnail of the album cover to which the music file belongs""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + duration: int, + performer: Optional[str] = None, + title: Optional[str] = None, + file_name: Optional[str] = None, + mime_type: Optional[str] = None, + file_size: Optional[int] = None, + thumbnail: Optional[PhotoSize] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + duration=duration, + performer=performer, + title=title, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + thumbnail=thumbnail, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/bot_command.py b/aiogram/types/bot_command.py index 1bf65eba..e4e91759 100644 --- a/aiogram/types/bot_command.py +++ b/aiogram/types/bot_command.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import MutableTelegramObject @@ -14,3 +16,16 @@ class BotCommand(MutableTelegramObject): """Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.""" description: str """Description of the command; 1-256 characters.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, command: str, description: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(command=command, description=description, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_all_chat_administrators.py b/aiogram/types/bot_command_scope_all_chat_administrators.py index ed3dd181..061945f7 100644 --- a/aiogram/types/bot_command_scope_all_chat_administrators.py +++ b/aiogram/types/bot_command_scope_all_chat_administrators.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -17,3 +17,21 @@ class BotCommandScopeAllChatAdministrators(BotCommandScope): BotCommandScopeType.ALL_CHAT_ADMINISTRATORS ] = BotCommandScopeType.ALL_CHAT_ADMINISTRATORS """Scope type, must be *all_chat_administrators*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.ALL_CHAT_ADMINISTRATORS + ] = BotCommandScopeType.ALL_CHAT_ADMINISTRATORS, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_all_group_chats.py b/aiogram/types/bot_command_scope_all_group_chats.py index 3393266a..a17a51da 100644 --- a/aiogram/types/bot_command_scope_all_group_chats.py +++ b/aiogram/types/bot_command_scope_all_group_chats.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -15,3 +15,21 @@ class BotCommandScopeAllGroupChats(BotCommandScope): type: Literal[BotCommandScopeType.ALL_GROUP_CHATS] = BotCommandScopeType.ALL_GROUP_CHATS """Scope type, must be *all_group_chats*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.ALL_GROUP_CHATS + ] = BotCommandScopeType.ALL_GROUP_CHATS, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_all_private_chats.py b/aiogram/types/bot_command_scope_all_private_chats.py index c53303d1..54d406ff 100644 --- a/aiogram/types/bot_command_scope_all_private_chats.py +++ b/aiogram/types/bot_command_scope_all_private_chats.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -15,3 +15,21 @@ class BotCommandScopeAllPrivateChats(BotCommandScope): type: Literal[BotCommandScopeType.ALL_PRIVATE_CHATS] = BotCommandScopeType.ALL_PRIVATE_CHATS """Scope type, must be *all_private_chats*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.ALL_PRIVATE_CHATS + ] = BotCommandScopeType.ALL_PRIVATE_CHATS, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_chat.py b/aiogram/types/bot_command_scope_chat.py index f0ef7b58..f36c4a1d 100644 --- a/aiogram/types/bot_command_scope_chat.py +++ b/aiogram/types/bot_command_scope_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal, Union +from typing import TYPE_CHECKING, Any, Literal, Union from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -17,3 +17,20 @@ class BotCommandScopeChat(BotCommandScope): """Scope type, must be *chat*""" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[BotCommandScopeType.CHAT] = BotCommandScopeType.CHAT, + chat_id: Union[int, str], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_chat_administrators.py b/aiogram/types/bot_command_scope_chat_administrators.py index 65513db2..8757e98c 100644 --- a/aiogram/types/bot_command_scope_chat_administrators.py +++ b/aiogram/types/bot_command_scope_chat_administrators.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal, Union +from typing import TYPE_CHECKING, Any, Literal, Union from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -19,3 +19,22 @@ class BotCommandScopeChatAdministrators(BotCommandScope): """Scope type, must be *chat_administrators*""" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + BotCommandScopeType.CHAT_ADMINISTRATORS + ] = BotCommandScopeType.CHAT_ADMINISTRATORS, + chat_id: Union[int, str], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_chat_member.py b/aiogram/types/bot_command_scope_chat_member.py index efb97870..4d20b1f3 100644 --- a/aiogram/types/bot_command_scope_chat_member.py +++ b/aiogram/types/bot_command_scope_chat_member.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal, Union +from typing import TYPE_CHECKING, Any, Literal, Union from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -19,3 +19,21 @@ class BotCommandScopeChatMember(BotCommandScope): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" user_id: int """Unique identifier of the target user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[BotCommandScopeType.CHAT_MEMBER] = BotCommandScopeType.CHAT_MEMBER, + chat_id: Union[int, str], + user_id: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/types/bot_command_scope_default.py b/aiogram/types/bot_command_scope_default.py index 449665c9..33b7a0ca 100644 --- a/aiogram/types/bot_command_scope_default.py +++ b/aiogram/types/bot_command_scope_default.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope @@ -15,3 +15,19 @@ class BotCommandScopeDefault(BotCommandScope): type: Literal[BotCommandScopeType.DEFAULT] = BotCommandScopeType.DEFAULT """Scope type, must be *default*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[BotCommandScopeType.DEFAULT] = BotCommandScopeType.DEFAULT, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/bot_description.py b/aiogram/types/bot_description.py index a69d492f..5d8646dd 100644 --- a/aiogram/types/bot_description.py +++ b/aiogram/types/bot_description.py @@ -1,3 +1,5 @@ +from typing import TYPE_CHECKING, Any + from aiogram.types import TelegramObject @@ -10,3 +12,14 @@ class BotDescription(TelegramObject): description: str """The bot's description""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, description: str, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(description=description, **__pydantic_kwargs) diff --git a/aiogram/types/bot_name.py b/aiogram/types/bot_name.py index 103f1fde..f2dc0745 100644 --- a/aiogram/types/bot_name.py +++ b/aiogram/types/bot_name.py @@ -1,3 +1,5 @@ +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -10,3 +12,14 @@ class BotName(TelegramObject): name: str """The bot's name""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(name=name, **__pydantic_kwargs) diff --git a/aiogram/types/bot_short_description.py b/aiogram/types/bot_short_description.py index 46d5c1c3..86b11cf4 100644 --- a/aiogram/types/bot_short_description.py +++ b/aiogram/types/bot_short_description.py @@ -1,3 +1,5 @@ +from typing import TYPE_CHECKING, Any + from aiogram.types import TelegramObject @@ -10,3 +12,16 @@ class BotShortDescription(TelegramObject): short_description: str """The bot's short description""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, short_description: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(short_description=short_description, **__pydantic_kwargs) diff --git a/aiogram/types/callback_query.py b/aiogram/types/callback_query.py index 59f9ea66..f6e95b1c 100644 --- a/aiogram/types/callback_query.py +++ b/aiogram/types/callback_query.py @@ -36,6 +36,37 @@ class CallbackQuery(TelegramObject): game_short_name: Optional[str] = None """*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + chat_instance: str, + message: Optional[Message] = None, + inline_message_id: Optional[str] = None, + data: Optional[str] = None, + game_short_name: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + from_user=from_user, + chat_instance=chat_instance, + message=message, + inline_message_id=inline_message_id, + data=data, + game_short_name=game_short_name, + **__pydantic_kwargs, + ) + def answer( self, text: Optional[str] = None, diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index d5d0dfcc..6c36ae5a 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -106,6 +106,79 @@ class Chat(TelegramObject): location: Optional[ChatLocation] = None """*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + type: str, + title: Optional[str] = None, + username: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + is_forum: Optional[bool] = None, + photo: Optional[ChatPhoto] = None, + active_usernames: Optional[List[str]] = None, + emoji_status_custom_emoji_id: Optional[str] = None, + bio: Optional[str] = None, + has_private_forwards: Optional[bool] = None, + has_restricted_voice_and_video_messages: Optional[bool] = None, + join_to_send_messages: Optional[bool] = None, + join_by_request: Optional[bool] = None, + description: Optional[str] = None, + invite_link: Optional[str] = None, + pinned_message: Optional[Message] = None, + permissions: Optional[ChatPermissions] = None, + slow_mode_delay: Optional[int] = None, + message_auto_delete_time: Optional[int] = None, + has_aggressive_anti_spam_enabled: Optional[bool] = None, + has_hidden_members: Optional[bool] = None, + has_protected_content: Optional[bool] = None, + sticker_set_name: Optional[str] = None, + can_set_sticker_set: Optional[bool] = None, + linked_chat_id: Optional[int] = None, + location: Optional[ChatLocation] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + type=type, + title=title, + username=username, + first_name=first_name, + last_name=last_name, + is_forum=is_forum, + photo=photo, + active_usernames=active_usernames, + emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, + bio=bio, + has_private_forwards=has_private_forwards, + has_restricted_voice_and_video_messages=has_restricted_voice_and_video_messages, + join_to_send_messages=join_to_send_messages, + join_by_request=join_by_request, + description=description, + invite_link=invite_link, + pinned_message=pinned_message, + permissions=permissions, + slow_mode_delay=slow_mode_delay, + message_auto_delete_time=message_auto_delete_time, + has_aggressive_anti_spam_enabled=has_aggressive_anti_spam_enabled, + has_hidden_members=has_hidden_members, + has_protected_content=has_protected_content, + sticker_set_name=sticker_set_name, + can_set_sticker_set=can_set_sticker_set, + linked_chat_id=linked_chat_id, + location=location, + **__pydantic_kwargs, + ) + @property def shifted_id(self) -> int: """ diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py index 23519ced..1da998d1 100644 --- a/aiogram/types/chat_administrator_rights.py +++ b/aiogram/types/chat_administrator_rights.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -39,3 +39,44 @@ class ChatAdministratorRights(TelegramObject): """*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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + is_anonymous: bool, + can_manage_chat: bool, + can_delete_messages: bool, + can_manage_video_chats: bool, + can_restrict_members: bool, + can_promote_members: bool, + can_change_info: bool, + can_invite_users: bool, + can_post_messages: Optional[bool] = None, + can_edit_messages: Optional[bool] = None, + can_pin_messages: Optional[bool] = None, + can_manage_topics: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + 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_manage_topics=can_manage_topics, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_invite_link.py b/aiogram/types/chat_invite_link.py index 7476f9dc..ae947f36 100644 --- a/aiogram/types/chat_invite_link.py +++ b/aiogram/types/chat_invite_link.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -34,3 +34,38 @@ class ChatInviteLink(TelegramObject): """*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" pending_join_request_count: Optional[int] = None """*Optional*. Number of pending join requests created using this link""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + invite_link: str, + creator: User, + creates_join_request: bool, + is_primary: bool, + is_revoked: bool, + name: Optional[str] = None, + expire_date: Optional[datetime.datetime] = None, + member_limit: Optional[int] = None, + pending_join_request_count: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + invite_link=invite_link, + creator=creator, + creates_join_request=creates_join_request, + is_primary=is_primary, + is_revoked=is_revoked, + name=name, + expire_date=expire_date, + member_limit=member_limit, + pending_join_request_count=pending_join_request_count, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_join_request.py b/aiogram/types/chat_join_request.py index e622c863..6aeac238 100644 --- a/aiogram/types/chat_join_request.py +++ b/aiogram/types/chat_join_request.py @@ -70,6 +70,35 @@ class ChatJoinRequest(TelegramObject): invite_link: Optional[ChatInviteLink] = None """*Optional*. Chat invite link that was used by the user to send the join request""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + from_user: User, + user_chat_id: int, + date: datetime.datetime, + bio: Optional[str] = None, + invite_link: Optional[ChatInviteLink] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat=chat, + from_user=from_user, + user_chat_id=user_chat_id, + date=date, + bio=bio, + invite_link=invite_link, + **__pydantic_kwargs, + ) + def approve( self, **kwargs: Any, diff --git a/aiogram/types/chat_location.py b/aiogram/types/chat_location.py index 89b28d7c..ad64a3c3 100644 --- a/aiogram/types/chat_location.py +++ b/aiogram/types/chat_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,3 +19,16 @@ class ChatLocation(TelegramObject): """The location to which the supergroup is connected. Can't be a live location.""" address: str """Location address; 1-64 characters, as defined by the chat owner""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, location: Location, address: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(location=location, address=address, **__pydantic_kwargs) diff --git a/aiogram/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index ae98e79d..02a3be39 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal, Optional from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -48,3 +48,52 @@ class ChatMemberAdministrator(ChatMember): """*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""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.ADMINISTRATOR] = ChatMemberStatus.ADMINISTRATOR, + user: User, + can_be_edited: bool, + is_anonymous: bool, + can_manage_chat: bool, + can_delete_messages: bool, + can_manage_video_chats: bool, + can_restrict_members: bool, + can_promote_members: bool, + can_change_info: bool, + can_invite_users: bool, + can_post_messages: Optional[bool] = None, + can_edit_messages: Optional[bool] = None, + can_pin_messages: Optional[bool] = None, + can_manage_topics: Optional[bool] = None, + custom_title: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + status=status, + user=user, + can_be_edited=can_be_edited, + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + 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_manage_topics=can_manage_topics, + custom_title=custom_title, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_member_banned.py b/aiogram/types/chat_member_banned.py index 33e85f45..ef8475df 100644 --- a/aiogram/types/chat_member_banned.py +++ b/aiogram/types/chat_member_banned.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -23,3 +23,21 @@ class ChatMemberBanned(ChatMember): """Information about the user""" until_date: datetime.datetime """Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.KICKED] = ChatMemberStatus.KICKED, + user: User, + until_date: datetime.datetime, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(status=status, user=user, until_date=until_date, **__pydantic_kwargs) diff --git a/aiogram/types/chat_member_left.py b/aiogram/types/chat_member_left.py index af501917..3870d17f 100644 --- a/aiogram/types/chat_member_left.py +++ b/aiogram/types/chat_member_left.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -20,3 +20,20 @@ class ChatMemberLeft(ChatMember): """The member's status in the chat, always 'left'""" user: User """Information about the user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.LEFT] = ChatMemberStatus.LEFT, + user: User, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(status=status, user=user, **__pydantic_kwargs) diff --git a/aiogram/types/chat_member_member.py b/aiogram/types/chat_member_member.py index e2c7418e..663b190b 100644 --- a/aiogram/types/chat_member_member.py +++ b/aiogram/types/chat_member_member.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -20,3 +20,20 @@ class ChatMemberMember(ChatMember): """The member's status in the chat, always 'member'""" user: User """Information about the user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.MEMBER] = ChatMemberStatus.MEMBER, + user: User, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(status=status, user=user, **__pydantic_kwargs) diff --git a/aiogram/types/chat_member_owner.py b/aiogram/types/chat_member_owner.py index 66450550..1429435e 100644 --- a/aiogram/types/chat_member_owner.py +++ b/aiogram/types/chat_member_owner.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal, Optional from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -24,3 +24,28 @@ class ChatMemberOwner(ChatMember): """:code:`True`, if the user's presence in the chat is hidden""" custom_title: Optional[str] = None """*Optional*. Custom title for this user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.CREATOR] = ChatMemberStatus.CREATOR, + user: User, + is_anonymous: bool, + custom_title: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + status=status, + user=user, + is_anonymous=is_anonymous, + custom_title=custom_title, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_member_restricted.py b/aiogram/types/chat_member_restricted.py index 17db73fb..01971e76 100644 --- a/aiogram/types/chat_member_restricted.py +++ b/aiogram/types/chat_member_restricted.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -53,3 +53,56 @@ class ChatMemberRestricted(ChatMember): """:code:`True`, if the user is allowed to create forum topics""" until_date: datetime.datetime """Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + status: Literal[ChatMemberStatus.RESTRICTED] = ChatMemberStatus.RESTRICTED, + user: User, + is_member: bool, + can_send_messages: bool, + can_send_audios: bool, + can_send_documents: bool, + can_send_photos: bool, + can_send_videos: bool, + can_send_video_notes: bool, + can_send_voice_notes: bool, + can_send_polls: bool, + can_send_other_messages: bool, + can_add_web_page_previews: bool, + can_change_info: bool, + can_invite_users: bool, + can_pin_messages: bool, + can_manage_topics: bool, + until_date: datetime.datetime, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + status=status, + user=user, + is_member=is_member, + can_send_messages=can_send_messages, + can_send_audios=can_send_audios, + can_send_documents=can_send_documents, + can_send_photos=can_send_photos, + can_send_videos=can_send_videos, + can_send_video_notes=can_send_video_notes, + can_send_voice_notes=can_send_voice_notes, + can_send_polls=can_send_polls, + can_send_other_messages=can_send_other_messages, + can_add_web_page_previews=can_add_web_page_previews, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_pin_messages=can_pin_messages, + can_manage_topics=can_manage_topics, + until_date=until_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_member_updated.py b/aiogram/types/chat_member_updated.py index 7e15dab5..95db27de 100644 --- a/aiogram/types/chat_member_updated.py +++ b/aiogram/types/chat_member_updated.py @@ -90,6 +90,51 @@ class ChatMemberUpdated(TelegramObject): via_chat_folder_invite_link: Optional[bool] = None """*Optional*. True, if the user joined the chat via a chat folder invite link""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat: Chat, + from_user: User, + date: datetime.datetime, + old_chat_member: Union[ + ChatMemberOwner, + ChatMemberAdministrator, + ChatMemberMember, + ChatMemberRestricted, + ChatMemberLeft, + ChatMemberBanned, + ], + new_chat_member: Union[ + ChatMemberOwner, + ChatMemberAdministrator, + ChatMemberMember, + ChatMemberRestricted, + ChatMemberLeft, + ChatMemberBanned, + ], + invite_link: Optional[ChatInviteLink] = None, + via_chat_folder_invite_link: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat=chat, + from_user=from_user, + date=date, + old_chat_member=old_chat_member, + new_chat_member=new_chat_member, + invite_link=invite_link, + via_chat_folder_invite_link=via_chat_folder_invite_link, + **__pydantic_kwargs, + ) + def answer( self, text: str, diff --git a/aiogram/types/chat_permissions.py b/aiogram/types/chat_permissions.py index 762fe208..671ebc26 100644 --- a/aiogram/types/chat_permissions.py +++ b/aiogram/types/chat_permissions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import MutableTelegramObject @@ -40,3 +40,48 @@ class ChatPermissions(MutableTelegramObject): """*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 forum topics. If omitted defaults to the value of can_pin_messages""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + can_send_messages: Optional[bool] = None, + can_send_audios: Optional[bool] = None, + can_send_documents: Optional[bool] = None, + can_send_photos: Optional[bool] = None, + can_send_videos: Optional[bool] = None, + can_send_video_notes: Optional[bool] = None, + can_send_voice_notes: Optional[bool] = None, + can_send_polls: Optional[bool] = None, + can_send_other_messages: Optional[bool] = None, + can_add_web_page_previews: Optional[bool] = None, + can_change_info: Optional[bool] = None, + can_invite_users: Optional[bool] = None, + can_pin_messages: Optional[bool] = None, + can_manage_topics: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + can_send_messages=can_send_messages, + can_send_audios=can_send_audios, + can_send_documents=can_send_documents, + can_send_photos=can_send_photos, + can_send_videos=can_send_videos, + can_send_video_notes=can_send_video_notes, + can_send_voice_notes=can_send_voice_notes, + can_send_polls=can_send_polls, + can_send_other_messages=can_send_other_messages, + can_add_web_page_previews=can_add_web_page_previews, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_pin_messages=can_pin_messages, + can_manage_topics=can_manage_topics, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_photo.py b/aiogram/types/chat_photo.py index a3f95f94..1a64aebf 100644 --- a/aiogram/types/chat_photo.py +++ b/aiogram/types/chat_photo.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -18,3 +20,28 @@ class ChatPhoto(TelegramObject): """File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.""" big_file_unique_id: str """Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + small_file_id: str, + small_file_unique_id: str, + big_file_id: str, + big_file_unique_id: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + small_file_id=small_file_id, + small_file_unique_id=small_file_unique_id, + big_file_id=big_file_id, + big_file_unique_id=big_file_unique_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chat_shared.py b/aiogram/types/chat_shared.py index a3f3e7a8..eb244c0a 100644 --- a/aiogram/types/chat_shared.py +++ b/aiogram/types/chat_shared.py @@ -1,3 +1,5 @@ +from typing import TYPE_CHECKING, Any + from aiogram.types import TelegramObject @@ -12,3 +14,16 @@ class ChatShared(TelegramObject): """Identifier of the request""" chat_id: int """Identifier of the shared chat. 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 may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, request_id: int, chat_id: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(request_id=request_id, chat_id=chat_id, **__pydantic_kwargs) diff --git a/aiogram/types/chosen_inline_result.py b/aiogram/types/chosen_inline_result.py index 0ec211f7..510a0e12 100644 --- a/aiogram/types/chosen_inline_result.py +++ b/aiogram/types/chosen_inline_result.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from pydantic import Field @@ -29,3 +29,30 @@ class ChosenInlineResult(TelegramObject): """*Optional*. Sender location, only for bots that require user location""" inline_message_id: Optional[str] = None """*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message. Will be also received in `callback queries `_ and can be used to `edit `_ the message.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + result_id: str, + from_user: User, + query: str, + location: Optional[Location] = None, + inline_message_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + result_id=result_id, + from_user=from_user, + query=query, + location=location, + inline_message_id=inline_message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/contact.py b/aiogram/types/contact.py index 732b770d..1fb7f834 100644 --- a/aiogram/types/contact.py +++ b/aiogram/types/contact.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -22,3 +22,30 @@ class Contact(TelegramObject): """*Optional*. Contact's user identifier in Telegram. 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.""" vcard: Optional[str] = None """*Optional*. Additional data about the contact in the form of a `vCard `_""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + phone_number: str, + first_name: str, + last_name: Optional[str] = None, + user_id: Optional[int] = None, + vcard: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + phone_number=phone_number, + first_name=first_name, + last_name=last_name, + user_id=user_id, + vcard=vcard, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/dice.py b/aiogram/types/dice.py index 00356457..56b84f43 100644 --- a/aiogram/types/dice.py +++ b/aiogram/types/dice.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -15,6 +17,19 @@ class Dice(TelegramObject): value: int """Value of the dice, 1-6 for '🎲', '🎯' and '🎳' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, emoji: str, value: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(emoji=emoji, value=value, **__pydantic_kwargs) + class DiceEmoji: DICE = "🎲" diff --git a/aiogram/types/document.py b/aiogram/types/document.py index 837bf4ec..83139076 100644 --- a/aiogram/types/document.py +++ b/aiogram/types/document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -27,3 +27,32 @@ class Document(TelegramObject): """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + thumbnail: Optional[PhotoSize] = None, + file_name: Optional[str] = None, + mime_type: Optional[str] = None, + file_size: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + thumbnail=thumbnail, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/encrypted_credentials.py b/aiogram/types/encrypted_credentials.py index d14c2560..ca03e2a4 100644 --- a/aiogram/types/encrypted_credentials.py +++ b/aiogram/types/encrypted_credentials.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -16,3 +18,16 @@ class EncryptedCredentials(TelegramObject): """Base64-encoded data hash for data authentication""" secret: str """Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, data: str, hash: str, secret: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(data=data, hash=hash, secret=secret, **__pydantic_kwargs) diff --git a/aiogram/types/encrypted_passport_element.py b/aiogram/types/encrypted_passport_element.py index 27506298..5594e700 100644 --- a/aiogram/types/encrypted_passport_element.py +++ b/aiogram/types/encrypted_passport_element.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import TelegramObject @@ -35,3 +35,40 @@ class EncryptedPassportElement(TelegramObject): """*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" translation: Optional[List[PassportFile]] = None """*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: str, + hash: str, + data: Optional[str] = None, + phone_number: Optional[str] = None, + email: Optional[str] = None, + files: Optional[List[PassportFile]] = None, + front_side: Optional[PassportFile] = None, + reverse_side: Optional[PassportFile] = None, + selfie: Optional[PassportFile] = None, + translation: Optional[List[PassportFile]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + hash=hash, + data=data, + phone_number=phone_number, + email=email, + files=files, + front_side=front_side, + reverse_side=reverse_side, + selfie=selfie, + translation=translation, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/error_event.py b/aiogram/types/error_event.py index 212bee56..929e5dce 100644 --- a/aiogram/types/error_event.py +++ b/aiogram/types/error_event.py @@ -19,3 +19,10 @@ class ErrorEvent(TelegramObject): """Received update""" exception: Exception """Exception""" + + if TYPE_CHECKING: + + def __init__( + __pydantic_self__, *, update: Update, exception: Exception, **__pydantic_kwargs + ) -> None: + super().__init__(update=update, exception=exception, **__pydantic_kwargs) diff --git a/aiogram/types/file.py b/aiogram/types/file.py index 3e6e769e..252c230b 100644 --- a/aiogram/types/file.py +++ b/aiogram/types/file.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -22,3 +22,28 @@ class File(TelegramObject): """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" file_path: Optional[str] = None """*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + file_size: Optional[int] = None, + file_path: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + file_size=file_size, + file_path=file_path, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/force_reply.py b/aiogram/types/force_reply.py index cd13b658..eb00f35b 100644 --- a/aiogram/types/force_reply.py +++ b/aiogram/types/force_reply.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal, Optional +from typing import TYPE_CHECKING, Any, Literal, Optional from .base import MutableTelegramObject @@ -25,3 +25,26 @@ class ForceReply(MutableTelegramObject): """*Optional*. The placeholder to be shown in the input field when the reply is active; 1-64 characters""" selective: Optional[bool] = None """*Optional*. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + force_reply: Literal[True] = True, + input_field_placeholder: Optional[str] = None, + selective: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + force_reply=force_reply, + input_field_placeholder=input_field_placeholder, + selective=selective, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/forum_topic.py b/aiogram/types/forum_topic.py index 09592077..a6464bc1 100644 --- a/aiogram/types/forum_topic.py +++ b/aiogram/types/forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -20,3 +20,28 @@ class ForumTopic(TelegramObject): """Color of the topic icon in RGB format""" icon_custom_emoji_id: Optional[str] = None """*Optional*. Unique identifier of the custom emoji shown as the topic icon""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + message_thread_id: int, + name: str, + icon_color: int, + icon_custom_emoji_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + message_thread_id=message_thread_id, + name=name, + icon_color=icon_color, + icon_custom_emoji_id=icon_custom_emoji_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/forum_topic_created.py b/aiogram/types/forum_topic_created.py index 25448cf8..513df956 100644 --- a/aiogram/types/forum_topic_created.py +++ b/aiogram/types/forum_topic_created.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -18,3 +18,26 @@ class ForumTopicCreated(TelegramObject): """Color of the topic icon in RGB format""" icon_custom_emoji_id: Optional[str] = None """*Optional*. Unique identifier of the custom emoji shown as the topic icon""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + icon_color: int, + icon_custom_emoji_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + name=name, + icon_color=icon_color, + icon_custom_emoji_id=icon_custom_emoji_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/forum_topic_edited.py b/aiogram/types/forum_topic_edited.py index 52b4f893..b7b61965 100644 --- a/aiogram/types/forum_topic_edited.py +++ b/aiogram/types/forum_topic_edited.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from aiogram.types import TelegramObject @@ -14,3 +14,22 @@ class ForumTopicEdited(TelegramObject): """*Optional*. New name of the topic, if it was edited""" icon_custom_emoji_id: Optional[str] = None """*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: Optional[str] = None, + icon_custom_emoji_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + name=name, icon_custom_emoji_id=icon_custom_emoji_id, **__pydantic_kwargs + ) diff --git a/aiogram/types/game.py b/aiogram/types/game.py index f9b03bd1..294f26b9 100644 --- a/aiogram/types/game.py +++ b/aiogram/types/game.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import TelegramObject @@ -29,3 +29,32 @@ class Game(TelegramObject): """*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.""" animation: Optional[Animation] = None """*Optional*. Animation that will be displayed in the game message in chats. Upload via `BotFather `_""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + photo: List[PhotoSize], + text: Optional[str] = None, + text_entities: Optional[List[MessageEntity]] = None, + animation: Optional[Animation] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + title=title, + description=description, + photo=photo, + text=text, + text_entities=text_entities, + animation=animation, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/game_high_score.py b/aiogram/types/game_high_score.py index 30ec941a..5364be6e 100644 --- a/aiogram/types/game_high_score.py +++ b/aiogram/types/game_high_score.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -24,3 +24,16 @@ class GameHighScore(TelegramObject): """User""" score: int """Score""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, position: int, user: User, score: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(position=position, user=user, score=score, **__pydantic_kwargs) diff --git a/aiogram/types/inline_keyboard_button.py b/aiogram/types/inline_keyboard_button.py index 977fae8d..d2108e93 100644 --- a/aiogram/types/inline_keyboard_button.py +++ b/aiogram/types/inline_keyboard_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import MutableTelegramObject @@ -38,3 +38,40 @@ class InlineKeyboardButton(MutableTelegramObject): """*Optional*. Description of the game that will be launched when the user presses the button.""" pay: Optional[bool] = None """*Optional*. Specify :code:`True`, to send a `Pay button `_.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + url: Optional[str] = None, + callback_data: Optional[str] = None, + web_app: Optional[WebAppInfo] = None, + login_url: Optional[LoginUrl] = None, + switch_inline_query: Optional[str] = None, + switch_inline_query_current_chat: Optional[str] = None, + switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None, + callback_game: Optional[CallbackGame] = None, + pay: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + text=text, + url=url, + callback_data=callback_data, + web_app=web_app, + login_url=login_url, + switch_inline_query=switch_inline_query, + switch_inline_query_current_chat=switch_inline_query_current_chat, + switch_inline_query_chosen_chat=switch_inline_query_chosen_chat, + callback_game=callback_game, + pay=pay, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_keyboard_markup.py b/aiogram/types/inline_keyboard_markup.py index 473e292c..e8987def 100644 --- a/aiogram/types/inline_keyboard_markup.py +++ b/aiogram/types/inline_keyboard_markup.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Any, List from .base import MutableTelegramObject @@ -18,3 +18,19 @@ class InlineKeyboardMarkup(MutableTelegramObject): inline_keyboard: List[List[InlineKeyboardButton]] """Array of button rows, each represented by an Array of :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` objects""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + inline_keyboard: List[List[InlineKeyboardButton]], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(inline_keyboard=inline_keyboard, **__pydantic_kwargs) diff --git a/aiogram/types/inline_query.py b/aiogram/types/inline_query.py index e9fb644e..a0cad317 100644 --- a/aiogram/types/inline_query.py +++ b/aiogram/types/inline_query.py @@ -53,6 +53,35 @@ class InlineQuery(TelegramObject): location: Optional[Location] = None """*Optional*. Sender location, only for bots that request user location""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + query: str, + offset: str, + chat_type: Optional[str] = None, + location: Optional[Location] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + from_user=from_user, + query=query, + offset=offset, + chat_type=chat_type, + location=location, + **__pydantic_kwargs, + ) + def answer( self, results: List[ diff --git a/aiogram/types/inline_query_result_article.py b/aiogram/types/inline_query_result_article.py index 42c11782..c9987382 100644 --- a/aiogram/types/inline_query_result_article.py +++ b/aiogram/types/inline_query_result_article.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal, Optional, Union from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult @@ -49,3 +49,48 @@ class InlineQueryResultArticle(InlineQueryResult): """*Optional*. Thumbnail width""" thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.ARTICLE] = InlineQueryResultType.ARTICLE, + id: str, + title: str, + input_message_content: Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ], + reply_markup: Optional[InlineKeyboardMarkup] = None, + url: Optional[str] = None, + hide_url: Optional[bool] = None, + description: Optional[str] = None, + thumbnail_url: Optional[str] = None, + thumbnail_width: Optional[int] = None, + thumbnail_height: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + title=title, + input_message_content=input_message_content, + reply_markup=reply_markup, + url=url, + hide_url=hide_url, + description=description, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_audio.py b/aiogram/types/inline_query_result_audio.py index c57b0b72..63f06935 100644 --- a/aiogram/types/inline_query_result_audio.py +++ b/aiogram/types/inline_query_result_audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -54,3 +54,50 @@ class InlineQueryResultAudio(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the audio""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO, + id: str, + audio_url: str, + title: str, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + performer: Optional[str] = None, + audio_duration: Optional[int] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + audio_url=audio_url, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + performer=performer, + audio_duration=audio_duration, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_audio.py b/aiogram/types/inline_query_result_cached_audio.py index 6f0a73f1..25aa4d19 100644 --- a/aiogram/types/inline_query_result_cached_audio.py +++ b/aiogram/types/inline_query_result_cached_audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -48,3 +48,44 @@ class InlineQueryResultCachedAudio(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the audio""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO, + id: str, + audio_file_id: str, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + audio_file_id=audio_file_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_document.py b/aiogram/types/inline_query_result_cached_document.py index ccb28196..2325400d 100644 --- a/aiogram/types/inline_query_result_cached_document.py +++ b/aiogram/types/inline_query_result_cached_document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -52,3 +52,48 @@ class InlineQueryResultCachedDocument(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the file""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT, + id: str, + title: str, + document_file_id: str, + description: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + title=title, + document_file_id=document_file_id, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_gif.py b/aiogram/types/inline_query_result_cached_gif.py index f8ef40a6..aca612c9 100644 --- a/aiogram/types/inline_query_result_cached_gif.py +++ b/aiogram/types/inline_query_result_cached_gif.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -49,3 +49,46 @@ class InlineQueryResultCachedGif(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the GIF animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF, + id: str, + gif_file_id: str, + title: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + gif_file_id=gif_file_id, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_mpeg4_gif.py b/aiogram/types/inline_query_result_cached_mpeg4_gif.py index 09cc0db8..e08c9ee7 100644 --- a/aiogram/types/inline_query_result_cached_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_cached_mpeg4_gif.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -49,3 +49,46 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the video animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF, + id: str, + mpeg4_file_id: str, + title: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + mpeg4_file_id=mpeg4_file_id, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_photo.py b/aiogram/types/inline_query_result_cached_photo.py index b72ac656..2fdb94ff 100644 --- a/aiogram/types/inline_query_result_cached_photo.py +++ b/aiogram/types/inline_query_result_cached_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -51,3 +51,48 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the photo""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO, + id: str, + photo_file_id: str, + title: Optional[str] = None, + description: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + photo_file_id=photo_file_id, + title=title, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_sticker.py b/aiogram/types/inline_query_result_cached_sticker.py index beaab093..819c5b31 100644 --- a/aiogram/types/inline_query_result_cached_sticker.py +++ b/aiogram/types/inline_query_result_cached_sticker.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal, Optional, Union from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult @@ -40,3 +40,38 @@ class InlineQueryResultCachedSticker(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the sticker""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.STICKER] = InlineQueryResultType.STICKER, + id: str, + sticker_file_id: str, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + sticker_file_id=sticker_file_id, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_video.py b/aiogram/types/inline_query_result_cached_video.py index f522bc24..22244ed3 100644 --- a/aiogram/types/inline_query_result_cached_video.py +++ b/aiogram/types/inline_query_result_cached_video.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -51,3 +51,48 @@ class InlineQueryResultCachedVideo(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the video""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO, + id: str, + video_file_id: str, + title: str, + description: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + video_file_id=video_file_id, + title=title, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_cached_voice.py b/aiogram/types/inline_query_result_cached_voice.py index 7c2b0a44..323ef356 100644 --- a/aiogram/types/inline_query_result_cached_voice.py +++ b/aiogram/types/inline_query_result_cached_voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -50,3 +50,46 @@ class InlineQueryResultCachedVoice(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the voice message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE, + id: str, + voice_file_id: str, + title: str, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + voice_file_id=voice_file_id, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_contact.py b/aiogram/types/inline_query_result_contact.py index aa2fc8c5..95561557 100644 --- a/aiogram/types/inline_query_result_contact.py +++ b/aiogram/types/inline_query_result_contact.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal, Optional, Union from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult @@ -52,3 +52,50 @@ class InlineQueryResultContact(InlineQueryResult): """*Optional*. Thumbnail width""" thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.CONTACT] = InlineQueryResultType.CONTACT, + id: str, + phone_number: str, + first_name: str, + last_name: Optional[str] = None, + vcard: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + thumbnail_url: Optional[str] = None, + thumbnail_width: Optional[int] = None, + thumbnail_height: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + phone_number=phone_number, + first_name=first_name, + last_name=last_name, + vcard=vcard, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_document.py b/aiogram/types/inline_query_result_document.py index 102aaf24..20e3e9cc 100644 --- a/aiogram/types/inline_query_result_document.py +++ b/aiogram/types/inline_query_result_document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -60,3 +60,56 @@ class InlineQueryResultDocument(InlineQueryResult): """*Optional*. Thumbnail width""" thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT, + id: str, + title: str, + document_url: str, + mime_type: str, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + description: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + thumbnail_url: Optional[str] = None, + thumbnail_width: Optional[int] = None, + thumbnail_height: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + title=title, + document_url=document_url, + mime_type=mime_type, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + description=description, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_game.py b/aiogram/types/inline_query_result_game.py index b5ae90fc..7b5876f1 100644 --- a/aiogram/types/inline_query_result_game.py +++ b/aiogram/types/inline_query_result_game.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal, Optional from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult @@ -25,3 +25,28 @@ class InlineQueryResultGame(InlineQueryResult): """Short name of the game""" reply_markup: Optional[InlineKeyboardMarkup] = None """*Optional*. `Inline keyboard `_ attached to the message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.GAME] = InlineQueryResultType.GAME, + id: str, + game_short_name: str, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + game_short_name=game_short_name, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_gif.py b/aiogram/types/inline_query_result_gif.py index e3b85fe2..cf61a4d4 100644 --- a/aiogram/types/inline_query_result_gif.py +++ b/aiogram/types/inline_query_result_gif.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -59,3 +59,56 @@ class InlineQueryResultGif(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the GIF animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF, + id: str, + gif_url: str, + thumbnail_url: str, + gif_width: Optional[int] = None, + gif_height: Optional[int] = None, + gif_duration: Optional[int] = None, + thumbnail_mime_type: Optional[str] = None, + title: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + gif_url=gif_url, + thumbnail_url=thumbnail_url, + gif_width=gif_width, + gif_height=gif_height, + gif_duration=gif_duration, + thumbnail_mime_type=thumbnail_mime_type, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_location.py b/aiogram/types/inline_query_result_location.py index 4948a67c..45ad8042 100644 --- a/aiogram/types/inline_query_result_location.py +++ b/aiogram/types/inline_query_result_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal, Optional, Union from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult @@ -58,3 +58,56 @@ class InlineQueryResultLocation(InlineQueryResult): """*Optional*. Thumbnail width""" thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.LOCATION] = InlineQueryResultType.LOCATION, + id: str, + latitude: float, + longitude: float, + title: str, + horizontal_accuracy: Optional[float] = None, + live_period: Optional[int] = None, + heading: Optional[int] = None, + proximity_alert_radius: Optional[int] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + thumbnail_url: Optional[str] = None, + thumbnail_width: Optional[int] = None, + thumbnail_height: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + latitude=latitude, + longitude=longitude, + title=title, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_mpeg4_gif.py b/aiogram/types/inline_query_result_mpeg4_gif.py index 9d475af3..8be8e44e 100644 --- a/aiogram/types/inline_query_result_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_mpeg4_gif.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -59,3 +59,56 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the video animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF, + id: str, + mpeg4_url: str, + thumbnail_url: str, + mpeg4_width: Optional[int] = None, + mpeg4_height: Optional[int] = None, + mpeg4_duration: Optional[int] = None, + thumbnail_mime_type: Optional[str] = None, + title: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + mpeg4_url=mpeg4_url, + thumbnail_url=thumbnail_url, + mpeg4_width=mpeg4_width, + mpeg4_height=mpeg4_height, + mpeg4_duration=mpeg4_duration, + thumbnail_mime_type=thumbnail_mime_type, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_photo.py b/aiogram/types/inline_query_result_photo.py index 35a9d996..fe577877 100644 --- a/aiogram/types/inline_query_result_photo.py +++ b/aiogram/types/inline_query_result_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -57,3 +57,54 @@ class InlineQueryResultPhoto(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the photo""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO, + id: str, + photo_url: str, + thumbnail_url: str, + photo_width: Optional[int] = None, + photo_height: Optional[int] = None, + title: Optional[str] = None, + description: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + photo_url=photo_url, + thumbnail_url=thumbnail_url, + photo_width=photo_width, + photo_height=photo_height, + title=title, + description=description, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_venue.py b/aiogram/types/inline_query_result_venue.py index 65841255..9e11a25b 100644 --- a/aiogram/types/inline_query_result_venue.py +++ b/aiogram/types/inline_query_result_venue.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal, Optional, Union from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult @@ -60,3 +60,58 @@ class InlineQueryResultVenue(InlineQueryResult): """*Optional*. Thumbnail width""" thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VENUE] = InlineQueryResultType.VENUE, + id: str, + latitude: float, + longitude: float, + title: str, + address: str, + foursquare_id: Optional[str] = None, + foursquare_type: Optional[str] = None, + google_place_id: Optional[str] = None, + google_place_type: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + thumbnail_url: Optional[str] = None, + thumbnail_width: Optional[int] = None, + thumbnail_height: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + latitude=latitude, + longitude=longitude, + title=title, + address=address, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + reply_markup=reply_markup, + input_message_content=input_message_content, + thumbnail_url=thumbnail_url, + thumbnail_width=thumbnail_width, + thumbnail_height=thumbnail_height, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_video.py b/aiogram/types/inline_query_result_video.py index 0968dda1..b65ec3b9 100644 --- a/aiogram/types/inline_query_result_video.py +++ b/aiogram/types/inline_query_result_video.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -63,3 +63,58 @@ class InlineQueryResultVideo(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the video. This field is **required** if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO, + id: str, + video_url: str, + mime_type: str, + thumbnail_url: str, + title: str, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + video_width: Optional[int] = None, + video_height: Optional[int] = None, + video_duration: Optional[int] = None, + description: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + video_url=video_url, + mime_type=mime_type, + thumbnail_url=thumbnail_url, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + video_width=video_width, + video_height=video_height, + video_duration=video_duration, + description=description, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_result_voice.py b/aiogram/types/inline_query_result_voice.py index 995950ef..edd3157e 100644 --- a/aiogram/types/inline_query_result_voice.py +++ b/aiogram/types/inline_query_result_voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InlineQueryResultType from .base import UNSET_PARSE_MODE @@ -52,3 +52,48 @@ class InlineQueryResultVoice(InlineQueryResult): ] ] = None """*Optional*. Content of the message to be sent instead of the voice recording""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE, + id: str, + voice_url: str, + title: str, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + voice_duration: Optional[int] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + input_message_content: Optional[ + Union[ + InputTextMessageContent, + InputLocationMessageContent, + InputVenueMessageContent, + InputContactMessageContent, + InputInvoiceMessageContent, + ] + ] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + id=id, + voice_url=voice_url, + title=title, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + voice_duration=voice_duration, + reply_markup=reply_markup, + input_message_content=input_message_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/inline_query_results_button.py b/aiogram/types/inline_query_results_button.py index 0a6db30c..c93172bb 100644 --- a/aiogram/types/inline_query_results_button.py +++ b/aiogram/types/inline_query_results_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -21,3 +21,23 @@ class InlineQueryResultsButton(TelegramObject): """*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery `_ inside the Web App.""" start_parameter: Optional[str] = None """*Optional*. `Deep-linking `_ parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + web_app: Optional[WebAppInfo] = None, + start_parameter: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + text=text, web_app=web_app, start_parameter=start_parameter, **__pydantic_kwargs + ) diff --git a/aiogram/types/input_contact_message_content.py b/aiogram/types/input_contact_message_content.py index 2e5a7823..8bcb5819 100644 --- a/aiogram/types/input_contact_message_content.py +++ b/aiogram/types/input_contact_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .input_message_content import InputMessageContent @@ -20,3 +20,28 @@ class InputContactMessageContent(InputMessageContent): """*Optional*. Contact's last name""" vcard: Optional[str] = None """*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + phone_number: str, + first_name: str, + last_name: Optional[str] = None, + vcard: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + phone_number=phone_number, + first_name=first_name, + last_name=last_name, + vcard=vcard, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_file.py b/aiogram/types/input_file.py index 7ad8bee3..5b730598 100644 --- a/aiogram/types/input_file.py +++ b/aiogram/types/input_file.py @@ -4,15 +4,7 @@ import io import os from abc import ABC, abstractmethod from pathlib import Path -from typing import ( - TYPE_CHECKING, - Any, - AsyncGenerator, - AsyncIterator, - Dict, - Optional, - Union, -) +from typing import TYPE_CHECKING, Any, AsyncGenerator, Dict, Optional, Union import aiofiles diff --git a/aiogram/types/input_invoice_message_content.py b/aiogram/types/input_invoice_message_content.py index 4af5596d..af298dec 100644 --- a/aiogram/types/input_invoice_message_content.py +++ b/aiogram/types/input_invoice_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .input_message_content import InputMessageContent @@ -55,3 +55,60 @@ class InputInvoiceMessageContent(InputMessageContent): """*Optional*. Pass :code:`True` if the user's email address should be sent to provider""" is_flexible: Optional[bool] = None """*Optional*. Pass :code:`True` if the final price depends on the shipping method""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + payload: str, + provider_token: str, + currency: str, + prices: List[LabeledPrice], + max_tip_amount: Optional[int] = None, + suggested_tip_amounts: Optional[List[int]] = None, + provider_data: Optional[str] = None, + photo_url: Optional[str] = None, + photo_size: Optional[int] = None, + photo_width: Optional[int] = None, + photo_height: Optional[int] = None, + need_name: Optional[bool] = None, + need_phone_number: Optional[bool] = None, + need_email: Optional[bool] = None, + need_shipping_address: Optional[bool] = None, + send_phone_number_to_provider: Optional[bool] = None, + send_email_to_provider: Optional[bool] = None, + is_flexible: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + title=title, + description=description, + payload=payload, + provider_token=provider_token, + currency=currency, + prices=prices, + max_tip_amount=max_tip_amount, + suggested_tip_amounts=suggested_tip_amounts, + provider_data=provider_data, + photo_url=photo_url, + photo_size=photo_size, + photo_width=photo_width, + photo_height=photo_height, + need_name=need_name, + need_phone_number=need_phone_number, + need_email=need_email, + need_shipping_address=need_shipping_address, + send_phone_number_to_provider=send_phone_number_to_provider, + send_email_to_provider=send_email_to_provider, + is_flexible=is_flexible, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_location_message_content.py b/aiogram/types/input_location_message_content.py index 700532c2..ee4678a6 100644 --- a/aiogram/types/input_location_message_content.py +++ b/aiogram/types/input_location_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .input_message_content import InputMessageContent @@ -24,3 +24,32 @@ class InputLocationMessageContent(InputMessageContent): """*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" proximity_alert_radius: Optional[int] = None """*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + latitude: float, + longitude: float, + horizontal_accuracy: Optional[float] = None, + live_period: Optional[int] = None, + heading: Optional[int] = None, + proximity_alert_radius: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + latitude=latitude, + longitude=longitude, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index f0e1b860..72220db8 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InputMediaType from .base import UNSET_PARSE_MODE @@ -38,3 +38,40 @@ class InputMediaAnimation(InputMedia): """*Optional*. Animation duration in seconds""" has_spoiler: Optional[bool] = None """*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.ANIMATION] = InputMediaType.ANIMATION, + media: Union[str, InputFile], + thumbnail: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + width: Optional[int] = None, + height: Optional[int] = None, + duration: Optional[int] = None, + has_spoiler: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + width=width, + height=height, + duration=duration, + has_spoiler=has_spoiler, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_audio.py b/aiogram/types/input_media_audio.py index 4bfa74c2..c05513a0 100644 --- a/aiogram/types/input_media_audio.py +++ b/aiogram/types/input_media_audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InputMediaType from .base import UNSET_PARSE_MODE @@ -36,3 +36,38 @@ class InputMediaAudio(InputMedia): """*Optional*. Performer of the audio""" title: Optional[str] = None """*Optional*. Title of the audio""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.AUDIO] = InputMediaType.AUDIO, + media: Union[str, InputFile], + thumbnail: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + duration: Optional[int] = None, + performer: Optional[str] = None, + title: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + duration=duration, + performer=performer, + title=title, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_document.py b/aiogram/types/input_media_document.py index b749cdcb..121896b7 100644 --- a/aiogram/types/input_media_document.py +++ b/aiogram/types/input_media_document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InputMediaType from .base import UNSET_PARSE_MODE @@ -32,3 +32,34 @@ class InputMediaDocument(InputMedia): """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" disable_content_type_detection: Optional[bool] = None """*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always :code:`True`, if the document is sent as part of an album.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.DOCUMENT] = InputMediaType.DOCUMENT, + media: Union[str, InputFile], + thumbnail: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + disable_content_type_detection: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + disable_content_type_detection=disable_content_type_detection, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_photo.py b/aiogram/types/input_media_photo.py index 9128627b..d18330ac 100644 --- a/aiogram/types/input_media_photo.py +++ b/aiogram/types/input_media_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InputMediaType from .base import UNSET_PARSE_MODE @@ -30,3 +30,32 @@ class InputMediaPhoto(InputMedia): """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" has_spoiler: Optional[bool] = None """*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.PHOTO] = InputMediaType.PHOTO, + media: Union[str, InputFile], + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + has_spoiler=has_spoiler, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_media_video.py b/aiogram/types/input_media_video.py index b7479607..1c153d94 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union from ..enums import InputMediaType from .base import UNSET_PARSE_MODE @@ -40,3 +40,42 @@ class InputMediaVideo(InputMedia): """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" has_spoiler: Optional[bool] = None """*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO, + media: Union[str, InputFile], + thumbnail: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + caption_entities: Optional[List[MessageEntity]] = None, + width: Optional[int] = None, + height: Optional[int] = None, + duration: Optional[int] = None, + supports_streaming: Optional[bool] = None, + has_spoiler: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + media=media, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + width=width, + height=height, + duration=duration, + supports_streaming=supports_streaming, + has_spoiler=has_spoiler, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_sticker.py b/aiogram/types/input_sticker.py index 15765962..eebde128 100644 --- a/aiogram/types/input_sticker.py +++ b/aiogram/types/input_sticker.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, Any, List, Optional, Union from .base import TelegramObject @@ -24,3 +24,28 @@ class InputSticker(TelegramObject): """*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.""" keywords: Optional[List[str]] = None """*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + sticker: Union[InputFile, str], + emoji_list: List[str], + mask_position: Optional[MaskPosition] = None, + keywords: Optional[List[str]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + sticker=sticker, + emoji_list=emoji_list, + mask_position=mask_position, + keywords=keywords, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_text_message_content.py b/aiogram/types/input_text_message_content.py index 697696ce..57d5acba 100644 --- a/aiogram/types/input_text_message_content.py +++ b/aiogram/types/input_text_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PARSE_MODE from .input_message_content import InputMessageContent @@ -24,3 +24,28 @@ class InputTextMessageContent(InputMessageContent): """*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*""" disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW """*Optional*. Disables link previews for links in the sent message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + message_text: str, + parse_mode: Optional[str] = UNSET_PARSE_MODE, + entities: Optional[List[MessageEntity]] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + message_text=message_text, + parse_mode=parse_mode, + entities=entities, + disable_web_page_preview=disable_web_page_preview, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_venue_message_content.py b/aiogram/types/input_venue_message_content.py index f6ccd76f..48dd5c4e 100644 --- a/aiogram/types/input_venue_message_content.py +++ b/aiogram/types/input_venue_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .input_message_content import InputMessageContent @@ -28,3 +28,36 @@ class InputVenueMessageContent(InputMessageContent): """*Optional*. Google Places identifier of the venue""" google_place_type: Optional[str] = None """*Optional*. Google Places type of the venue. (See `supported types `_.)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + latitude: float, + longitude: float, + title: str, + address: str, + foursquare_id: Optional[str] = None, + foursquare_type: Optional[str] = None, + google_place_id: Optional[str] = None, + google_place_type: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + latitude=latitude, + longitude=longitude, + title=title, + address=address, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/invoice.py b/aiogram/types/invoice.py index 1e734895..f451ead0 100644 --- a/aiogram/types/invoice.py +++ b/aiogram/types/invoice.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -20,3 +22,30 @@ class Invoice(TelegramObject): """Three-letter ISO 4217 `currency `_ code""" total_amount: int """Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + description: str, + start_parameter: str, + currency: str, + total_amount: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + title=title, + description=description, + start_parameter=start_parameter, + currency=currency, + total_amount=total_amount, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/keyboard_button.py b/aiogram/types/keyboard_button.py index 08d4ce37..2c9e1834 100644 --- a/aiogram/types/keyboard_button.py +++ b/aiogram/types/keyboard_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import MutableTelegramObject @@ -39,3 +39,34 @@ class KeyboardButton(MutableTelegramObject): """*Optional*. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.""" web_app: Optional[WebAppInfo] = None """*Optional*. If specified, the described `Web App `_ will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + text: str, + request_user: Optional[KeyboardButtonRequestUser] = None, + request_chat: Optional[KeyboardButtonRequestChat] = None, + request_contact: Optional[bool] = None, + request_location: Optional[bool] = None, + request_poll: Optional[KeyboardButtonPollType] = None, + web_app: Optional[WebAppInfo] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + text=text, + request_user=request_user, + request_chat=request_chat, + request_contact=request_contact, + request_location=request_location, + request_poll=request_poll, + web_app=web_app, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/keyboard_button_poll_type.py b/aiogram/types/keyboard_button_poll_type.py index 2747adfb..07eadb7b 100644 --- a/aiogram/types/keyboard_button_poll_type.py +++ b/aiogram/types/keyboard_button_poll_type.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import MutableTelegramObject @@ -14,3 +14,16 @@ class KeyboardButtonPollType(MutableTelegramObject): type: Optional[str] = None """*Optional*. If *quiz* is passed, the user will be allowed to create only polls in the quiz mode. If *regular* is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, type: Optional[str] = None, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/keyboard_button_request_chat.py b/aiogram/types/keyboard_button_request_chat.py index 4b402c1b..24caf635 100644 --- a/aiogram/types/keyboard_button_request_chat.py +++ b/aiogram/types/keyboard_button_request_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from aiogram.types import TelegramObject @@ -31,3 +31,36 @@ class KeyboardButtonRequestChat(TelegramObject): """*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied.""" bot_is_member: Optional[bool] = None """*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + chat_is_channel: bool, + chat_is_forum: Optional[bool] = None, + chat_has_username: Optional[bool] = None, + chat_is_created: Optional[bool] = None, + user_administrator_rights: Optional[ChatAdministratorRights] = None, + bot_administrator_rights: Optional[ChatAdministratorRights] = None, + bot_is_member: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + request_id=request_id, + chat_is_channel=chat_is_channel, + chat_is_forum=chat_is_forum, + chat_has_username=chat_has_username, + chat_is_created=chat_is_created, + user_administrator_rights=user_administrator_rights, + bot_administrator_rights=bot_administrator_rights, + bot_is_member=bot_is_member, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/keyboard_button_request_user.py b/aiogram/types/keyboard_button_request_user.py index b6b33039..443f3403 100644 --- a/aiogram/types/keyboard_button_request_user.py +++ b/aiogram/types/keyboard_button_request_user.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from aiogram.types import TelegramObject @@ -16,3 +16,26 @@ class KeyboardButtonRequestUser(TelegramObject): """*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.""" user_is_premium: Optional[bool] = None """*Optional*. Pass :code:`True` to request a premium user, pass :code:`False` to request a non-premium user. If not specified, no additional restrictions are applied.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + user_is_bot: Optional[bool] = None, + user_is_premium: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + request_id=request_id, + user_is_bot=user_is_bot, + user_is_premium=user_is_premium, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/labeled_price.py b/aiogram/types/labeled_price.py index 3dcffb89..42d97af3 100644 --- a/aiogram/types/labeled_price.py +++ b/aiogram/types/labeled_price.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import MutableTelegramObject @@ -14,3 +16,16 @@ class LabeledPrice(MutableTelegramObject): """Portion label""" amount: int """Price of the product in the *smallest units* of the `currency `_ (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, label: str, amount: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(label=label, amount=amount, **__pydantic_kwargs) diff --git a/aiogram/types/location.py b/aiogram/types/location.py index bac5fc70..853e57b6 100644 --- a/aiogram/types/location.py +++ b/aiogram/types/location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -24,3 +24,32 @@ class Location(TelegramObject): """*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.""" proximity_alert_radius: Optional[int] = None """*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + longitude: float, + latitude: float, + horizontal_accuracy: Optional[float] = None, + live_period: Optional[int] = None, + heading: Optional[int] = None, + proximity_alert_radius: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + longitude=longitude, + latitude=latitude, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/login_url.py b/aiogram/types/login_url.py index 95a66eac..6f6c94af 100644 --- a/aiogram/types/login_url.py +++ b/aiogram/types/login_url.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -23,3 +23,28 @@ class LoginUrl(TelegramObject): """*Optional*. Username of a bot, which will be used for user authorization. See `Setting up a bot `_ for more details. If not specified, the current bot's username will be assumed. The *url*'s domain must be the same as the domain linked with the bot. See `Linking your domain to the bot `_ for more details.""" request_write_access: Optional[bool] = None """*Optional*. Pass :code:`True` to request the permission for your bot to send messages to the user.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + url: str, + forward_text: Optional[str] = None, + bot_username: Optional[str] = None, + request_write_access: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + url=url, + forward_text=forward_text, + bot_username=bot_username, + request_write_access=request_write_access, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/mask_position.py b/aiogram/types/mask_position.py index 3eea5bda..d02852ab 100644 --- a/aiogram/types/mask_position.py +++ b/aiogram/types/mask_position.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -18,3 +20,24 @@ class MaskPosition(TelegramObject): """Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.""" scale: float """Mask scaling coefficient. For example, 2.0 means double size.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + point: str, + x_shift: float, + y_shift: float, + scale: float, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + point=point, x_shift=x_shift, y_shift=y_shift, scale=scale, **__pydantic_kwargs + ) diff --git a/aiogram/types/menu_button.py b/aiogram/types/menu_button.py index b37c2390..a06814c9 100644 --- a/aiogram/types/menu_button.py +++ b/aiogram/types/menu_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import MutableTelegramObject @@ -27,3 +27,21 @@ class MenuButton(MutableTelegramObject): """*Optional*. Text on the button""" web_app: Optional[WebAppInfo] = None """*Optional*. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: str, + text: Optional[str] = None, + web_app: Optional[WebAppInfo] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, text=text, web_app=web_app, **__pydantic_kwargs) diff --git a/aiogram/types/menu_button_commands.py b/aiogram/types/menu_button_commands.py index e37e48cd..54ed20b1 100644 --- a/aiogram/types/menu_button_commands.py +++ b/aiogram/types/menu_button_commands.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import MenuButtonType from .menu_button import MenuButton @@ -15,3 +15,19 @@ class MenuButtonCommands(MenuButton): type: Literal[MenuButtonType.COMMANDS] = MenuButtonType.COMMANDS """Type of the button, must be *commands*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MenuButtonType.COMMANDS] = MenuButtonType.COMMANDS, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/menu_button_default.py b/aiogram/types/menu_button_default.py index 7b68803e..12ce30eb 100644 --- a/aiogram/types/menu_button_default.py +++ b/aiogram/types/menu_button_default.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import MenuButtonType from .menu_button import MenuButton @@ -15,3 +15,19 @@ class MenuButtonDefault(MenuButton): type: Literal[MenuButtonType.DEFAULT] = MenuButtonType.DEFAULT """Type of the button, must be *default*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MenuButtonType.DEFAULT] = MenuButtonType.DEFAULT, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/menu_button_web_app.py b/aiogram/types/menu_button_web_app.py index ab908afe..bd285211 100644 --- a/aiogram/types/menu_button_web_app.py +++ b/aiogram/types/menu_button_web_app.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import MenuButtonType from .menu_button import MenuButton @@ -22,3 +22,21 @@ class MenuButtonWebApp(MenuButton): """Text on the button""" web_app: WebAppInfo """Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[MenuButtonType.WEB_APP] = MenuButtonType.WEB_APP, + text: str, + web_app: WebAppInfo, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(type=type, text=text, web_app=web_app, **__pydantic_kwargs) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 3e14f8aa..96e751b8 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -249,6 +249,165 @@ class Message(TelegramObject): reply_markup: Optional[InlineKeyboardMarkup] = None """*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + message_id: int, + date: datetime.datetime, + chat: Chat, + message_thread_id: Optional[int] = None, + from_user: Optional[User] = None, + sender_chat: Optional[Chat] = None, + forward_from: Optional[User] = None, + forward_from_chat: Optional[Chat] = None, + forward_from_message_id: Optional[int] = None, + forward_signature: Optional[str] = None, + forward_sender_name: Optional[str] = None, + forward_date: Optional[int] = None, + is_topic_message: Optional[bool] = None, + is_automatic_forward: Optional[bool] = None, + reply_to_message: Optional[Message] = None, + via_bot: Optional[User] = None, + edit_date: Optional[int] = None, + has_protected_content: Optional[bool] = None, + media_group_id: Optional[str] = None, + author_signature: Optional[str] = None, + text: Optional[str] = None, + entities: Optional[List[MessageEntity]] = None, + animation: Optional[Animation] = None, + audio: Optional[Audio] = None, + document: Optional[Document] = None, + photo: Optional[List[PhotoSize]] = None, + sticker: Optional[Sticker] = None, + video: Optional[Video] = None, + video_note: Optional[VideoNote] = None, + voice: Optional[Voice] = None, + caption: Optional[str] = None, + caption_entities: Optional[List[MessageEntity]] = None, + has_media_spoiler: Optional[bool] = None, + contact: Optional[Contact] = None, + dice: Optional[Dice] = None, + game: Optional[Game] = None, + poll: Optional[Poll] = None, + venue: Optional[Venue] = None, + location: Optional[Location] = None, + new_chat_members: Optional[List[User]] = None, + left_chat_member: Optional[User] = None, + new_chat_title: Optional[str] = None, + new_chat_photo: Optional[List[PhotoSize]] = None, + delete_chat_photo: Optional[bool] = None, + group_chat_created: Optional[bool] = None, + supergroup_chat_created: Optional[bool] = None, + channel_chat_created: Optional[bool] = None, + message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None, + migrate_to_chat_id: Optional[int] = None, + migrate_from_chat_id: Optional[int] = None, + pinned_message: Optional[Message] = None, + invoice: Optional[Invoice] = None, + successful_payment: Optional[SuccessfulPayment] = None, + user_shared: Optional[UserShared] = None, + chat_shared: Optional[ChatShared] = None, + connected_website: Optional[str] = None, + write_access_allowed: Optional[WriteAccessAllowed] = None, + passport_data: Optional[PassportData] = None, + proximity_alert_triggered: Optional[ProximityAlertTriggered] = None, + forum_topic_created: Optional[ForumTopicCreated] = None, + forum_topic_edited: Optional[ForumTopicEdited] = None, + forum_topic_closed: Optional[ForumTopicClosed] = None, + forum_topic_reopened: Optional[ForumTopicReopened] = None, + general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None, + general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None, + video_chat_scheduled: Optional[VideoChatScheduled] = None, + video_chat_started: Optional[VideoChatStarted] = None, + video_chat_ended: Optional[VideoChatEnded] = None, + video_chat_participants_invited: Optional[VideoChatParticipantsInvited] = None, + web_app_data: Optional[WebAppData] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + message_id=message_id, + date=date, + chat=chat, + message_thread_id=message_thread_id, + from_user=from_user, + sender_chat=sender_chat, + forward_from=forward_from, + forward_from_chat=forward_from_chat, + forward_from_message_id=forward_from_message_id, + forward_signature=forward_signature, + forward_sender_name=forward_sender_name, + forward_date=forward_date, + is_topic_message=is_topic_message, + is_automatic_forward=is_automatic_forward, + reply_to_message=reply_to_message, + via_bot=via_bot, + edit_date=edit_date, + has_protected_content=has_protected_content, + media_group_id=media_group_id, + author_signature=author_signature, + text=text, + entities=entities, + animation=animation, + audio=audio, + document=document, + photo=photo, + sticker=sticker, + video=video, + video_note=video_note, + voice=voice, + caption=caption, + caption_entities=caption_entities, + has_media_spoiler=has_media_spoiler, + contact=contact, + dice=dice, + game=game, + poll=poll, + venue=venue, + location=location, + new_chat_members=new_chat_members, + left_chat_member=left_chat_member, + new_chat_title=new_chat_title, + new_chat_photo=new_chat_photo, + delete_chat_photo=delete_chat_photo, + group_chat_created=group_chat_created, + supergroup_chat_created=supergroup_chat_created, + channel_chat_created=channel_chat_created, + message_auto_delete_timer_changed=message_auto_delete_timer_changed, + migrate_to_chat_id=migrate_to_chat_id, + migrate_from_chat_id=migrate_from_chat_id, + pinned_message=pinned_message, + invoice=invoice, + successful_payment=successful_payment, + user_shared=user_shared, + chat_shared=chat_shared, + connected_website=connected_website, + write_access_allowed=write_access_allowed, + passport_data=passport_data, + proximity_alert_triggered=proximity_alert_triggered, + forum_topic_created=forum_topic_created, + forum_topic_edited=forum_topic_edited, + forum_topic_closed=forum_topic_closed, + forum_topic_reopened=forum_topic_reopened, + general_forum_topic_hidden=general_forum_topic_hidden, + general_forum_topic_unhidden=general_forum_topic_unhidden, + video_chat_scheduled=video_chat_scheduled, + video_chat_started=video_chat_started, + video_chat_ended=video_chat_ended, + video_chat_participants_invited=video_chat_participants_invited, + web_app_data=web_app_data, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) + @property def content_type(self) -> str: if self.text: diff --git a/aiogram/types/message_auto_delete_timer_changed.py b/aiogram/types/message_auto_delete_timer_changed.py index 4957f08e..8414a247 100644 --- a/aiogram/types/message_auto_delete_timer_changed.py +++ b/aiogram/types/message_auto_delete_timer_changed.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -12,3 +14,18 @@ class MessageAutoDeleteTimerChanged(TelegramObject): message_auto_delete_time: int """New auto-delete time for messages in the chat; in seconds""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, message_auto_delete_time: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + message_auto_delete_time=message_auto_delete_time, **__pydantic_kwargs + ) diff --git a/aiogram/types/message_entity.py b/aiogram/types/message_entity.py index 39773a66..79ba5980 100644 --- a/aiogram/types/message_entity.py +++ b/aiogram/types/message_entity.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from ..utils.text_decorations import add_surrogates, remove_surrogates from .base import MutableTelegramObject @@ -31,6 +31,37 @@ class MessageEntity(MutableTelegramObject): custom_emoji_id: Optional[str] = None """*Optional*. For 'custom_emoji' only, unique identifier of the custom emoji. Use :class:`aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers` to get full information about the sticker""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: str, + offset: int, + length: int, + url: Optional[str] = None, + user: Optional[User] = None, + language: Optional[str] = None, + custom_emoji_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + offset=offset, + length=length, + url=url, + user=user, + language=language, + custom_emoji_id=custom_emoji_id, + **__pydantic_kwargs, + ) + def extract_from(self, text: str) -> str: return remove_surrogates( add_surrogates(text)[self.offset * 2 : (self.offset + self.length) * 2] diff --git a/aiogram/types/message_id.py b/aiogram/types/message_id.py index edd4784c..d50888f8 100644 --- a/aiogram/types/message_id.py +++ b/aiogram/types/message_id.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -12,3 +14,14 @@ class MessageId(TelegramObject): message_id: int """Unique message identifier""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, message_id: int, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(message_id=message_id, **__pydantic_kwargs) diff --git a/aiogram/types/order_info.py b/aiogram/types/order_info.py index bf354b5e..5d71f657 100644 --- a/aiogram/types/order_info.py +++ b/aiogram/types/order_info.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -23,3 +23,28 @@ class OrderInfo(TelegramObject): """*Optional*. User email""" shipping_address: Optional[ShippingAddress] = None """*Optional*. User shipping address""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: Optional[str] = None, + phone_number: Optional[str] = None, + email: Optional[str] = None, + shipping_address: Optional[ShippingAddress] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + name=name, + phone_number=phone_number, + email=email, + shipping_address=shipping_address, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_data.py b/aiogram/types/passport_data.py index 18523c05..d93af1f0 100644 --- a/aiogram/types/passport_data.py +++ b/aiogram/types/passport_data.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Any, List from .base import TelegramObject @@ -20,3 +20,20 @@ class PassportData(TelegramObject): """Array with information about documents and other Telegram Passport elements that was shared with the bot""" credentials: EncryptedCredentials """Encrypted credentials required to decrypt the data""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + data: List[EncryptedPassportElement], + credentials: EncryptedCredentials, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(data=data, credentials=credentials, **__pydantic_kwargs) diff --git a/aiogram/types/passport_element_error_data_field.py b/aiogram/types/passport_element_error_data_field.py index 76a6d93a..3bf2bb28 100644 --- a/aiogram/types/passport_element_error_data_field.py +++ b/aiogram/types/passport_element_error_data_field.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -23,3 +23,30 @@ class PassportElementErrorDataField(PassportElementError): """Base64-encoded data hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.DATA] = PassportElementErrorType.DATA, + type: str, + field_name: str, + data_hash: str, + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, + type=type, + field_name=field_name, + data_hash=data_hash, + message=message, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_element_error_file.py b/aiogram/types/passport_element_error_file.py index 74512eea..8bc40b3e 100644 --- a/aiogram/types/passport_element_error_file.py +++ b/aiogram/types/passport_element_error_file.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -21,3 +21,24 @@ class PassportElementErrorFile(PassportElementError): """Base64-encoded file hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.FILE] = PassportElementErrorType.FILE, + type: str, + file_hash: str, + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_files.py b/aiogram/types/passport_element_error_files.py index 020f7a99..3639da26 100644 --- a/aiogram/types/passport_element_error_files.py +++ b/aiogram/types/passport_element_error_files.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Literal +from typing import TYPE_CHECKING, Any, List, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -21,3 +21,28 @@ class PassportElementErrorFiles(PassportElementError): """List of base64-encoded file hashes""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.FILES] = PassportElementErrorType.FILES, + type: str, + file_hashes: List[str], + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, + type=type, + file_hashes=file_hashes, + message=message, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_element_error_front_side.py b/aiogram/types/passport_element_error_front_side.py index f3b4dd2f..86315f23 100644 --- a/aiogram/types/passport_element_error_front_side.py +++ b/aiogram/types/passport_element_error_front_side.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -21,3 +21,26 @@ class PassportElementErrorFrontSide(PassportElementError): """Base64-encoded hash of the file with the front side of the document""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.FRONT_SIDE + ] = PassportElementErrorType.FRONT_SIDE, + type: str, + file_hash: str, + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_reverse_side.py b/aiogram/types/passport_element_error_reverse_side.py index 18929df6..ecb400f4 100644 --- a/aiogram/types/passport_element_error_reverse_side.py +++ b/aiogram/types/passport_element_error_reverse_side.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -21,3 +21,26 @@ class PassportElementErrorReverseSide(PassportElementError): """Base64-encoded hash of the file with the reverse side of the document""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.REVERSE_SIDE + ] = PassportElementErrorType.REVERSE_SIDE, + type: str, + file_hash: str, + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_selfie.py b/aiogram/types/passport_element_error_selfie.py index 003bfec6..bff6dd61 100644 --- a/aiogram/types/passport_element_error_selfie.py +++ b/aiogram/types/passport_element_error_selfie.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -21,3 +21,24 @@ class PassportElementErrorSelfie(PassportElementError): """Base64-encoded hash of the file with the selfie""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[PassportElementErrorType.SELFIE] = PassportElementErrorType.SELFIE, + type: str, + file_hash: str, + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_translation_file.py b/aiogram/types/passport_element_error_translation_file.py index aac4268e..a8a207c4 100644 --- a/aiogram/types/passport_element_error_translation_file.py +++ b/aiogram/types/passport_element_error_translation_file.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -23,3 +23,26 @@ class PassportElementErrorTranslationFile(PassportElementError): """Base64-encoded file hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.TRANSLATION_FILE + ] = PassportElementErrorType.TRANSLATION_FILE, + type: str, + file_hash: str, + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs + ) diff --git a/aiogram/types/passport_element_error_translation_files.py b/aiogram/types/passport_element_error_translation_files.py index 427c6468..0d8ff504 100644 --- a/aiogram/types/passport_element_error_translation_files.py +++ b/aiogram/types/passport_element_error_translation_files.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Literal +from typing import TYPE_CHECKING, Any, List, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -23,3 +23,30 @@ class PassportElementErrorTranslationFiles(PassportElementError): """List of base64-encoded file hashes""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.TRANSLATION_FILES + ] = PassportElementErrorType.TRANSLATION_FILES, + type: str, + file_hashes: List[str], + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, + type=type, + file_hashes=file_hashes, + message=message, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_element_error_unspecified.py b/aiogram/types/passport_element_error_unspecified.py index 5e8d88e7..3575d350 100644 --- a/aiogram/types/passport_element_error_unspecified.py +++ b/aiogram/types/passport_element_error_unspecified.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -21,3 +21,30 @@ class PassportElementErrorUnspecified(PassportElementError): """Base64-encoded element hash""" message: str """Error message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + source: Literal[ + PassportElementErrorType.UNSPECIFIED + ] = PassportElementErrorType.UNSPECIFIED, + type: str, + element_hash: str, + message: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + source=source, + type=type, + element_hash=element_hash, + message=message, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/passport_file.py b/aiogram/types/passport_file.py index 11a388f8..1e80048b 100644 --- a/aiogram/types/passport_file.py +++ b/aiogram/types/passport_file.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -18,3 +20,28 @@ class PassportFile(TelegramObject): """File size in bytes""" file_date: int """Unix time when the file was uploaded""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + file_size: int, + file_date: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + file_size=file_size, + file_date=file_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/photo_size.py b/aiogram/types/photo_size.py index 0b23b377..9a2ccbe1 100644 --- a/aiogram/types/photo_size.py +++ b/aiogram/types/photo_size.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -22,3 +22,30 @@ class PhotoSize(TelegramObject): """Photo height""" file_size: Optional[int] = None """*Optional*. File size in bytes""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + width: int, + height: int, + file_size: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + width=width, + height=height, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/poll.py b/aiogram/types/poll.py index fb979a58..8b2c8524 100644 --- a/aiogram/types/poll.py +++ b/aiogram/types/poll.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import TelegramObject @@ -43,3 +43,46 @@ class Poll(TelegramObject): """*Optional*. Amount of time in seconds the poll will be active after creation""" close_date: Optional[datetime.datetime] = None """*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + question: str, + options: List[PollOption], + total_voter_count: int, + is_closed: bool, + is_anonymous: bool, + type: str, + allows_multiple_answers: bool, + correct_option_id: Optional[int] = None, + explanation: Optional[str] = None, + explanation_entities: Optional[List[MessageEntity]] = None, + open_period: Optional[int] = None, + close_date: Optional[datetime.datetime] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + question=question, + options=options, + total_voter_count=total_voter_count, + is_closed=is_closed, + is_anonymous=is_anonymous, + type=type, + allows_multiple_answers=allows_multiple_answers, + correct_option_id=correct_option_id, + explanation=explanation, + explanation_entities=explanation_entities, + open_period=open_period, + close_date=close_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/poll_answer.py b/aiogram/types/poll_answer.py index c2cd7456..beb6ef09 100644 --- a/aiogram/types/poll_answer.py +++ b/aiogram/types/poll_answer.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Any, List from .base import TelegramObject @@ -21,3 +21,23 @@ class PollAnswer(TelegramObject): """The user, who changed the answer to the poll""" option_ids: List[int] """0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + poll_id: str, + user: User, + option_ids: List[int], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + poll_id=poll_id, user=user, option_ids=option_ids, **__pydantic_kwargs + ) diff --git a/aiogram/types/poll_option.py b/aiogram/types/poll_option.py index cb69aa49..f3059f01 100644 --- a/aiogram/types/poll_option.py +++ b/aiogram/types/poll_option.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -14,3 +16,16 @@ class PollOption(TelegramObject): """Option text, 1-100 characters""" voter_count: int """Number of users that voted for this option""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, text: str, voter_count: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(text=text, voter_count=voter_count, **__pydantic_kwargs) diff --git a/aiogram/types/pre_checkout_query.py b/aiogram/types/pre_checkout_query.py index 1084e76a..6c10650f 100644 --- a/aiogram/types/pre_checkout_query.py +++ b/aiogram/types/pre_checkout_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional, Any +from typing import TYPE_CHECKING, Any, Optional from pydantic import Field @@ -34,6 +34,37 @@ class PreCheckoutQuery(TelegramObject): order_info: Optional[OrderInfo] = None """*Optional*. Order information provided by the user""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + currency: str, + total_amount: int, + invoice_payload: str, + shipping_option_id: Optional[str] = None, + order_info: Optional[OrderInfo] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + from_user=from_user, + currency=currency, + total_amount=total_amount, + invoice_payload=invoice_payload, + shipping_option_id=shipping_option_id, + order_info=order_info, + **__pydantic_kwargs, + ) + def answer( self, ok: bool, diff --git a/aiogram/types/proximity_alert_triggered.py b/aiogram/types/proximity_alert_triggered.py index 8275cd26..f5a30c69 100644 --- a/aiogram/types/proximity_alert_triggered.py +++ b/aiogram/types/proximity_alert_triggered.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -21,3 +21,23 @@ class ProximityAlertTriggered(TelegramObject): """User that set the alert""" distance: int """The distance between the users""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + traveler: User, + watcher: User, + distance: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + traveler=traveler, watcher=watcher, distance=distance, **__pydantic_kwargs + ) diff --git a/aiogram/types/reply_keyboard_markup.py b/aiogram/types/reply_keyboard_markup.py index da2f6214..feaa382b 100644 --- a/aiogram/types/reply_keyboard_markup.py +++ b/aiogram/types/reply_keyboard_markup.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import MutableTelegramObject @@ -27,3 +27,32 @@ class ReplyKeyboardMarkup(MutableTelegramObject): """*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters""" selective: Optional[bool] = None """*Optional*. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + keyboard: List[List[KeyboardButton]], + is_persistent: Optional[bool] = None, + resize_keyboard: Optional[bool] = None, + one_time_keyboard: Optional[bool] = None, + input_field_placeholder: Optional[str] = None, + selective: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + keyboard=keyboard, + is_persistent=is_persistent, + resize_keyboard=resize_keyboard, + one_time_keyboard=one_time_keyboard, + input_field_placeholder=input_field_placeholder, + selective=selective, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/reply_keyboard_remove.py b/aiogram/types/reply_keyboard_remove.py index 0260ab6c..5737db3f 100644 --- a/aiogram/types/reply_keyboard_remove.py +++ b/aiogram/types/reply_keyboard_remove.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal, Optional +from typing import TYPE_CHECKING, Any, Literal, Optional from .base import MutableTelegramObject @@ -16,3 +16,22 @@ class ReplyKeyboardRemove(MutableTelegramObject): """Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use *one_time_keyboard* in :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`)""" selective: Optional[bool] = None """*Optional*. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + remove_keyboard: Literal[True] = True, + selective: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + remove_keyboard=remove_keyboard, selective=selective, **__pydantic_kwargs + ) diff --git a/aiogram/types/response_parameters.py b/aiogram/types/response_parameters.py index dd3531c2..19fc54fb 100644 --- a/aiogram/types/response_parameters.py +++ b/aiogram/types/response_parameters.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -16,3 +16,22 @@ class ResponseParameters(TelegramObject): """*Optional*. The group has been migrated to a supergroup with the specified identifier. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.""" retry_after: Optional[int] = None """*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + migrate_to_chat_id: Optional[int] = None, + retry_after: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + migrate_to_chat_id=migrate_to_chat_id, retry_after=retry_after, **__pydantic_kwargs + ) diff --git a/aiogram/types/sent_web_app_message.py b/aiogram/types/sent_web_app_message.py index 7162d9b7..e8241a5f 100644 --- a/aiogram/types/sent_web_app_message.py +++ b/aiogram/types/sent_web_app_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -14,3 +14,19 @@ class SentWebAppMessage(TelegramObject): inline_message_id: Optional[str] = None """*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + inline_message_id: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(inline_message_id=inline_message_id, **__pydantic_kwargs) diff --git a/aiogram/types/shipping_address.py b/aiogram/types/shipping_address.py index 948956ce..735e2ce3 100644 --- a/aiogram/types/shipping_address.py +++ b/aiogram/types/shipping_address.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -22,3 +24,32 @@ class ShippingAddress(TelegramObject): """Second line for the address""" post_code: str """Address post code""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + country_code: str, + state: str, + city: str, + street_line1: str, + street_line2: str, + post_code: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + country_code=country_code, + state=state, + city=city, + street_line1=street_line1, + street_line2=street_line2, + post_code=post_code, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/shipping_option.py b/aiogram/types/shipping_option.py index 6caa84a5..b0274518 100644 --- a/aiogram/types/shipping_option.py +++ b/aiogram/types/shipping_option.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Any, List from .base import TelegramObject @@ -21,3 +21,21 @@ class ShippingOption(TelegramObject): """Option title""" prices: List[LabeledPrice] """List of price portions""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + title: str, + prices: List[LabeledPrice], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(id=id, title=title, prices=prices, **__pydantic_kwargs) diff --git a/aiogram/types/shipping_query.py b/aiogram/types/shipping_query.py index e1bbeca3..8f3cd88d 100644 --- a/aiogram/types/shipping_query.py +++ b/aiogram/types/shipping_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional, Any +from typing import TYPE_CHECKING, Any, List, Optional from pydantic import Field @@ -29,6 +29,31 @@ class ShippingQuery(TelegramObject): shipping_address: ShippingAddress """User specified shipping address""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + from_user: User, + invoice_payload: str, + shipping_address: ShippingAddress, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + from_user=from_user, + invoice_payload=invoice_payload, + shipping_address=shipping_address, + **__pydantic_kwargs, + ) + def answer( self, ok: bool, diff --git a/aiogram/types/sticker.py b/aiogram/types/sticker.py index cb453b32..4c1b8646 100644 --- a/aiogram/types/sticker.py +++ b/aiogram/types/sticker.py @@ -49,6 +49,53 @@ class Sticker(TelegramObject): file_size: Optional[int] = None """*Optional*. File size in bytes""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + type: str, + width: int, + height: int, + is_animated: bool, + is_video: bool, + thumbnail: Optional[PhotoSize] = None, + emoji: Optional[str] = None, + set_name: Optional[str] = None, + premium_animation: Optional[File] = None, + mask_position: Optional[MaskPosition] = None, + custom_emoji_id: Optional[str] = None, + needs_repainting: Optional[bool] = None, + file_size: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + type=type, + width=width, + height=height, + is_animated=is_animated, + is_video=is_video, + thumbnail=thumbnail, + emoji=emoji, + set_name=set_name, + premium_animation=premium_animation, + mask_position=mask_position, + custom_emoji_id=custom_emoji_id, + needs_repainting=needs_repainting, + file_size=file_size, + **__pydantic_kwargs, + ) + def set_position_in_set( self, position: int, diff --git a/aiogram/types/sticker_set.py b/aiogram/types/sticker_set.py index d212acd0..81747747 100644 --- a/aiogram/types/sticker_set.py +++ b/aiogram/types/sticker_set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import TelegramObject @@ -30,3 +30,34 @@ class StickerSet(TelegramObject): """List of all set stickers""" thumbnail: Optional[PhotoSize] = None """*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + title: str, + sticker_type: str, + is_animated: bool, + is_video: bool, + stickers: List[Sticker], + thumbnail: Optional[PhotoSize] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + name=name, + title=title, + sticker_type=sticker_type, + is_animated=is_animated, + is_video=is_video, + stickers=stickers, + thumbnail=thumbnail, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/successful_payment.py b/aiogram/types/successful_payment.py index d8b0e90c..97dcefe5 100644 --- a/aiogram/types/successful_payment.py +++ b/aiogram/types/successful_payment.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -29,3 +29,34 @@ class SuccessfulPayment(TelegramObject): """*Optional*. Identifier of the shipping option chosen by the user""" order_info: Optional[OrderInfo] = None """*Optional*. Order information provided by the user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + currency: str, + total_amount: int, + invoice_payload: str, + telegram_payment_charge_id: str, + provider_payment_charge_id: str, + shipping_option_id: Optional[str] = None, + order_info: Optional[OrderInfo] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + currency=currency, + total_amount=total_amount, + invoice_payload=invoice_payload, + telegram_payment_charge_id=telegram_payment_charge_id, + provider_payment_charge_id=provider_payment_charge_id, + shipping_option_id=shipping_option_id, + order_info=order_info, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/switch_inline_query_chosen_chat.py b/aiogram/types/switch_inline_query_chosen_chat.py index f0a2e84f..9a25dca5 100644 --- a/aiogram/types/switch_inline_query_chosen_chat.py +++ b/aiogram/types/switch_inline_query_chosen_chat.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -20,3 +20,30 @@ class SwitchInlineQueryChosenChat(TelegramObject): """*Optional*. True, if group and supergroup chats can be chosen""" allow_channel_chats: Optional[bool] = None """*Optional*. True, if channel chats can be chosen""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + query: Optional[str] = None, + allow_user_chats: Optional[bool] = None, + allow_bot_chats: Optional[bool] = None, + allow_group_chats: Optional[bool] = None, + allow_channel_chats: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + query=query, + allow_user_chats=allow_user_chats, + allow_bot_chats=allow_bot_chats, + allow_group_chats=allow_group_chats, + allow_channel_chats=allow_channel_chats, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/update.py b/aiogram/types/update.py index 9f9eb413..dbaa3222 100644 --- a/aiogram/types/update.py +++ b/aiogram/types/update.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional, cast +from typing import TYPE_CHECKING, Any, Optional, cast from ..utils.mypy_hacks import lru_cache from .base import TelegramObject @@ -58,6 +58,53 @@ class Update(TelegramObject): 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.""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + update_id: int, + message: Optional[Message] = None, + edited_message: Optional[Message] = None, + channel_post: Optional[Message] = None, + edited_channel_post: Optional[Message] = None, + inline_query: Optional[InlineQuery] = None, + chosen_inline_result: Optional[ChosenInlineResult] = None, + callback_query: Optional[CallbackQuery] = None, + shipping_query: Optional[ShippingQuery] = None, + pre_checkout_query: Optional[PreCheckoutQuery] = None, + poll: Optional[Poll] = None, + poll_answer: Optional[PollAnswer] = None, + my_chat_member: Optional[ChatMemberUpdated] = None, + chat_member: Optional[ChatMemberUpdated] = None, + chat_join_request: Optional[ChatJoinRequest] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + update_id=update_id, + message=message, + edited_message=edited_message, + channel_post=channel_post, + edited_channel_post=edited_channel_post, + inline_query=inline_query, + chosen_inline_result=chosen_inline_result, + callback_query=callback_query, + shipping_query=shipping_query, + pre_checkout_query=pre_checkout_query, + poll=poll, + poll_answer=poll_answer, + my_chat_member=my_chat_member, + chat_member=chat_member, + chat_join_request=chat_join_request, + **__pydantic_kwargs, + ) + def __hash__(self) -> int: return hash((type(self), self.update_id)) diff --git a/aiogram/types/user.py b/aiogram/types/user.py index de1941fb..571447cd 100644 --- a/aiogram/types/user.py +++ b/aiogram/types/user.py @@ -40,6 +40,45 @@ class User(TelegramObject): supports_inline_queries: Optional[bool] = None """*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + is_bot: bool, + first_name: str, + last_name: Optional[str] = None, + username: Optional[str] = None, + language_code: Optional[str] = None, + is_premium: Optional[bool] = None, + added_to_attachment_menu: Optional[bool] = None, + can_join_groups: Optional[bool] = None, + can_read_all_group_messages: Optional[bool] = None, + supports_inline_queries: Optional[bool] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + id=id, + is_bot=is_bot, + first_name=first_name, + last_name=last_name, + username=username, + language_code=language_code, + is_premium=is_premium, + added_to_attachment_menu=added_to_attachment_menu, + can_join_groups=can_join_groups, + can_read_all_group_messages=can_read_all_group_messages, + supports_inline_queries=supports_inline_queries, + **__pydantic_kwargs, + ) + @property def full_name(self) -> str: if self.last_name: diff --git a/aiogram/types/user_profile_photos.py b/aiogram/types/user_profile_photos.py index ad1197bf..c1c5d28d 100644 --- a/aiogram/types/user_profile_photos.py +++ b/aiogram/types/user_profile_photos.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Any, List from .base import TelegramObject @@ -19,3 +19,20 @@ class UserProfilePhotos(TelegramObject): """Total number of profile pictures the target user has""" photos: List[List[PhotoSize]] """Requested profile pictures (in up to 4 sizes each)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + total_count: int, + photos: List[List[PhotoSize]], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(total_count=total_count, photos=photos, **__pydantic_kwargs) diff --git a/aiogram/types/user_shared.py b/aiogram/types/user_shared.py index f9bf4fbb..65305679 100644 --- a/aiogram/types/user_shared.py +++ b/aiogram/types/user_shared.py @@ -1,3 +1,5 @@ +from typing import TYPE_CHECKING, Any + from aiogram.types import TelegramObject @@ -12,3 +14,16 @@ class UserShared(TelegramObject): """Identifier of the request""" user_id: int """Identifier of the shared user. 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 may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, request_id: int, user_id: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(request_id=request_id, user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/types/venue.py b/aiogram/types/venue.py index 49caceff..e0a3f848 100644 --- a/aiogram/types/venue.py +++ b/aiogram/types/venue.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -29,3 +29,34 @@ class Venue(TelegramObject): """*Optional*. Google Places identifier of the venue""" google_place_type: Optional[str] = None """*Optional*. Google Places type of the venue. (See `supported types `_.)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + location: Location, + title: str, + address: str, + foursquare_id: Optional[str] = None, + foursquare_type: Optional[str] = None, + google_place_id: Optional[str] = None, + google_place_type: Optional[str] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + location=location, + title=title, + address=address, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/video.py b/aiogram/types/video.py index ca43493a..e9936091 100644 --- a/aiogram/types/video.py +++ b/aiogram/types/video.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -33,3 +33,38 @@ class Video(TelegramObject): """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + width: int, + height: int, + duration: int, + thumbnail: Optional[PhotoSize] = None, + file_name: Optional[str] = None, + mime_type: Optional[str] = None, + file_size: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + width=width, + height=height, + duration=duration, + thumbnail=thumbnail, + file_name=file_name, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/video_chat_ended.py b/aiogram/types/video_chat_ended.py index d890a153..289eb722 100644 --- a/aiogram/types/video_chat_ended.py +++ b/aiogram/types/video_chat_ended.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -12,3 +14,14 @@ class VideoChatEnded(TelegramObject): duration: int """Video chat duration in seconds""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, duration: int, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(duration=duration, **__pydantic_kwargs) diff --git a/aiogram/types/video_chat_participants_invited.py b/aiogram/types/video_chat_participants_invited.py index 3361f8ee..74e1a357 100644 --- a/aiogram/types/video_chat_participants_invited.py +++ b/aiogram/types/video_chat_participants_invited.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Any, List from .base import TelegramObject @@ -17,3 +17,14 @@ class VideoChatParticipantsInvited(TelegramObject): users: List[User] """New members that were invited to the video chat""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, users: List[User], **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(users=users, **__pydantic_kwargs) diff --git a/aiogram/types/video_chat_scheduled.py b/aiogram/types/video_chat_scheduled.py index 508b1ce3..c1563627 100644 --- a/aiogram/types/video_chat_scheduled.py +++ b/aiogram/types/video_chat_scheduled.py @@ -1,6 +1,7 @@ from __future__ import annotations import datetime +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -14,3 +15,16 @@ class VideoChatScheduled(TelegramObject): start_date: datetime.datetime """Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, start_date: datetime.datetime, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(start_date=start_date, **__pydantic_kwargs) diff --git a/aiogram/types/video_note.py b/aiogram/types/video_note.py index 03654824..4caa1170 100644 --- a/aiogram/types/video_note.py +++ b/aiogram/types/video_note.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -27,3 +27,32 @@ class VideoNote(TelegramObject): """*Optional*. Video thumbnail""" file_size: Optional[int] = None """*Optional*. File size in bytes""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + length: int, + duration: int, + thumbnail: Optional[PhotoSize] = None, + file_size: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + length=length, + duration=duration, + thumbnail=thumbnail, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/voice.py b/aiogram/types/voice.py index 53724ad0..d16729c9 100644 --- a/aiogram/types/voice.py +++ b/aiogram/types/voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject @@ -22,3 +22,30 @@ class Voice(TelegramObject): """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + duration: int, + mime_type: Optional[str] = None, + file_size: Optional[int] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + file_id=file_id, + file_unique_id=file_unique_id, + duration=duration, + mime_type=mime_type, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/web_app_data.py b/aiogram/types/web_app_data.py index 09676292..8fac379f 100644 --- a/aiogram/types/web_app_data.py +++ b/aiogram/types/web_app_data.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -14,3 +16,16 @@ class WebAppData(TelegramObject): """The data. Be aware that a bad client can send arbitrary data in this field.""" button_text: str """Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, data: str, button_text: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(data=data, button_text=button_text, **__pydantic_kwargs) diff --git a/aiogram/types/web_app_info.py b/aiogram/types/web_app_info.py index b315846e..01d00d3d 100644 --- a/aiogram/types/web_app_info.py +++ b/aiogram/types/web_app_info.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any + from .base import TelegramObject @@ -12,3 +14,14 @@ class WebAppInfo(TelegramObject): url: str """An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps `_""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, url: str, **__pydantic_kwargs: Any) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(url=url, **__pydantic_kwargs) diff --git a/aiogram/types/webhook_info.py b/aiogram/types/webhook_info.py index e08df0d6..ed19b342 100644 --- a/aiogram/types/webhook_info.py +++ b/aiogram/types/webhook_info.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import List, Optional +from typing import TYPE_CHECKING, Any, List, Optional from .base import TelegramObject @@ -31,3 +31,38 @@ class WebhookInfo(TelegramObject): """*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" allowed_updates: Optional[List[str]] = None """*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + url: str, + has_custom_certificate: bool, + pending_update_count: int, + ip_address: Optional[str] = None, + last_error_date: Optional[datetime.datetime] = None, + last_error_message: Optional[str] = None, + last_synchronization_error_date: Optional[datetime.datetime] = None, + max_connections: Optional[int] = None, + allowed_updates: Optional[List[str]] = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + url=url, + has_custom_certificate=has_custom_certificate, + pending_update_count=pending_update_count, + ip_address=ip_address, + last_error_date=last_error_date, + last_error_message=last_error_message, + last_synchronization_error_date=last_synchronization_error_date, + max_connections=max_connections, + allowed_updates=allowed_updates, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/write_access_allowed.py b/aiogram/types/write_access_allowed.py index 32924410..eb8b1d14 100644 --- a/aiogram/types/write_access_allowed.py +++ b/aiogram/types/write_access_allowed.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import TYPE_CHECKING, Any, Optional from aiogram.types import TelegramObject @@ -12,3 +12,16 @@ class WriteAccessAllowed(TelegramObject): web_app_name: Optional[str] = None """*Optional*. Name of the Web App which was launched from a link""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, web_app_name: Optional[str] = None, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(web_app_name=web_app_name, **__pydantic_kwargs) diff --git a/docs/api/methods/answer_pre_checkout_query.rst b/docs/api/methods/answer_pre_checkout_query.rst index e0ae9694..46197e4a 100644 --- a/docs/api/methods/answer_pre_checkout_query.rst +++ b/docs/api/methods/answer_pre_checkout_query.rst @@ -43,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return AnswerPreCheckoutQuery(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.pre_checkout_query.PreCheckoutQuery.answer` diff --git a/docs/api/methods/answer_shipping_query.rst b/docs/api/methods/answer_shipping_query.rst index d1854376..de381d0c 100644 --- a/docs/api/methods/answer_shipping_query.rst +++ b/docs/api/methods/answer_shipping_query.rst @@ -43,3 +43,9 @@ As reply into Webhook in handler .. code-block:: python return AnswerShippingQuery(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.shipping_query.ShippingQuery.answer` diff --git a/docs/api/methods/edit_message_reply_markup.rst b/docs/api/methods/edit_message_reply_markup.rst index 6f814c2e..6d67bdbe 100644 --- a/docs/api/methods/edit_message_reply_markup.rst +++ b/docs/api/methods/edit_message_reply_markup.rst @@ -49,3 +49,4 @@ As shortcut from received object -------------------------------- - :meth:`aiogram.types.message.Message.edit_reply_markup` +- :meth:`aiogram.types.message.Message.delete_reply_markup` diff --git a/pyproject.toml b/pyproject.toml index a50e9449..ab181ad4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,7 +148,7 @@ features = [ "test", ] extra-dependencies = [ - "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.17" + "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.21" ] [tool.hatch.envs.dev.scripts]