mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Re-generate types
This commit is contained in:
parent
c7779abc50
commit
37a9c8d64f
9 changed files with 19 additions and 19 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Optional, Union
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ class ChatInviteLink(TelegramObject):
|
|||
""":code:`True`, if the link is revoked"""
|
||||
name: Optional[str] = None
|
||||
"""*Optional*. Invite link name"""
|
||||
expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
|
||||
expire_date: Optional[datetime.datetime] = None
|
||||
"""*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired"""
|
||||
member_limit: Optional[int] = None
|
||||
"""*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"""
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Optional, Union
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ class ChatMember(TelegramObject):
|
|||
"""
|
||||
|
||||
status: str
|
||||
"""..."""
|
||||
"""The member's status in the chat"""
|
||||
user: Optional[User] = None
|
||||
"""*Optional*. Information about the user"""
|
||||
is_anonymous: Optional[bool] = None
|
||||
|
|
@ -67,5 +67,5 @@ class ChatMember(TelegramObject):
|
|||
"""*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
|
||||
can_add_web_page_previews: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages"""
|
||||
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
|
||||
until_date: Optional[datetime.datetime] = None
|
||||
"""*Optional*. Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever"""
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Union
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -22,5 +22,5 @@ class ChatMemberBanned(ChatMember):
|
|||
"""The member's status in the chat, always 'kicked'"""
|
||||
user: User
|
||||
"""Information about the user"""
|
||||
until_date: Union[datetime.datetime, datetime.timedelta, int]
|
||||
until_date: datetime.datetime
|
||||
"""Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever"""
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Union
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -42,5 +42,5 @@ class ChatMemberRestricted(ChatMember):
|
|||
""":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
|
||||
can_add_web_page_previews: bool
|
||||
""":code:`True`, if the user is allowed to add web page previews to their messages"""
|
||||
until_date: Union[datetime.datetime, datetime.timedelta, int]
|
||||
until_date: datetime.datetime
|
||||
"""Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever"""
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .base import TelegramObject
|
||||
from .base import MutableTelegramObject
|
||||
|
||||
|
||||
class InputMessageContent(TelegramObject):
|
||||
class InputMessageContent(MutableTelegramObject):
|
||||
"""
|
||||
This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
from .base import MutableTelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .web_app_info import WebAppInfo
|
||||
|
||||
|
||||
class MenuButton(TelegramObject):
|
||||
class MenuButton(MutableTelegramObject):
|
||||
"""
|
||||
This object describes the bot's menu button in a private chat. It should be one of
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ class MenuButton(TelegramObject):
|
|||
"""
|
||||
|
||||
type: str
|
||||
"""..."""
|
||||
"""Type of the button"""
|
||||
text: Optional[str] = None
|
||||
"""*Optional*. Text on the button"""
|
||||
web_app: Optional[WebAppInfo] = None
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ class MessageEntity(MutableTelegramObject):
|
|||
type: str
|
||||
"""Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames <https://telegram.org/blog/edit#new-mentions>`_), 'custom_emoji' (for inline custom emoji stickers)"""
|
||||
offset: int
|
||||
"""Offset in UTF-16 code units to the start of the entity"""
|
||||
"""Offset in `UTF-16 code units <https://core.telegram.org/api/entities#entity-length>`_ to the start of the entity"""
|
||||
length: int
|
||||
"""Length of the entity in UTF-16 code units"""
|
||||
"""Length of the entity in `UTF-16 code units <https://core.telegram.org/api/entities#entity-length>`_"""
|
||||
url: Optional[str] = None
|
||||
"""*Optional*. For 'text_link' only, URL that will be opened after user taps on the text"""
|
||||
user: Optional[User] = None
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, List, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
|
|
@ -41,5 +41,5 @@ class Poll(TelegramObject):
|
|||
"""*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*"""
|
||||
open_period: Optional[int] = None
|
||||
"""*Optional*. Amount of time in seconds the poll will be active after creation"""
|
||||
close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
|
||||
close_date: Optional[datetime.datetime] = None
|
||||
"""*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed"""
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ if TYPE_CHECKING:
|
|||
|
||||
class ReplyKeyboardMarkup(MutableTelegramObject):
|
||||
"""
|
||||
This object represents a `custom keyboard <https://core.telegram.org/bots#keyboards>`_ with reply options (see `Introduction to bots <https://core.telegram.org/bots#keyboards>`_ for details and examples).
|
||||
This object represents a `custom keyboard <https://core.telegram.org/bots/features#keyboards>`_ with reply options (see `Introduction to bots <https://core.telegram.org/bots/features#keyboards>`_ for details and examples).
|
||||
|
||||
Source: https://core.telegram.org/bots/api#replykeyboardmarkup
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue