telegram.InlineQueryResultVoice¶
- class telegram.InlineQueryResultVoice(id, voice_url, title, voice_duration=None, caption=None, reply_markup=None, input_message_content=None, parse_mode=None, caption_entities=None, *, api_kwargs=None)[source]¶
Bases:
telegram.InlineQueryResultRepresents a link to a voice recording in an .ogg container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use
input_message_contentto send a message with the specified content instead of the voice message.- Parameters
caption (
str, optional) – Caption, 0-1024characters after entities parsing.parse_mode (
str, optional) – Mode for parsing entities. Seetelegram.constants.ParseModeand formatting options for more details.caption_entities (List[
telegram.MessageEntity], optional) – List of special entities that appear in the caption, which can be specified instead ofparse_mode.voice_duration (
int, optional) – Recording duration in seconds.reply_markup (
telegram.InlineKeyboardMarkup, optional) – Inline keyboard attached to the message.input_message_content (
telegram.InputMessageContent, optional) – Content of the message to be sent instead of the voice recording.
- parse_mode[source]¶
Optional. Mode for parsing entities. See
telegram.constants.ParseModeand formatting options for more details.- Type
- caption_entities[source]¶
Optional. List of special entities that appear in the caption, which can be specified instead of
parse_mode.- Type
List[
telegram.MessageEntity]