From 6cf849c3eacd58d7befd3b357952121d5c80b7ba Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 7 May 2022 12:01:14 +0200 Subject: [PATCH] Revert "Update maximum caption length (#989)" This reverts commit f1e4a0ce74ae7ad5bbdd71def5e3f746e72e7249. --- pyrogram/methods/messages/copy_media_group.py | 2 +- pyrogram/methods/messages/copy_message.py | 2 +- pyrogram/methods/messages/send_animation.py | 2 +- pyrogram/methods/messages/send_audio.py | 2 +- pyrogram/methods/messages/send_cached_media.py | 2 +- pyrogram/methods/messages/send_document.py | 2 +- pyrogram/methods/messages/send_photo.py | 2 +- pyrogram/methods/messages/send_video.py | 2 +- pyrogram/methods/messages/send_voice.py | 2 +- .../inline_query_result_animation.py | 2 +- .../inline_mode/inline_query_result_audio.py | 2 +- .../inline_query_result_cached_animation.py | 2 +- .../inline_query_result_cached_audio.py | 2 +- .../inline_query_result_cached_document.py | 2 +- .../inline_query_result_cached_photo.py | 2 +- .../inline_query_result_cached_video.py | 2 +- .../inline_query_result_cached_voice.py | 2 +- .../inline_query_result_document.py | 2 +- .../inline_mode/inline_query_result_photo.py | 2 +- .../inline_mode/inline_query_result_video.py | 2 +- .../inline_mode/inline_query_result_voice.py | 2 +- .../types/input_media/input_media_animation.py | 2 +- .../types/input_media/input_media_audio.py | 2 +- .../types/input_media/input_media_document.py | 2 +- .../types/input_media/input_media_photo.py | 2 +- .../types/input_media/input_media_video.py | 2 +- pyrogram/types/messages_and_media/message.py | 18 +++++++++--------- 27 files changed, 35 insertions(+), 35 deletions(-) diff --git a/pyrogram/methods/messages/copy_media_group.py b/pyrogram/methods/messages/copy_media_group.py index 981a4ec2..de47465d 100644 --- a/pyrogram/methods/messages/copy_media_group.py +++ b/pyrogram/methods/messages/copy_media_group.py @@ -51,7 +51,7 @@ class CopyMediaGroup: Message identifier in the chat specified in *from_chat_id*. captions (``str`` | List of ``str`` , *optional*): - New caption for media, 0-4096 characters after entities parsing for each media. + New caption for media, 0-1024 characters after entities parsing for each media. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption. diff --git a/pyrogram/methods/messages/copy_message.py b/pyrogram/methods/messages/copy_message.py index c94145e6..b114a9e0 100644 --- a/pyrogram/methods/messages/copy_message.py +++ b/pyrogram/methods/messages/copy_message.py @@ -66,7 +66,7 @@ class CopyMessage: Message identifier in the chat specified in *from_chat_id*. caption (``string``, *optional*): - New caption for media, 0-4096 characters after entities parsing. + New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption. diff --git a/pyrogram/methods/messages/send_animation.py b/pyrogram/methods/messages/send_animation.py index 74b89213..efa9cb16 100644 --- a/pyrogram/methods/messages/send_animation.py +++ b/pyrogram/methods/messages/send_animation.py @@ -73,7 +73,7 @@ class SendAnimation: pass a binary file-like object with its attribute ".name" set for in-memory uploads. caption (``str``, *optional*): - Animation caption, 0-4096 characters. + Animation caption, 0-1024 characters. unsave (``bool``, *optional*): By default, the server will save into your own collection any new animation you send. diff --git a/pyrogram/methods/messages/send_audio.py b/pyrogram/methods/messages/send_audio.py index e0e2493b..f4552832 100644 --- a/pyrogram/methods/messages/send_audio.py +++ b/pyrogram/methods/messages/send_audio.py @@ -74,7 +74,7 @@ class SendAudio: pass a binary file-like object with its attribute ".name" set for in-memory uploads. caption (``str``, *optional*): - Audio caption, 0-4096 characters. + Audio caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/methods/messages/send_cached_media.py b/pyrogram/methods/messages/send_cached_media.py index 85040885..f0e04d72 100644 --- a/pyrogram/methods/messages/send_cached_media.py +++ b/pyrogram/methods/messages/send_cached_media.py @@ -61,7 +61,7 @@ class SendCachedMedia: Pass a file_id as string to send a media that exists on the Telegram servers. caption (``str``, *optional*): - Media caption, 0-4096 characters. + Media caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/methods/messages/send_document.py b/pyrogram/methods/messages/send_document.py index 9c96a03b..99c90fbb 100644 --- a/pyrogram/methods/messages/send_document.py +++ b/pyrogram/methods/messages/send_document.py @@ -76,7 +76,7 @@ class SendDocument: Thumbnails can't be reused and can be only uploaded as a new file. caption (``str``, *optional*): - Document caption, 0-4096 characters. + Document caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/methods/messages/send_photo.py b/pyrogram/methods/messages/send_photo.py index 3cd32ef2..836ce1b1 100644 --- a/pyrogram/methods/messages/send_photo.py +++ b/pyrogram/methods/messages/send_photo.py @@ -67,7 +67,7 @@ class SendPhoto: pass a binary file-like object with its attribute ".name" set for in-memory uploads. caption (``str``, *optional*): - Photo caption, 0-4096 characters. + Photo caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/methods/messages/send_video.py b/pyrogram/methods/messages/send_video.py index de4150f0..669b42ec 100644 --- a/pyrogram/methods/messages/send_video.py +++ b/pyrogram/methods/messages/send_video.py @@ -74,7 +74,7 @@ class SendVideo: pass a binary file-like object with its attribute ".name" set for in-memory uploads. caption (``str``, *optional*): - Video caption, 0-4096 characters. + Video caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/methods/messages/send_voice.py b/pyrogram/methods/messages/send_voice.py index e12a0992..5947ecc2 100644 --- a/pyrogram/methods/messages/send_voice.py +++ b/pyrogram/methods/messages/send_voice.py @@ -68,7 +68,7 @@ class SendVoice: pass a binary file-like object with its attribute ".name" set for in-memory uploads. caption (``str``, *optional*): - Voice message caption, 0-4096 characters. + Voice message caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_animation.py b/pyrogram/types/inline_mode/inline_query_result_animation.py index 4a70b02c..71d1edf4 100644 --- a/pyrogram/types/inline_mode/inline_query_result_animation.py +++ b/pyrogram/types/inline_mode/inline_query_result_animation.py @@ -60,7 +60,7 @@ class InlineQueryResultAnimation(InlineQueryResult): Title for the result. caption (``str``, *optional*): - Caption of the animation to be sent, 0-4096 characters. + Caption of the animation to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_audio.py b/pyrogram/types/inline_mode/inline_query_result_audio.py index 685b53d4..a3902100 100644 --- a/pyrogram/types/inline_mode/inline_query_result_audio.py +++ b/pyrogram/types/inline_mode/inline_query_result_audio.py @@ -48,7 +48,7 @@ class InlineQueryResultAudio(InlineQueryResult): Audio duration in seconds. caption (``str``, *optional*): - Caption of the audio to be sent, 0-4096 characters. + Caption of the audio to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_cached_animation.py b/pyrogram/types/inline_mode/inline_query_result_cached_animation.py index 9233fb70..63e58ca0 100644 --- a/pyrogram/types/inline_mode/inline_query_result_cached_animation.py +++ b/pyrogram/types/inline_mode/inline_query_result_cached_animation.py @@ -43,7 +43,7 @@ class InlineQueryResultCachedAnimation(InlineQueryResult): Title for the result. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_cached_audio.py b/pyrogram/types/inline_mode/inline_query_result_cached_audio.py index e31cde86..9535f633 100644 --- a/pyrogram/types/inline_mode/inline_query_result_cached_audio.py +++ b/pyrogram/types/inline_mode/inline_query_result_cached_audio.py @@ -39,7 +39,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult): Defaults to a randomly generated UUID4. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_cached_document.py b/pyrogram/types/inline_mode/inline_query_result_cached_document.py index acd7c9dc..2ab190e7 100644 --- a/pyrogram/types/inline_mode/inline_query_result_cached_document.py +++ b/pyrogram/types/inline_mode/inline_query_result_cached_document.py @@ -45,7 +45,7 @@ class InlineQueryResultCachedDocument(InlineQueryResult): Short description of the result. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_cached_photo.py b/pyrogram/types/inline_mode/inline_query_result_cached_photo.py index 142085ac..2e01d344 100644 --- a/pyrogram/types/inline_mode/inline_query_result_cached_photo.py +++ b/pyrogram/types/inline_mode/inline_query_result_cached_photo.py @@ -45,7 +45,7 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): Short description of the result. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_cached_video.py b/pyrogram/types/inline_mode/inline_query_result_cached_video.py index 99938635..00ea32ec 100644 --- a/pyrogram/types/inline_mode/inline_query_result_cached_video.py +++ b/pyrogram/types/inline_mode/inline_query_result_cached_video.py @@ -46,7 +46,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult): Short description of the result. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_cached_voice.py b/pyrogram/types/inline_mode/inline_query_result_cached_voice.py index 8ca7de46..cc2bd768 100644 --- a/pyrogram/types/inline_mode/inline_query_result_cached_voice.py +++ b/pyrogram/types/inline_mode/inline_query_result_cached_voice.py @@ -43,7 +43,7 @@ class InlineQueryResultCachedVoice(InlineQueryResult): Title for the result. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_document.py b/pyrogram/types/inline_mode/inline_query_result_document.py index 517c7523..eac7901b 100644 --- a/pyrogram/types/inline_mode/inline_query_result_document.py +++ b/pyrogram/types/inline_mode/inline_query_result_document.py @@ -45,7 +45,7 @@ class InlineQueryResultDocument(InlineQueryResult): Defaults to a randomly generated UUID4. caption (``str``, *optional*): - Caption of the video to be sent, 0-4096 characters. + Caption of the video to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_photo.py b/pyrogram/types/inline_mode/inline_query_result_photo.py index 434b57b3..d75ccac2 100644 --- a/pyrogram/types/inline_mode/inline_query_result_photo.py +++ b/pyrogram/types/inline_mode/inline_query_result_photo.py @@ -56,7 +56,7 @@ class InlineQueryResultPhoto(InlineQueryResult): Short description of the result. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_video.py b/pyrogram/types/inline_mode/inline_query_result_video.py index 82a93681..5f71111f 100644 --- a/pyrogram/types/inline_mode/inline_query_result_video.py +++ b/pyrogram/types/inline_mode/inline_query_result_video.py @@ -61,7 +61,7 @@ class InlineQueryResultVideo(InlineQueryResult): Short description of the result. caption (``str``, *optional*): - Caption of the video to be sent, 0-4096 characters. + Caption of the video to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/inline_mode/inline_query_result_voice.py b/pyrogram/types/inline_mode/inline_query_result_voice.py index 7a8d18ed..31b422f8 100644 --- a/pyrogram/types/inline_mode/inline_query_result_voice.py +++ b/pyrogram/types/inline_mode/inline_query_result_voice.py @@ -45,7 +45,7 @@ class InlineQueryResultVoice(InlineQueryResult): Recording duration in seconds. caption (``str``, *optional*): - Caption of the audio to be sent, 0-4096 characters. + Caption of the audio to be sent, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. diff --git a/pyrogram/types/input_media/input_media_animation.py b/pyrogram/types/input_media/input_media_animation.py index 39cfb5b4..04aa940e 100644 --- a/pyrogram/types/input_media/input_media_animation.py +++ b/pyrogram/types/input_media/input_media_animation.py @@ -41,7 +41,7 @@ class InputMediaAnimation(InputMedia): Thumbnails can't be reused and can be only uploaded as a new file. caption (``str``, *optional*): - Caption of the animation to be sent, 0-4096 characters. + Caption of the animation to be sent, 0-1024 characters. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): diff --git a/pyrogram/types/input_media/input_media_audio.py b/pyrogram/types/input_media/input_media_audio.py index 6ab4fe0e..b4bb7575 100644 --- a/pyrogram/types/input_media/input_media_audio.py +++ b/pyrogram/types/input_media/input_media_audio.py @@ -43,7 +43,7 @@ class InputMediaAudio(InputMedia): Thumbnails can't be reused and can be only uploaded as a new file. caption (``str``, *optional*): - Caption of the audio to be sent, 0-4096 characters. + Caption of the audio to be sent, 0-1024 characters. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): diff --git a/pyrogram/types/input_media/input_media_document.py b/pyrogram/types/input_media/input_media_document.py index 3e5a0f57..91dfc7d6 100644 --- a/pyrogram/types/input_media/input_media_document.py +++ b/pyrogram/types/input_media/input_media_document.py @@ -41,7 +41,7 @@ class InputMediaDocument(InputMedia): Thumbnails can't be reused and can be only uploaded as a new file. caption (``str``, *optional*): - Caption of the document to be sent, 0-4096 characters. + Caption of the document to be sent, 0-1024 characters. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): diff --git a/pyrogram/types/input_media/input_media_photo.py b/pyrogram/types/input_media/input_media_photo.py index 178ee3d4..ce8b41a2 100644 --- a/pyrogram/types/input_media/input_media_photo.py +++ b/pyrogram/types/input_media/input_media_photo.py @@ -36,7 +36,7 @@ class InputMediaPhoto(InputMedia): pass an HTTP URL as a string for Telegram to get a photo from the Internet. caption (``str``, *optional*): - Caption of the photo to be sent, 0-4096 characters. + Caption of the photo to be sent, 0-1024 characters. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): diff --git a/pyrogram/types/input_media/input_media_video.py b/pyrogram/types/input_media/input_media_video.py index 130129ab..bad4e3ef 100644 --- a/pyrogram/types/input_media/input_media_video.py +++ b/pyrogram/types/input_media/input_media_video.py @@ -42,7 +42,7 @@ class InputMediaVideo(InputMedia): Thumbnails can't be reused and can be only uploaded as a new file. caption (``str``, *optional*): - Caption of the video to be sent, 0-4096 characters. + Caption of the video to be sent, 0-1024 characters. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 1ffdeafd..ab5e202f 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -177,7 +177,7 @@ class Message(Object, Update): Message is a video note, information about the video message. caption (``str``, *optional*): - Caption for the audio, document, photo, video or voice, 0-4096 characters. + Caption for the audio, document, photo, video or voice, 0-1024 characters. If the message contains caption entities (bold, italic, ...) you can access *caption.markdown* or *caption.html* to get the marked up caption text. In case there is no caption entity, the fields will contain the same text as *caption*. @@ -1022,7 +1022,7 @@ class Message(Object, Update): Defaults to ``True`` in group chats and ``False`` in private chats. caption (``str``, *optional*): - Animation caption, 0-4096 characters. + Animation caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. @@ -1161,7 +1161,7 @@ class Message(Object, Update): Defaults to ``True`` in group chats and ``False`` in private chats. caption (``str``, *optional*): - Audio caption, 0-4096 characters. + Audio caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. @@ -1292,7 +1292,7 @@ class Message(Object, Update): Defaults to ``True`` in group chats and ``False`` in private chats. caption (``bool``, *optional*): - Media caption, 0-4096 characters. + Media caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. @@ -1514,7 +1514,7 @@ class Message(Object, Update): Thumbnails can't be reused and can be only uploaded as a new file. caption (``str``, *optional*): - Document caption, 0-4096 characters. + Document caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. @@ -1916,7 +1916,7 @@ class Message(Object, Update): Defaults to ``True`` in group chats and ``False`` in private chats. caption (``str``, *optional*): - Photo caption, 0-4096 characters. + Photo caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. @@ -2387,7 +2387,7 @@ class Message(Object, Update): Defaults to ``True`` in group chats and ``False`` in private chats. caption (``str``, *optional*): - Video caption, 0-4096 characters. + Video caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. @@ -2651,7 +2651,7 @@ class Message(Object, Update): Defaults to ``True`` in group chats and ``False`` in private chats. caption (``str``, *optional*): - Voice message caption, 0-4096 characters. + Voice message caption, 0-1024 characters. parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, texts are parsed using both Markdown and HTML styles. @@ -3007,7 +3007,7 @@ class Message(Object, Update): For a contact that exists in your Telegram address book you can use his phone number (str). caption (``string``, *optional*): - New caption for media, 0-4096 characters after entities parsing. + New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept. Pass "" (empty string) to remove the caption.