Share

No Title

Public

23 February 2021

Views: 18

case 'sgifwm':
if (isMedia && type === 'video' || mimetype === 'image/gif' || isQuotedVideo || isQuotedGif) {
try {
const encryptMedia = isQuotedGif || isQuotedVideo ? quotedMsg : message
const mediaData = await decryptMedia(encryptMedia, uaOverride)
const videoBase64 = `data:${mimetype};base64,${mediaData.toString('base64')}`
await client.sendMp4AsSticker(from, videoBase64, { fps: 10, startTime: `00:00:00.0`, endTime : `00:00:05.0`, loop: 0 }, { author: `by`, pack: `chikabot`, keepScale: true })
.then(async () => {
console.log(`Sticker processed for ${processTime(t, moment())} seconds`)
})
} catch (err) {
console.error(err)
await client.reply(from, `Error!`, id)
}
} else {
await client.reply(from, `Error!`, id)
}
break

Advertisement

Disable Third Party Ads