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

See also: 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.
Inheritance: extends AbstractInlineQueryResult
Afficher le fichier Open project: TelegramBot/Api

Protected Properties

Свойство Type Description
$map array
$requiredParams array
$type string
$voiceDuration integer Optional. Audio duration in seconds
$voiceUrl string A valid URL for the audio file

Méthodes publiques

Méthode Description
__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 )

Method Details

__construct() public méthode

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 méthode

public getVoiceDuration ( ) : integer
Résultat integer

getVoiceUrl() public méthode

public getVoiceUrl ( ) : string
Résultat string

setVoiceDuration() public méthode

public setVoiceDuration ( integer $voiceDuration )
$voiceDuration integer

setVoiceUrl() public méthode

public setVoiceUrl ( string $voiceUrl )
$voiceUrl string

Property Details

$map protected_oe static_oe property

protected static array $map
Résultat array

$requiredParams protected_oe static_oe property

protected static array $requiredParams
Résultat array

$type protected_oe property

protected string $type
Résultat string

$voiceDuration protected_oe property

Optional. Audio duration in seconds
protected int $voiceDuration
Résultat integer

$voiceUrl protected_oe property

A valid URL for the audio file
protected string $voiceUrl
Résultat string