mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Bot API 6.6 (#1139)
* Added basic support of Bot API 6.6 * Update descriptions * Added StickerFormat enum * Bump version * Refresh from docs * Fixed CommandStart * Fixed files uploading * Cover new functionality * Added changelog * Update texts
This commit is contained in:
parent
5adaf7a567
commit
6570d0bab1
218 changed files with 7687 additions and 1741 deletions
|
|
@ -348,7 +348,7 @@ class Message(TelegramObject):
|
|||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
height: Optional[int] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
|
|
@ -377,7 +377,7 @@ class Message(TelegramObject):
|
|||
:param duration: Duration of sent animation in seconds
|
||||
:param width: Animation width
|
||||
:param height: Animation height
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
|
||||
|
|
@ -401,7 +401,7 @@ class Message(TelegramObject):
|
|||
duration=duration,
|
||||
width=width,
|
||||
height=height,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
|
|
@ -419,7 +419,7 @@ class Message(TelegramObject):
|
|||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
height: Optional[int] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
|
|
@ -448,7 +448,7 @@ class Message(TelegramObject):
|
|||
:param duration: Duration of sent animation in seconds
|
||||
:param width: Animation width
|
||||
:param height: Animation height
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
|
||||
|
|
@ -472,7 +472,7 @@ class Message(TelegramObject):
|
|||
duration=duration,
|
||||
width=width,
|
||||
height=height,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
|
|
@ -494,7 +494,7 @@ class Message(TelegramObject):
|
|||
duration: Optional[int] = None,
|
||||
performer: Optional[str] = None,
|
||||
title: Optional[str] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
|
|
@ -523,7 +523,7 @@ class Message(TelegramObject):
|
|||
:param duration: Duration of the audio in seconds
|
||||
:param performer: Performer
|
||||
:param title: Track name
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
|
|
@ -546,7 +546,7 @@ class Message(TelegramObject):
|
|||
duration=duration,
|
||||
performer=performer,
|
||||
title=title,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
@ -563,7 +563,7 @@ class Message(TelegramObject):
|
|||
duration: Optional[int] = None,
|
||||
performer: Optional[str] = None,
|
||||
title: Optional[str] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
|
|
@ -592,7 +592,7 @@ class Message(TelegramObject):
|
|||
:param duration: Duration of the audio in seconds
|
||||
:param performer: Performer
|
||||
:param title: Track name
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
@ -615,7 +615,7 @@ class Message(TelegramObject):
|
|||
duration=duration,
|
||||
performer=performer,
|
||||
title=title,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
reply_to_message_id=reply_to_message_id,
|
||||
|
|
@ -740,7 +740,7 @@ class Message(TelegramObject):
|
|||
def reply_document(
|
||||
self,
|
||||
document: Union[InputFile, str],
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
|
|
@ -766,7 +766,7 @@ class Message(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#senddocument
|
||||
|
||||
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
|
||||
|
|
@ -787,7 +787,7 @@ class Message(TelegramObject):
|
|||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
reply_to_message_id=self.message_id,
|
||||
document=document,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
|
|
@ -802,7 +802,7 @@ class Message(TelegramObject):
|
|||
def answer_document(
|
||||
self,
|
||||
document: Union[InputFile, str],
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
|
|
@ -828,7 +828,7 @@ class Message(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#senddocument
|
||||
|
||||
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
|
||||
|
|
@ -849,7 +849,7 @@ class Message(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
document=document,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
|
|
@ -1865,6 +1865,7 @@ class Message(TelegramObject):
|
|||
def reply_sticker(
|
||||
self,
|
||||
sticker: Union[InputFile, str],
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
|
|
@ -1885,7 +1886,8 @@ class Message(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#sendsticker
|
||||
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
|
||||
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
|
|
@ -1902,6 +1904,7 @@ class Message(TelegramObject):
|
|||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
reply_to_message_id=self.message_id,
|
||||
sticker=sticker,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
@ -1912,6 +1915,7 @@ class Message(TelegramObject):
|
|||
def answer_sticker(
|
||||
self,
|
||||
sticker: Union[InputFile, str],
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
|
|
@ -1932,7 +1936,8 @@ class Message(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#sendsticker
|
||||
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
|
||||
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
@ -1949,6 +1954,7 @@ class Message(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
sticker=sticker,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
reply_to_message_id=reply_to_message_id,
|
||||
|
|
@ -2100,7 +2106,7 @@ class Message(TelegramObject):
|
|||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
height: Optional[int] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
|
|
@ -2130,7 +2136,7 @@ class Message(TelegramObject):
|
|||
:param duration: Duration of sent video in seconds
|
||||
:param width: Video width
|
||||
:param height: Video height
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
|
||||
|
|
@ -2155,7 +2161,7 @@ class Message(TelegramObject):
|
|||
duration=duration,
|
||||
width=width,
|
||||
height=height,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
|
|
@ -2174,7 +2180,7 @@ class Message(TelegramObject):
|
|||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
height: Optional[int] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
|
|
@ -2204,7 +2210,7 @@ class Message(TelegramObject):
|
|||
:param duration: Duration of sent video in seconds
|
||||
:param width: Video width
|
||||
:param height: Video height
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
|
||||
|
|
@ -2229,7 +2235,7 @@ class Message(TelegramObject):
|
|||
duration=duration,
|
||||
width=width,
|
||||
height=height,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
|
|
@ -2248,7 +2254,7 @@ class Message(TelegramObject):
|
|||
video_note: Union[InputFile, str],
|
||||
duration: Optional[int] = None,
|
||||
length: Optional[int] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
|
|
@ -2272,7 +2278,7 @@ class Message(TelegramObject):
|
|||
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param length: Video width and height, i.e. diameter of the video message
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
|
|
@ -2291,7 +2297,7 @@ class Message(TelegramObject):
|
|||
video_note=video_note,
|
||||
duration=duration,
|
||||
length=length,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
@ -2304,7 +2310,7 @@ class Message(TelegramObject):
|
|||
video_note: Union[InputFile, str],
|
||||
duration: Optional[int] = None,
|
||||
length: Optional[int] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
thumbnail: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
|
|
@ -2328,7 +2334,7 @@ class Message(TelegramObject):
|
|||
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param length: Video width and height, i.e. diameter of the video message
|
||||
:param thumb: 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>`
|
||||
:param thumbnail: 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>`
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
@ -2347,7 +2353,7 @@ class Message(TelegramObject):
|
|||
video_note=video_note,
|
||||
duration=duration,
|
||||
length=length,
|
||||
thumb=thumb,
|
||||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
reply_to_message_id=reply_to_message_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue