diff --git a/AUTHORS.rst b/AUTHORS.rst index a467ff0cf..f9e3cfe9c 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -37,6 +37,7 @@ The following wonderful people contributed directly or indirectly to this projec - `evgfilim1 `_ - `franciscod `_ - `gamgi `_ +- `Harshil `_ - `Hugo Damer `_ - `ihoru `_ - `Jasmin Bom `_ diff --git a/telegram/inline/inlinekeyboardbutton.py b/telegram/inline/inlinekeyboardbutton.py index 3d7e1c9a3..fda629bbe 100644 --- a/telegram/inline/inlinekeyboardbutton.py +++ b/telegram/inline/inlinekeyboardbutton.py @@ -30,27 +30,28 @@ class InlineKeyboardButton(TelegramObject): Attributes: text (:obj:`str`): Label text on the button. - url (:obj:`str`): Optional. HTTP url to be opened when button is pressed. + url (:obj:`str`): Optional. HTTP or tg:// url to be opened when button is pressed. login_url (:class:`telegram.LoginUrl`) Optional. An HTTP URL used to automatically - authorize the user. + authorize the user. Can be used as a replacement for the Telegram Login Widget. callback_data (:obj:`str`): Optional. Data to be sent in a callback query to the bot when button is pressed, UTF-8 1-64 bytes. switch_inline_query (:obj:`str`): Optional. Will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in - the input field. + the input field. Can be empty, in which case just the bot’s username will be inserted. switch_inline_query_current_chat (:obj:`str`): Optional. Will insert the bot's username and - the specified inline query in the current chat's input field. + the specified inline query in the current chat's input field. Can be empty, in which + case just the bot’s username will be inserted. callback_game (:class:`telegram.CallbackGame`): Optional. Description of the game that will be launched when the user presses the button. pay (:obj:`bool`): Optional. Specify True, to send a Pay button. Args: text (:obj:`str`): Label text on the button. - url (:obj:`str`): HTTP url to be opened when button is pressed. + url (:obj:`str`): HTTP or tg:// url to be opened when button is pressed. login_url (:class:`telegram.LoginUrl`, optional) An HTTP URL used to automatically - authorize the user. + authorize the user. Can be used as a replacement for the Telegram Login Widget. callback_data (:obj:`str`, optional): Data to be sent in a callback query to the bot when - button is pressed, 1-64 UTF-8 bytes. + button is pressed, UTF-8 1-64 bytes. switch_inline_query (:obj:`str`, optional): If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's diff --git a/telegram/inline/inlinequeryresultaudio.py b/telegram/inline/inlinequeryresultaudio.py index 40963d2d3..227d67c13 100644 --- a/telegram/inline/inlinequeryresultaudio.py +++ b/telegram/inline/inlinequeryresultaudio.py @@ -33,9 +33,9 @@ class InlineQueryResultAudio(InlineQueryResult): id (:obj:`str`): Unique identifier for this result, 1-64 bytes. audio_url (:obj:`str`): A valid URL for the audio file. title (:obj:`str`): Title. - performer (:obj:`str`): Optional. Caption, 0-200 characters. - audio_duration (:obj:`str`): Optional. Performer. - caption (:obj:`str`): Optional. Audio duration in seconds. + performer (:obj:`str`): Optional. Performer. + audio_duration (:obj:`str`): Optional. Audio duration in seconds. + caption (:obj:`str`): Optional. Caption, 0-1024 characters after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -48,9 +48,9 @@ class InlineQueryResultAudio(InlineQueryResult): id (:obj:`str`): Unique identifier for this result, 1-64 bytes. audio_url (:obj:`str`): A valid URL for the audio file. title (:obj:`str`): Title. - performer (:obj:`str`, optional): Caption, 0-200 characters. - audio_duration (:obj:`str`, optional): Performer. - caption (:obj:`str`, optional): Audio duration in seconds. + performer (:obj:`str`, optional): Performer. + audio_duration (:obj:`str`, optional): Audio duration in seconds. + caption (:obj:`str`, optional): Caption, 0-1024 characters after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultcachedaudio.py b/telegram/inline/inlinequeryresultcachedaudio.py index 5c415df5d..58d1d7947 100644 --- a/telegram/inline/inlinequeryresultcachedaudio.py +++ b/telegram/inline/inlinequeryresultcachedaudio.py @@ -26,13 +26,13 @@ class InlineQueryResultCachedAudio(InlineQueryResult): """ Represents a link to an mp3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use :attr:`input_message_content` to - send amessage with the specified content instead of the audio. + send a message with the specified content instead of the audio. Attributes: type (:obj:`str`): 'audio'. id (:obj:`str`): Unique identifier for this result, 1-64 bytes. audio_file_id (:obj:`str`): A valid file identifier for the audio file. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption, 0-1024 characters after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -44,7 +44,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult): Args: id (:obj:`str`): Unique identifier for this result, 1-64 bytes. audio_file_id (:obj:`str`): A valid file identifier for the audio file. - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption, 0-1024 characters after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultcacheddocument.py b/telegram/inline/inlinequeryresultcacheddocument.py index ef28bb39c..c492b71b0 100644 --- a/telegram/inline/inlinequeryresultcacheddocument.py +++ b/telegram/inline/inlinequeryresultcacheddocument.py @@ -34,7 +34,8 @@ class InlineQueryResultCachedDocument(InlineQueryResult): title (:obj:`str`): Title for the result. document_file_id (:obj:`str`): A valid file identifier for the file. description (:obj:`str`): Optional. Short description of the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the document to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -48,7 +49,8 @@ class InlineQueryResultCachedDocument(InlineQueryResult): title (:obj:`str`): Title for the result. document_file_id (:obj:`str`): A valid file identifier for the file. description (:obj:`str`, optional): Short description of the result. - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption of the document to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultcachedgif.py b/telegram/inline/inlinequeryresultcachedgif.py index 1493148fb..7e4f570a6 100644 --- a/telegram/inline/inlinequeryresultcachedgif.py +++ b/telegram/inline/inlinequeryresultcachedgif.py @@ -34,7 +34,8 @@ class InlineQueryResultCachedGif(InlineQueryResult): id (:obj:`str`): Unique identifier for this result, 1-64 bytes. gif_file_id (:obj:`str`): A valid file identifier for the GIF file. title (:obj:`str`): Optional. Title for the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the GIF file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -47,7 +48,8 @@ class InlineQueryResultCachedGif(InlineQueryResult): id (:obj:`str`): Unique identifier for this result, 1-64 bytes. gif_file_id (:obj:`str`): A valid file identifier for the GIF file. title (:obj:`str`, optional): Title for the result.caption (:obj:`str`, optional): - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption of the GIF file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultcachedmpeg4gif.py b/telegram/inline/inlinequeryresultcachedmpeg4gif.py index 4d95f5a69..d56b6c7f4 100644 --- a/telegram/inline/inlinequeryresultcachedmpeg4gif.py +++ b/telegram/inline/inlinequeryresultcachedmpeg4gif.py @@ -34,7 +34,8 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): id (:obj:`str`): Unique identifier for this result, 1-64 bytes. mpeg4_file_id (:obj:`str`): A valid file identifier for the MP4 file. title (:obj:`str`): Optional. Title for the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -47,7 +48,8 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): id (:obj:`str`): Unique identifier for this result, 1-64 bytes. mpeg4_file_id (:obj:`str`): A valid file identifier for the MP4 file. title (:obj:`str`, optional): Title for the result. - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption of the MPEG-4 file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultcachedphoto.py b/telegram/inline/inlinequeryresultcachedphoto.py index d97121f2b..c38a92223 100644 --- a/telegram/inline/inlinequeryresultcachedphoto.py +++ b/telegram/inline/inlinequeryresultcachedphoto.py @@ -35,7 +35,8 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): photo_file_id (:obj:`str`): A valid file identifier of the photo. title (:obj:`str`): Optional. Title for the result. description (:obj:`str`): Optional. Short description of the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the photo to be sent, 0-1024 characters after + entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -49,7 +50,8 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): photo_file_id (:obj:`str`): A valid file identifier of the photo. title (:obj:`str`, optional): Title for the result. description (:obj:`str`, optional): Short description of the result. - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption of the photo to be sent, 0-1024 characters after + entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultcachedsticker.py b/telegram/inline/inlinequeryresultcachedsticker.py index 6c51dafac..2ac096468 100644 --- a/telegram/inline/inlinequeryresultcachedsticker.py +++ b/telegram/inline/inlinequeryresultcachedsticker.py @@ -37,8 +37,8 @@ class InlineQueryResultCachedSticker(InlineQueryResult): message to be sent instead of the sticker. Args: - id (:obj:`str`): - sticker_file_id (:obj:`str`): + id (:obj:`str`): Unique identifier for this result, 1-64 bytes. + sticker_file_id (:obj:`str`): A valid file identifier of the sticker. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the diff --git a/telegram/inline/inlinequeryresultcachedvideo.py b/telegram/inline/inlinequeryresultcachedvideo.py index 6522aa789..8523e4ad8 100644 --- a/telegram/inline/inlinequeryresultcachedvideo.py +++ b/telegram/inline/inlinequeryresultcachedvideo.py @@ -35,7 +35,8 @@ class InlineQueryResultCachedVideo(InlineQueryResult): video_file_id (:obj:`str`): A valid file identifier for the video file. title (:obj:`str`): Title for the result. description (:obj:`str`): Optional. Short description of the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters after entities parsing. + caption (:obj:`str`): Optional. Caption of the video to be sent, 0-1024 characters after + entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -49,7 +50,8 @@ class InlineQueryResultCachedVideo(InlineQueryResult): video_file_id (:obj:`str`): A valid file identifier for the video file. title (:obj:`str`): Title for the result. description (:obj:`str`, optional): Short description of the result. - caption (:obj:`str`, optional): Caption, 0-1024 characters after entities parsing. + caption (:obj:`str`, optional): Caption of the video to be sent, 0-1024 characters after + entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultdocument.py b/telegram/inline/inlinequeryresultdocument.py index 215b96172..718ffdab8 100644 --- a/telegram/inline/inlinequeryresultdocument.py +++ b/telegram/inline/inlinequeryresultdocument.py @@ -33,7 +33,8 @@ class InlineQueryResultDocument(InlineQueryResult): type (:obj:`str`): 'document'. id (:obj:`str`): Unique identifier for this result, 1-64 bytes. title (:obj:`str`): Title for the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the document to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -52,7 +53,8 @@ class InlineQueryResultDocument(InlineQueryResult): Args: id (:obj:`str`): Unique identifier for this result, 1-64 bytes. title (:obj:`str`): Title for the result. - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption of the document to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -60,9 +62,9 @@ class InlineQueryResultDocument(InlineQueryResult): mime_type (:obj:`str`): Mime type of the content of the file, either "application/pdf" or "application/zip". description (:obj:`str`, optional): Short description of the result. - reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached + reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. - input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the + input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the message to be sent instead of the file. thumb_url (:obj:`str`, optional): URL of the thumbnail (jpeg only) for the file. thumb_width (:obj:`int`, optional): Thumbnail width. diff --git a/telegram/inline/inlinequeryresultgif.py b/telegram/inline/inlinequeryresultgif.py index 48a50fa13..16694aa54 100644 --- a/telegram/inline/inlinequeryresultgif.py +++ b/telegram/inline/inlinequeryresultgif.py @@ -37,14 +37,15 @@ class InlineQueryResultGif(InlineQueryResult): gif_duration (:obj:`int`): Optional. Duration of the GIF. thumb_url (:obj:`str`): URL of the static thumbnail for the result (jpeg or gif). title (:obj:`str`): Optional. Title for the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the GIF file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the - message to be sent instead of the gif. + message to be sent instead of the GIF animation. Args: id (:obj:`str`): Unique identifier for this result, 1-64 bytes. @@ -53,15 +54,16 @@ class InlineQueryResultGif(InlineQueryResult): gif_height (:obj:`int`, optional): Height of the GIF. gif_duration (:obj:`int`, optional): Duration of the GIF thumb_url (:obj:`str`): URL of the static thumbnail for the result (jpeg or gif). - title (:obj:`str`, optional): Title for the result.caption (:obj:`str`, optional): - caption (:obj:`str`, optional): Caption, 0-1024 characters + title (:obj:`str`, optional): Title for the result. + caption (:obj:`str`, optional): Caption of the GIF file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the - message to be sent instead of the gif. + message to be sent instead of the GIF animation. **kwargs (:obj:`dict`): Arbitrary keyword arguments. """ diff --git a/telegram/inline/inlinequeryresultmpeg4gif.py b/telegram/inline/inlinequeryresultmpeg4gif.py index 1c06e03be..c470b175c 100644 --- a/telegram/inline/inlinequeryresultmpeg4gif.py +++ b/telegram/inline/inlinequeryresultmpeg4gif.py @@ -38,14 +38,15 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): mpeg4_duration (:obj:`int`): Optional. Video duration. thumb_url (:obj:`str`): URL of the static thumbnail (jpeg or gif) for the result. title (:obj:`str`): Optional. Title for the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the - message to be sent instead of the MPEG-4 file. + message to be sent instead of the video animation. Args: id (:obj:`str`): Unique identifier for this result, 1-64 bytes. @@ -55,14 +56,15 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): mpeg4_duration (:obj:`int`, optional): Video duration. thumb_url (:obj:`str`): URL of the static thumbnail (jpeg or gif) for the result. title (:obj:`str`, optional): Title for the result. - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption of the MPEG-4 file to be sent, 0-1024 characters + after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the - message to be sent instead of the MPEG-4 file. + message to be sent instead of the video animation. **kwargs (:obj:`dict`): Arbitrary keyword arguments. """ diff --git a/telegram/inline/inlinequeryresultphoto.py b/telegram/inline/inlinequeryresultphoto.py index 698661d8c..47edb3aa1 100644 --- a/telegram/inline/inlinequeryresultphoto.py +++ b/telegram/inline/inlinequeryresultphoto.py @@ -38,7 +38,8 @@ class InlineQueryResultPhoto(InlineQueryResult): photo_height (:obj:`int`): Optional. Height of the photo. title (:obj:`str`): Optional. Title for the result. description (:obj:`str`): Optional. Short description of the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the photo to be sent, 0-1024 characters after + entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -56,7 +57,8 @@ class InlineQueryResultPhoto(InlineQueryResult): photo_height (:obj:`int`, optional): Height of the photo. title (:obj:`str`, optional): Title for the result. description (:obj:`str`, optional): Short description of the result. - caption (:obj:`str`, optional): Caption, 0-1024 characters + caption (:obj:`str`, optional): Caption of the photo to be sent, 0-1024 characters after + entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. diff --git a/telegram/inline/inlinequeryresultvideo.py b/telegram/inline/inlinequeryresultvideo.py index 492786502..3b93f5b5e 100644 --- a/telegram/inline/inlinequeryresultvideo.py +++ b/telegram/inline/inlinequeryresultvideo.py @@ -29,6 +29,10 @@ class InlineQueryResultVideo(InlineQueryResult): :attr:`input_message_content` to send a message with the specified content instead of the video. + Note: + If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must + replace its content using :attr:`input_message_content`. + Attributes: type (:obj:`str`): 'video'. id (:obj:`str`): Unique identifier for this result, 1-64 bytes. @@ -36,7 +40,8 @@ class InlineQueryResultVideo(InlineQueryResult): mime_type (:obj:`str`): Mime type of the content of video url, "text/html" or "video/mp4". thumb_url (:obj:`str`): URL of the thumbnail (jpeg only) for the video. title (:obj:`str`): Title for the result. - caption (:obj:`str`): Optional. Caption, 0-1024 characters + caption (:obj:`str`): Optional. Caption of the video to be sent, 0-1024 characters after + entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. @@ -47,7 +52,9 @@ class InlineQueryResultVideo(InlineQueryResult): reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the - message to be sent instead of the video. + message to be sent instead of the video. This field is required if + InlineQueryResultVideo is used to send an HTML-page as a result + (e.g., a YouTube video). Args: id (:obj:`str`): Unique identifier for this result, 1-64 bytes. @@ -66,7 +73,9 @@ class InlineQueryResultVideo(InlineQueryResult): reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the - message to be sent instead of the video. + message to be sent instead of the video. This field is required if + InlineQueryResultVideo is used to send an HTML-page as a result + (e.g., a YouTube video). **kwargs (:obj:`dict`): Arbitrary keyword arguments. """ diff --git a/telegram/inline/inlinequeryresultvoice.py b/telegram/inline/inlinequeryresultvoice.py index 8b802fa32..1474c3ae4 100644 --- a/telegram/inline/inlinequeryresultvoice.py +++ b/telegram/inline/inlinequeryresultvoice.py @@ -33,30 +33,30 @@ class InlineQueryResultVoice(InlineQueryResult): type (:obj:`str`): 'voice'. id (:obj:`str`): Unique identifier for this result, 1-64 bytes. voice_url (:obj:`str`): A valid URL for the voice recording. - title (:obj:`str`): Voice message title. + title (:obj:`str`): Recording title. caption (:obj:`str`): Optional. Caption, 0-1024 characters after entities parsing. parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show - bold, italic, fixed-width text or inline URLs in the media caption.. See the constants + bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. voice_duration (:obj:`int`): Optional. Recording duration in seconds. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the - message to be sent instead of the voice. + message to be sent instead of the voice recording. Args: id (:obj:`str`): Unique identifier for this result, 1-64 bytes. voice_url (:obj:`str`): A valid URL for the voice recording. - title (:obj:`str`): Voice message title. + title (:obj:`str`): Recording title. caption (:obj:`str`, optional): Caption, 0-1024 characters after entities parsing. parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show - bold, italic, fixed-width text or inline URLs in the media caption.. See the constants + bold, italic, fixed-width text or inline URLs in the media caption. See the constants in :class:`telegram.ParseMode` for the available modes. voice_duration (:obj:`int`, optional): Recording duration in seconds. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the - message to be sent instead of the voice. + message to be sent instead of the voice recording. **kwargs (:obj:`dict`): Arbitrary keyword arguments. """