telegram.inlinequeryresultcachedvoice module

This module contains the classes that represent Telegram InlineQueryResultCachedVoice

class telegram.inlinequeryresultcachedvoice.InlineQueryResultCachedVoice(id, voice_file_id, title, caption=None, reply_markup=None, input_message_content=None, **kwargs)

Bases: telegram.inlinequeryresult.InlineQueryResult

Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.

voice_file_id

str – A valid file identifier for the voice message.

title

str – Voice message title.

caption

Optional[str] – Caption, 0-200 characters.

reply_markup

Optional[telegram.InlineKeyboardMarkup] – Inline keyboard attached to the message.

input_message_content

Optional[telegram.InputMessageContent] – Content of the message to be sent instead of the voice message.

Parameters:
static de_json(data, bot)