danog\MadelineProto\EventHandler\Media\Voice
Author: Daniil Gentili daniil@daniil.it
Represents a voice message.
Properties
$waveform
:list<int<0, 31>>|null
$duration
:int
Audio duration in seconds$size
:int
Media filesize$fileName
:string
Media file name$fileExt
:string
Media file extension$creationDate
:int
Media creation date$mimeType
:string
Media MIME type$ttl
:?int
Time-to-live of media$thumbs
:list<array>
Thumbnails$videoThumbs
:list<array>
Video thumbnails$spoiler
:bool
Whether the media should be hidden behind a spoiler$botApiFileId
:string
File ID in bot API format (always present even for users)$botApiFileUniqueId
:string
Unique file ID in bot API format (always present even for users)$protected
:bool
Whether this media is protected
Method list:
getDownloadLink(string|null $scriptUrl = NULL): string
getStream(callable|null $cb = NULL, int $offset = 0, int $end = -1): \Amp\ByteStream\ReadableStream
downloadToDir(?string $path = NULL): string
downloadToFile(string $path): string
Methods:
getDownloadLink(string|null $scriptUrl = NULL): string
Gets a download link for any file up to 4GB.
Parameters:
$scriptUrl
:string|null
Optional path to custom download script (not needed when running via web)
getStream(callable|null $cb = NULL, int $offset = 0, int $end = -1): \Amp\ByteStream\ReadableStream
Get a readable amp stream with the file contents.
Parameters:
$cb
:callable|null
Progress callback$offset
:int
$end
:int
See also:
\Amp\ByteStream\ReadableStream
downloadToDir(?string $path = NULL): string
Download the media to working directory or passed path.
Parameters:
$path
:?string
downloadToFile(string $path): string
Download the media to file.
Parameters:
$path
:string
Generated by danog/phpdoc