diff --git a/.butcher/types/SuggestedPostApproved/replace.yml b/.butcher/types/SuggestedPostApproved/replace.yml new file mode 100644 index 00000000..26ef9ec3 --- /dev/null +++ b/.butcher/types/SuggestedPostApproved/replace.yml @@ -0,0 +1,5 @@ +annotations: + send_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/SuggestedPostParameters/replace.yml b/.butcher/types/SuggestedPostParameters/replace.yml new file mode 100644 index 00000000..26ef9ec3 --- /dev/null +++ b/.butcher/types/SuggestedPostParameters/replace.yml @@ -0,0 +1,5 @@ +annotations: + send_date: + parsed_type: + type: std + name: DateTime diff --git a/aiogram/types/suggested_post_approved.py b/aiogram/types/suggested_post_approved.py index 2eb8afa7..8d582f60 100644 --- a/aiogram/types/suggested_post_approved.py +++ b/aiogram/types/suggested_post_approved.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: from .message import Message @@ -16,7 +17,7 @@ class SuggestedPostApproved(TelegramObject): Source: https://core.telegram.org/bots/api#suggestedpostapproved """ - send_date: int + send_date: DateTime """Date when the post will be published""" suggested_post_message: Optional[Message] = None """*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.""" @@ -30,7 +31,7 @@ class SuggestedPostApproved(TelegramObject): def __init__( __pydantic__self__, *, - send_date: int, + send_date: DateTime, suggested_post_message: Optional[Message] = None, price: Optional[SuggestedPostPrice] = None, **__pydantic_kwargs: Any, diff --git a/aiogram/types/suggested_post_parameters.py b/aiogram/types/suggested_post_parameters.py index 9abb450c..b48dbb98 100644 --- a/aiogram/types/suggested_post_parameters.py +++ b/aiogram/types/suggested_post_parameters.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: from .suggested_post_price import SuggestedPostPrice @@ -17,7 +18,7 @@ class SuggestedPostParameters(TelegramObject): price: Optional[SuggestedPostPrice] = None """*Optional*. Proposed price for the post. If the field is omitted, then the post is unpaid.""" - send_date: Optional[int] = None + send_date: Optional[DateTime] = None """*Optional*. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.""" if TYPE_CHECKING: @@ -28,7 +29,7 @@ class SuggestedPostParameters(TelegramObject): __pydantic__self__, *, price: Optional[SuggestedPostPrice] = None, - send_date: Optional[int] = None, + send_date: Optional[DateTime] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!!