telegram.inlinequeryresultcachedaudio module

This module contains the classes that represent Telegram InlineQueryResultCachedAudio

class telegram.inlinequeryresultcachedaudio.InlineQueryResultCachedAudio(id, audio_file_id, caption=None, reply_markup=None, input_message_content=None, **kwargs)

Bases: telegram.inlinequeryresult.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 input_message_content to send a message with the specified content instead of the audio.

id

str

audio_file_id

str

caption

Optional[str]

reply_markup

Optional[telegram.InlineKeyboardMarkup]

input_message_content

Optional[telegram.input_message_content]

Deprecated: 4.0

message_text (str): Use InputTextMessageContent instead.

parse_mode (str): Use InputTextMessageContent instead.

disable_web_page_preview (bool): Use InputTextMessageContent instead.

Parameters:
  • audio_file_id (str) –
  • caption (Optional[str]) –
  • reply_markup (Optional[telegram.InlineKeyboardMarkup]) –
  • input_message_content (Optional[telegram.input_message_content]) –
  • **kwargs (dict) – Arbitrary keyword arguments.
static de_json(data, bot)