danog\MadelineProto\EventHandler\Media\MaskSticker
Author: Daniil Gentili daniil@daniil.it
Represents a mask sticker.
Properties
$position
:danog\MadelineProto\EventHandler\Media\MaskPosition
Part of the face, relative to which the mask should be placed.$x
:float
Shift by X-axis measured in widths of the mask scaled to the face size, from left to right.
For example, -1.0 will place the mask just to the left of the default mask position.
$y
:float
Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right.
For example, -1.0 will place the mask just below the default mask position.
$zoom
:float
Mask scaling coefficient.
For example, 2.0 means a doubled size.
$emoji
:string
Emoji representation of sticker$stickerset
:array
Associated stickerset$width
:?int
$height
:?int
$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)$encrypted
:bool
Whether this media originates from a secret chat.$thumb
:?danog\MadelineProto\TL\Types\Bytes
Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90) only for secret chats.$thumbHeight
:?int
Thumbnail height only for secret chats.$thumbWidth
:?int
Thumbnail width only for secret chats.$protected
:bool
Whether this media is protected
Method list:
getDownloadLink((string|null) $scriptUrl = NULL): string
getStream((callable(float, float, float): voi)|null) $cb = NULL, int $offset = 0, int $end = -1, ?\Amp\Cancellation $cancellation = NULL): \Amp\ByteStream\ReadableStream
downloadToDir(string $dir = NULL, (callable(float, float, float): voi)|null) $cb = NULL, ?\Amp\Cancellation $cancellation = NULL): string
downloadToFile(string $file, (callable(float, float, float): voi)|null) $cb = NULL, ?\Amp\Cancellation $cancellation = NULL): string
getDownloadInfo(): array{ext: string, name: string, mime: string, size: int, InputFileLocation: array, key_fingerprint?: string, key?: string, iv?: 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(float, float, float): voi)|null) $cb = NULL, int $offset = 0, int $end = -1, ?\Amp\Cancellation $cancellation = NULL): \Amp\ByteStream\ReadableStream
Get a readable amp stream with the file contents.
Parameters:
$cb
:(callable(float, float, float): voi)|null)
Progress callback$offset
:int
$end
:int
$cancellation
:?\Amp\Cancellation
See also:
\Amp\Cancellation
\Amp\ByteStream\ReadableStream
downloadToDir(string $dir = NULL, (callable(float, float, float): voi)|null) $cb = NULL, ?\Amp\Cancellation $cancellation = NULL): string
Download the media to working directory or passed path.
Parameters:
$dir
:string
Directory where to download the file$cb
:(callable(float, float, float): voi)|null)
Progress callback$cancellation
:?\Amp\Cancellation
See also:
\Amp\Cancellation
downloadToFile(string $file, (callable(float, float, float): voi)|null) $cb = NULL, ?\Amp\Cancellation $cancellation = NULL): string
Download the media to file.
Parameters:
$file
:string
Downloaded file path$cb
:(callable(float, float, float): voi)|null)
Progress callback$cancellation
:?\Amp\Cancellation
See also:
\Amp\Cancellation
getDownloadInfo(): array{ext: string, name: string, mime: string, size: int, InputFileLocation: array, key_fingerprint?: string, key?: string, iv?: string}
Generated by danog/phpdoc