Skip to main content

Sticker

This object represents a sticker.

πŸ“ Schema​

FieldTypeDescription
file_idStringIdentifier for this file, which can be used to download or reuse the file
file_unique_idStringUnique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
typeStringType of the sticker, currently one of β€œregular”, β€œmask”.
widthIntegerSticker width
heightIntegerSticker height
file_sizeIntegerOptional. File size in bytes

βš™οΈ Get methods​

getFileId()​

Retrieves the unique identifier of the sticker file that can be used to download or reuse the file.

$file_id = $stickerObject->getFileId();

getFileUniqueId()​

Retrieves the unique file identifier for this sticker, useful for tracking this file across different sessions and bots.

$file_unique_id = $stickerObject->getFileUniqueId();

getType()​

Returns the type of the sticker, either β€œregular” or β€œmask”.

$type = $stickerObject->getType();

getWidth()​

Gets the width of the sticker in pixels.

$width = $stickerObject->getWidth();

getHeight()​

Gets the height of the sticker in pixels.

$height = $stickerObject->getHeight();

getFileSize()​

Retrieves the file size in bytes, if available.

$file_size = $stickerObject->getFileSize();

βž• More​

tip

For further information, refer to the official Bale documentation for more details.