update Giveaway objects Unix time field to DateTime type

This commit is contained in:
Suren Khorenyan 2023-12-31 00:58:00 +03:00
parent 896b452495
commit 17daa1e733
2 changed files with 6 additions and 4 deletions

View file

@ -6,6 +6,7 @@ from .base import TelegramObject
if TYPE_CHECKING:
from .chat import Chat
from .custom import DateTime
class Giveaway(TelegramObject):
@ -17,7 +18,7 @@ class Giveaway(TelegramObject):
chats: List[Chat]
"""The list of chats which the user must join to participate in the giveaway"""
winners_selection_date: int
winners_selection_date: DateTime
"""Point in time (Unix timestamp) when winners of the giveaway will be selected"""
winner_count: int
"""The number of users which are supposed to be selected as winners of the giveaway"""
@ -40,7 +41,7 @@ class Giveaway(TelegramObject):
__pydantic__self__,
*,
chats: List[Chat],
winners_selection_date: int,
winners_selection_date: DateTime,
winner_count: int,
only_new_members: Optional[bool] = None,
has_public_winners: Optional[bool] = None,

View file

@ -6,6 +6,7 @@ from .base import TelegramObject
if TYPE_CHECKING:
from .chat import Chat
from .custom import DateTime
from .user import User
@ -20,7 +21,7 @@ class GiveawayWinners(TelegramObject):
"""The chat that created the giveaway"""
giveaway_message_id: int
"""Identifier of the messsage with the giveaway in the chat"""
winners_selection_date: int
winners_selection_date: DateTime
"""Point in time (Unix timestamp) when winners of the giveaway were selected"""
winner_count: int
"""Total number of winners in the giveaway"""
@ -48,7 +49,7 @@ class GiveawayWinners(TelegramObject):
*,
chat: Chat,
giveaway_message_id: int,
winners_selection_date: int,
winners_selection_date: DateTime,
winner_count: int,
winners: List[User],
additional_chat_count: Optional[int] = None,