mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Reworked request builder (#1142)
* Reworked request builder * Added more default values * Update tests * Fixed timestamp * Fixed Py3.8 support * Describe changes
This commit is contained in:
parent
924a83966d
commit
fea1b7b0a3
300 changed files with 1003 additions and 3448 deletions
|
|
@ -2,7 +2,7 @@ from typing import Optional
|
|||
|
||||
from .animation import Animation
|
||||
from .audio import Audio
|
||||
from .base import UNSET, TelegramObject
|
||||
from .base import UNSET_PARSE_MODE, TelegramObject
|
||||
from .bot_command import BotCommand
|
||||
from .bot_command_scope import BotCommandScope
|
||||
from .bot_command_scope_all_chat_administrators import (
|
||||
|
|
@ -295,7 +295,7 @@ __all__ = (
|
|||
"StickerSet",
|
||||
"SuccessfulPayment",
|
||||
"TelegramObject",
|
||||
"UNSET",
|
||||
"UNSET_PARSE_MODE",
|
||||
"URLInputFile",
|
||||
"Update",
|
||||
"User",
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class MutableTelegramObject(TelegramObject):
|
|||
allow_mutation = True
|
||||
|
||||
|
||||
UNSET: Any = (
|
||||
sentinel.UNSET
|
||||
) # special sentinel object which used in sutuation when None might be a useful value
|
||||
# special sentinel object which used in situation when None might be a useful value
|
||||
UNSET_PARSE_MODE: Any = sentinel.UNSET_PARSE_MODE
|
||||
UNSET_DISABLE_WEB_PAGE_PREVIEW = sentinel.UNSET_DISABLE_WEB_PAGE_PREVIEW
|
||||
UNSET_PROTECT_CONTENT = sentinel.UNSET_PROTECT_CONTENT
|
||||
UNSET_TYPE = type(sentinel.DEFAULT)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -32,7 +32,7 @@ class InlineQueryResultAudio(InlineQueryResult):
|
|||
"""Title"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -30,7 +30,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult):
|
|||
"""A valid file identifier for the audio file"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -34,7 +34,7 @@ class InlineQueryResultCachedDocument(InlineQueryResult):
|
|||
"""*Optional*. Short description of the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -31,7 +31,7 @@ class InlineQueryResultCachedGif(InlineQueryResult):
|
|||
"""*Optional*. Title for the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -31,7 +31,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
|
|||
"""*Optional*. Title for the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -33,7 +33,7 @@ class InlineQueryResultCachedPhoto(InlineQueryResult):
|
|||
"""*Optional*. Short description of the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -33,7 +33,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult):
|
|||
"""*Optional*. Short description of the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -32,7 +32,7 @@ class InlineQueryResultCachedVoice(InlineQueryResult):
|
|||
"""Voice message title"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the voice message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -34,7 +34,7 @@ class InlineQueryResultDocument(InlineQueryResult):
|
|||
"""MIME type of the content of the file, either 'application/pdf' or 'application/zip'"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -41,7 +41,7 @@ class InlineQueryResultGif(InlineQueryResult):
|
|||
"""*Optional*. Title for the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -41,7 +41,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
|
|||
"""*Optional*. Title for the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -39,7 +39,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
|
|||
"""*Optional*. Short description of the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -37,7 +37,7 @@ class InlineQueryResultVideo(InlineQueryResult):
|
|||
"""Title for the result"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InlineQueryResultType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .inline_query_result import InlineQueryResult
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -32,7 +32,7 @@ class InlineQueryResultVoice(InlineQueryResult):
|
|||
"""Recording title"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the voice message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InputMediaType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .input_media import InputMedia
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -28,7 +28,7 @@ class InputMediaAnimation(InputMedia):
|
|||
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InputMediaType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .input_media import InputMedia
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -28,7 +28,7 @@ class InputMediaAudio(InputMedia):
|
|||
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InputMediaType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .input_media import InputMedia
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -28,7 +28,7 @@ class InputMediaDocument(InputMedia):
|
|||
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InputMediaType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .input_media import InputMedia
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -26,7 +26,7 @@ class InputMediaPhoto(InputMedia):
|
|||
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union
|
|||
from pydantic import Field
|
||||
|
||||
from ..enums import InputMediaType
|
||||
from .base import UNSET
|
||||
from .base import UNSET_PARSE_MODE
|
||||
from .input_media import InputMedia
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -28,7 +28,7 @@ class InputMediaVideo(InputMedia):
|
|||
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
|
||||
caption: Optional[str] = None
|
||||
"""*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING, List, Optional
|
||||
|
||||
from .base import UNSET
|
||||
from .base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PARSE_MODE
|
||||
from .input_message_content import InputMessageContent
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -18,9 +18,9 @@ class InputTextMessageContent(InputMessageContent):
|
|||
|
||||
message_text: str
|
||||
"""Text of the message to be sent, 1-4096 characters"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE
|
||||
"""*Optional*. Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
entities: Optional[List[MessageEntity]] = None
|
||||
"""*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*"""
|
||||
disable_web_page_preview: Optional[bool] = None
|
||||
disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW
|
||||
"""*Optional*. Disables link previews for links in the sent message"""
|
||||
|
|
|
|||
|
|
@ -12,7 +12,12 @@ from aiogram.utils.text_decorations import (
|
|||
)
|
||||
|
||||
from ..enums import ContentType
|
||||
from .base import UNSET, TelegramObject
|
||||
from .base import (
|
||||
UNSET_DISABLE_WEB_PAGE_PREVIEW,
|
||||
UNSET_PARSE_MODE,
|
||||
UNSET_PROTECT_CONTENT,
|
||||
TelegramObject,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..methods import (
|
||||
|
|
@ -350,11 +355,11 @@ class Message(TelegramObject):
|
|||
height: Optional[int] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
has_spoiler: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -421,11 +426,11 @@ class Message(TelegramObject):
|
|||
height: Optional[int] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
has_spoiler: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -489,14 +494,14 @@ class Message(TelegramObject):
|
|||
self,
|
||||
audio: Union[InputFile, str],
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
duration: Optional[int] = None,
|
||||
performer: Optional[str] = None,
|
||||
title: Optional[str] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -558,14 +563,14 @@ class Message(TelegramObject):
|
|||
self,
|
||||
audio: Union[InputFile, str],
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
duration: Optional[int] = None,
|
||||
performer: Optional[str] = None,
|
||||
title: Optional[str] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -631,7 +636,7 @@ class Message(TelegramObject):
|
|||
last_name: Optional[str] = None,
|
||||
vcard: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -687,7 +692,7 @@ class Message(TelegramObject):
|
|||
last_name: Optional[str] = None,
|
||||
vcard: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -742,11 +747,11 @@ class Message(TelegramObject):
|
|||
document: Union[InputFile, str],
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
disable_content_type_detection: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -804,11 +809,11 @@ class Message(TelegramObject):
|
|||
document: Union[InputFile, str],
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
disable_content_type_detection: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -866,7 +871,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
game_short_name: str,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
|
|
@ -911,7 +916,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
game_short_name: str,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
|
|
@ -977,7 +982,7 @@ class Message(TelegramObject):
|
|||
send_email_to_provider: Optional[bool] = None,
|
||||
is_flexible: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
|
|
@ -1082,7 +1087,7 @@ class Message(TelegramObject):
|
|||
send_email_to_provider: Optional[bool] = None,
|
||||
is_flexible: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
|
|
@ -1173,7 +1178,7 @@ class Message(TelegramObject):
|
|||
heading: Optional[int] = None,
|
||||
proximity_alert_radius: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -1235,7 +1240,7 @@ class Message(TelegramObject):
|
|||
heading: Optional[int] = None,
|
||||
proximity_alert_radius: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -1293,7 +1298,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendMediaGroup:
|
||||
|
|
@ -1335,7 +1340,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
**kwargs: Any,
|
||||
|
|
@ -1377,11 +1382,11 @@ class Message(TelegramObject):
|
|||
def reply(
|
||||
self,
|
||||
text: str,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
entities: Optional[List[MessageEntity]] = None,
|
||||
disable_web_page_preview: Optional[bool] = None,
|
||||
disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -1433,11 +1438,11 @@ class Message(TelegramObject):
|
|||
def answer(
|
||||
self,
|
||||
text: str,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
entities: Optional[List[MessageEntity]] = None,
|
||||
disable_web_page_preview: Optional[bool] = None,
|
||||
disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -1491,11 +1496,11 @@ class Message(TelegramObject):
|
|||
self,
|
||||
photo: Union[InputFile, str],
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
has_spoiler: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -1550,11 +1555,11 @@ class Message(TelegramObject):
|
|||
self,
|
||||
photo: Union[InputFile, str],
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
has_spoiler: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -1615,13 +1620,13 @@ class Message(TelegramObject):
|
|||
allows_multiple_answers: Optional[bool] = None,
|
||||
correct_option_id: Optional[int] = None,
|
||||
explanation: Optional[str] = None,
|
||||
explanation_parse_mode: Optional[str] = UNSET,
|
||||
explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
explanation_entities: Optional[List[MessageEntity]] = None,
|
||||
open_period: Optional[int] = None,
|
||||
close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
|
||||
is_closed: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -1695,13 +1700,13 @@ class Message(TelegramObject):
|
|||
allows_multiple_answers: Optional[bool] = None,
|
||||
correct_option_id: Optional[int] = None,
|
||||
explanation: Optional[str] = None,
|
||||
explanation_parse_mode: Optional[str] = UNSET,
|
||||
explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
explanation_entities: Optional[List[MessageEntity]] = None,
|
||||
open_period: Optional[int] = None,
|
||||
close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
|
||||
is_closed: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -1771,7 +1776,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -1818,7 +1823,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -1867,7 +1872,7 @@ class Message(TelegramObject):
|
|||
sticker: Union[InputFile, str],
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -1917,7 +1922,7 @@ class Message(TelegramObject):
|
|||
sticker: Union[InputFile, str],
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -1974,7 +1979,7 @@ class Message(TelegramObject):
|
|||
google_place_id: Optional[str] = None,
|
||||
google_place_type: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -2042,7 +2047,7 @@ class Message(TelegramObject):
|
|||
google_place_id: Optional[str] = None,
|
||||
google_place_type: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -2108,12 +2113,12 @@ class Message(TelegramObject):
|
|||
height: Optional[int] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
has_spoiler: Optional[bool] = None,
|
||||
supports_streaming: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -2182,12 +2187,12 @@ class Message(TelegramObject):
|
|||
height: Optional[int] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
has_spoiler: Optional[bool] = None,
|
||||
supports_streaming: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -2256,7 +2261,7 @@ class Message(TelegramObject):
|
|||
length: Optional[int] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -2312,7 +2317,7 @@ class Message(TelegramObject):
|
|||
length: Optional[int] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -2366,11 +2371,11 @@ class Message(TelegramObject):
|
|||
self,
|
||||
voice: Union[InputFile, str],
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
duration: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -2425,11 +2430,11 @@ class Message(TelegramObject):
|
|||
self,
|
||||
voice: Union[InputFile, str],
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
duration: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -2624,10 +2629,10 @@ class Message(TelegramObject):
|
|||
chat_id: Union[int, str],
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -2683,9 +2688,9 @@ class Message(TelegramObject):
|
|||
self,
|
||||
text: str,
|
||||
inline_message_id: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
entities: Optional[List[MessageEntity]] = None,
|
||||
disable_web_page_preview: Optional[bool] = None,
|
||||
disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> EditMessageText:
|
||||
|
|
@ -2730,7 +2735,7 @@ class Message(TelegramObject):
|
|||
chat_id: Union[int, str],
|
||||
message_thread_id: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
|
||||
**kwargs: Any,
|
||||
) -> ForwardMessage:
|
||||
"""
|
||||
|
|
@ -2926,7 +2931,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
inline_message_id: Optional[str] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
parse_mode: Optional[str] = UNSET_PARSE_MODE,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue