PHP Class TelegramBot\Api\Types\Inline\QueryResult\Audio

See also: https://core.telegram.org/bots/api#inlinequeryresultaudio Represents a link to an mp3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use InputMessageContent to send a message with the specified content instead of the audio. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Inheritance: extends AbstractInlineQueryResult
Show file Open project: TelegramBot/Api

Protected Properties

Property Type Description
$audioDuration integer Optional. Audio duration in seconds
$audioUrl string A valid URL for the audio file
$map array
$performer string Optional. Performer
$requiredParams array
$type string

Public Methods

Method Description
__construct ( string $id, string $audioUrl, string $title, string | null $performer = null, integer | null $audioDuration = null, TelegramBot\Api\Types\Inline\InputMessageContent | null $inputMessageContent = null, TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null $inlineKeyboardMarkup = null ) Audio constructor.
getAudioDuration ( ) : integer
getAudioUrl ( ) : string
getPerformer ( ) : string
setAudioDuration ( integer $audioDuration )
setAudioUrl ( string $audioUrl )
setPerformer ( string $performer )

Method Details

__construct() public method

Audio constructor.
public __construct ( string $id, string $audioUrl, string $title, string | null $performer = null, integer | null $audioDuration = null, TelegramBot\Api\Types\Inline\InputMessageContent | null $inputMessageContent = null, TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null $inlineKeyboardMarkup = null )
$id string
$audioUrl string
$title string
$performer string | null
$audioDuration integer | null
$inputMessageContent TelegramBot\Api\Types\Inline\InputMessageContent | null
$inlineKeyboardMarkup TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null

getAudioDuration() public method

public getAudioDuration ( ) : integer
return integer

getAudioUrl() public method

public getAudioUrl ( ) : string
return string

getPerformer() public method

public getPerformer ( ) : string
return string

setAudioDuration() public method

public setAudioDuration ( integer $audioDuration )
$audioDuration integer

setAudioUrl() public method

public setAudioUrl ( string $audioUrl )
$audioUrl string

setPerformer() public method

public setPerformer ( string $performer )
$performer string

Property Details

$audioDuration protected property

Optional. Audio duration in seconds
protected int $audioDuration
return integer

$audioUrl protected property

A valid URL for the audio file
protected string $audioUrl
return string

$map protected static property

protected static array $map
return array

$performer protected property

Optional. Performer
protected string $performer
return string

$requiredParams protected static property

protected static array $requiredParams
return array

$type protected property

protected string $type
return string