new Util()

Methods

async static

formatImageToWebpSticker(media) → Promise containing MessageMedia

Formats a image to webp

Parameter

Name Type Optional Description

media

MessageMedia

 

Returns

Promise containing MessageMedia 

media in webp format

async static

formatToWebpSticker(media, metadata) → Promise containing MessageMedia

Formats a media to webp

Parameters

Name Type Optional Description

media

MessageMedia

 

metadata

StickerMetadata

 

Returns

Promise containing MessageMedia 

media in webp format

async static

formatVideoToWebpSticker(media) → Promise containing MessageMedia

Formats a video to webp

Parameter

Name Type Optional Description

media

MessageMedia

 

Returns

Promise containing MessageMedia 

media in webp format

static

setFfmpegPath(path)

Configure ffmpeg path

Parameter

Name Type Optional Description

path

string