Skip to content

export Class

Sticker ​

extends ​

File

implements ​

StickerFilePacket

Constructor ​

ts
new Sticker( packet )
ParameterTypeDescription
packet?string | FilePacketThe packet, the filel_id, or absolute path to the file to read.

Properties ​

get form : [string, ReadStream, string] ​

get id : string ​

readonly client? : Client ​

The client will only be availble if the class is passed by tgx-core itself.

custom_emoji_id? : string ​

emoji? : string ​

file_id? : string ​

file_path? : string ​

file_size? : number ​

file_unique_id? : string ​

height? : number ​

is_animated? : boolean ​

is_video? : boolean ​

mask_position? : MaskPosition ​

needs_repainting? : true ​

path? : string ​

premium_animation? : File | FilePacket ​

set_name? : string ​

thumbnail? : PhotoSizeFilePacket ​

type? : "regular" | "maks" | "custom_emoji" ​

width? : number ​

Methods ​

asyncdownload( path ) ​

Fetches the file and downloads it.

ParameterTypeDescription
pathstringLeave empty if you want a stream, or an absolute path to the file where you want to write the Stream.

Returns: Promise<boolean | internal.Stream>

asyncfetch( ) ​

Fetch the file from Telegram, this is required for downloading the file.

Returns: Promise<boolean | Sticker>