mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Use datetime type for date fields, update aiohttp version
This commit is contained in:
parent
9b43a33b7f
commit
e0ab7d8bd3
8 changed files with 218 additions and 73 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
|
||||
|
||||
from ..types import ChatInviteLink
|
||||
|
|
@ -22,7 +23,7 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]):
|
|||
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
|
||||
name: Optional[str] = None
|
||||
"""Invite link name; 0-32 characters"""
|
||||
expire_date: Optional[int] = None
|
||||
expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
|
||||
"""Point in time (Unix timestamp) when the link will expire"""
|
||||
member_limit: Optional[int] = None
|
||||
"""Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"""
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
|
||||
|
||||
from ..types import ChatInviteLink
|
||||
|
|
@ -24,7 +25,7 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]):
|
|||
"""The invite link to edit"""
|
||||
name: Optional[str] = None
|
||||
"""Invite link name; 0-32 characters"""
|
||||
expire_date: Optional[int] = None
|
||||
expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
|
||||
"""Point in time (Unix timestamp) when the link will expire"""
|
||||
member_limit: Optional[int] = None
|
||||
"""Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue