diff --git a/.butcher/enums/InputProfileType.yml b/.butcher/enums/InputProfileType.yml index 6a1660af..4128aa83 100644 --- a/.butcher/enums/InputProfileType.yml +++ b/.butcher/enums/InputProfileType.yml @@ -5,7 +5,7 @@ description: | Source: https://core.telegram.org/bots/api#inputprofilephoto multi_parse: attribute: type - regexp: "must be '([a-z_]+)'" + regexp: "must be *([a-z_]+)*" entities: - InputProfilePhotoStatic - InputProfilePhotoAnimated diff --git a/aiogram/types/input_profile_photo_animated.py b/aiogram/types/input_profile_photo_animated.py index fb3dd1f7..a617e223 100644 --- a/aiogram/types/input_profile_photo_animated.py +++ b/aiogram/types/input_profile_photo_animated.py @@ -15,7 +15,7 @@ class InputProfilePhotoAnimated(InputProfilePhoto): Source: https://core.telegram.org/bots/api#inputprofilephotoanimated """ - type: Literal["animated"] = "animated" + type: Literal[InputProfilePhotoType.ANIMATED] = InputProfilePhotoType.ANIMATED """Type of the profile photo, must be *animated*""" animation: InputFileUnion """The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" @@ -29,7 +29,7 @@ class InputProfilePhotoAnimated(InputProfilePhoto): def __init__( __pydantic__self__, *, - type: Literal["animated"] = "animated", + type: Literal[InputProfilePhotoType.ANIMATED] = InputProfilePhotoType.ANIMATED, animation: InputFileUnion, main_frame_timestamp: Optional[float] = None, **__pydantic_kwargs: Any, diff --git a/aiogram/types/input_profile_photo_static.py b/aiogram/types/input_profile_photo_static.py index 397596e6..08c655bc 100644 --- a/aiogram/types/input_profile_photo_static.py +++ b/aiogram/types/input_profile_photo_static.py @@ -15,7 +15,7 @@ class InputProfilePhotoStatic(InputProfilePhoto): Source: https://core.telegram.org/bots/api#inputprofilephotostatic """ - type: Literal["static"] = "static" + type: Literal[InputProfilePhotoType.STATIC] = InputProfilePhotoType.STATIC """Type of the profile photo, must be *static*""" photo: InputFileUnion """The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" @@ -27,7 +27,7 @@ class InputProfilePhotoStatic(InputProfilePhoto): def __init__( __pydantic__self__, *, - type: Literal["static"] = "static", + type: Literal[InputProfilePhotoType.STATIC] = InputProfilePhotoType.STATIC, photo: InputFileUnion, **__pydantic_kwargs: Any, ) -> None: