PHP Класс TelegramBot\Api\Types\Inline\QueryResult\Voice

См. также: https://core.telegram.org/bots/api#inlinequeryresultvoice 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.
Наследование: extends AbstractInlineQueryResult
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$map array
$requiredParams array
$type string
$voiceDuration integer Optional. Audio duration in seconds
$voiceUrl string A valid URL for the audio file

Открытые методы

Метод Описание
__construct ( string $id, string $voiceUrl, string $title, integer | null $voiceDuration = null, TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null $inlineKeyboardMarkup = null, TelegramBot\Api\Types\Inline\InputMessageContent | null $inputMessageContent = null ) Voice constructor
getVoiceDuration ( ) : integer
getVoiceUrl ( ) : string
setVoiceDuration ( integer $voiceDuration )
setVoiceUrl ( string $voiceUrl )

Описание методов

__construct() публичный Метод

Voice constructor
public __construct ( string $id, string $voiceUrl, string $title, integer | null $voiceDuration = null, TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null $inlineKeyboardMarkup = null, TelegramBot\Api\Types\Inline\InputMessageContent | null $inputMessageContent = null )
$id string
$voiceUrl string
$title string
$voiceDuration integer | null
$inlineKeyboardMarkup TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null
$inputMessageContent TelegramBot\Api\Types\Inline\InputMessageContent | null

getVoiceDuration() публичный Метод

public getVoiceDuration ( ) : integer
Результат integer

getVoiceUrl() публичный Метод

public getVoiceUrl ( ) : string
Результат string

setVoiceDuration() публичный Метод

public setVoiceDuration ( integer $voiceDuration )
$voiceDuration integer

setVoiceUrl() публичный Метод

public setVoiceUrl ( string $voiceUrl )
$voiceUrl string

Описание свойств

$map защищенное статическое свойство

protected static array $map
Результат array

$requiredParams защищенное статическое свойство

protected static array $requiredParams
Результат array

$type защищенное свойство

protected string $type
Результат string

$voiceDuration защищенное свойство

Optional. Audio duration in seconds
protected int $voiceDuration
Результат integer

$voiceUrl защищенное свойство

A valid URL for the audio file
protected string $voiceUrl
Результат string