Closed alxxf closed 3 years ago
can i see you index.js file?
require('dotenv').config() const { decryptMedia, Client } = require('@open-wa/wa-automate') const moment = require('moment-timezone') moment.tz.setDefault('Asia/Jakarta').locale('id') const { downloader, cekResi, removebg, urlShortener, meme, translate, getLocationData } = require('../../lib') const { msgFilter, color, processTime, isUrl } = require('../../utils') const mentionList = require('../../utils/mention') const { uploadImages } = require('../../utils/fetcher')
const { menuId, menuEn } = require('./text') // Indonesian & English menu
module.exports = msgHandler = async (client = new Client(), message) => { try { const { type, id, from, t, sender, isGroupMsg, chat, caption, isMedia, mimetype, quotedMsg, quotedMsgObj, mentionedJidList } = message let { body } = message const { name, formattedTitle } = chat let { pushname, verifiedName, formattedName } = sender pushname = pushname || verifiedName || formattedName // verifiedName is the name of someone who uses a business account const botNumber = await client.getHostNumber() + '@c.us' const groupId = isGroupMsg ? chat.groupMetadata.id : '' const groupAdmins = isGroupMsg ? await client.getGroupAdmins(groupId) : '' const groupMembers = isGroupMsg ? await client.getGroupMembersId(groupId) : '' const isGroupAdmins = groupAdmins.includes(sender.id) || false const isBotGroupAdmins = groupAdmins.includes(botNumber) || false
// Bot Prefix
const prefix = '#'
body = (type === 'chat' && body.startsWith(prefix)) ? body : ((type === 'image' && caption) && caption.startsWith(prefix)) ? caption : ''
const command = body.slice(1).trim().split(/ +/).shift().toLowerCase()
const arg = body.trim().substring(body.indexOf(' ') + 1)
const args = body.trim().split(/ +/).slice(1)
const isCmd = body.startsWith(prefix)
const uaOverride = process.env.UserAgent
const url = args.length !== 0 ? args[0] : ''
const isQuotedImage = quotedMsg && quotedMsg.type === 'image'
// [BETA] Avoid Spam Message
if (isCmd && msgFilter.isFiltered(from) && !isGroupMsg) { return console.log(color('[SPAM]', 'red'), color(moment(t * 1000).format('DD/MM/YY HH:mm:ss'), 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname)) }
if (isCmd && msgFilter.isFiltered(from) && isGroupMsg) { return console.log(color('[SPAM]', 'red'), color(moment(t * 1000).format('DD/MM/YY HH:mm:ss'), 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname), 'in', color(name || formattedTitle)) }
//
if (!isCmd && !isGroupMsg) { return console.log('[RECV]', color(moment(t * 1000).format('DD/MM/YY HH:mm:ss'), 'yellow'), 'Message from', color(pushname)) }
if (!isCmd && isGroupMsg) { return console.log('[RECV]', color(moment(t * 1000).format('DD/MM/YY HH:mm:ss'), 'yellow'), 'Message from', color(pushname), 'in', color(name || formattedTitle)) }
if (isCmd && !isGroupMsg) { console.log(color('[EXEC]'), color(moment(t * 1000).format('DD/MM/YY HH:mm:ss'), 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname)) }
if (isCmd && isGroupMsg) { console.log(color('[EXEC]'), color(moment(t * 1000).format('DD/MM/YY HH:mm:ss'), 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname), 'in', color(name || formattedTitle)) }
// [BETA] Avoid Spam Message
msgFilter.addFilter(from)
switch (command) {
// Menu and TnC
case 'speed':
case 'ping':
await client.sendText(from, `Pong!!!!\nSpeed: ${processTime(t, moment())} _Second_`)
break
case 'tnc':
await client.sendText(from, menuId.textTnC())
break
case 'menu':
case 'help':
await client.sendText(from, menuId.textMenu(pushname))
.then(() => ((isGroupMsg) && (isGroupAdmins)) ? client.sendText(from, 'Menu Admin Grup: *#menuadmin*') : null)
break
case 'menuadmin':
if (!isGroupMsg) return client.reply(from, 'Maaf, perintah ini hanya dapat dipakai didalam grup! [Group Only]', id)
if (!isGroupAdmins) return client.reply(from, 'Gagal, perintah ini hanya dapat digunakan oleh admin grup! [Admin Group Only]', id)
await client.sendText(from, menuId.textAdmin())
break
case 'donate':
case 'donasi':
await client.sendText(from, menuId.textDonasi())
break
// Sticker Creator
case 'sticker':
case 'stiker': {
if ((isMedia || isQuotedImage) && args.length === 0) {
const encryptMedia = isQuotedImage ? quotedMsg : message
const _mimetype = isQuotedImage ? quotedMsg.mimetype : mimetype
const mediaData = await decryptMedia(encryptMedia, uaOverride)
const imageBase64 = `data:${_mimetype};base64,${mediaData.toString('base64')}`
client.sendImageAsSticker(from, imageBase64).then(() => {
client.reply(from, 'Here\'s your sticker')
console.log(`Sticker Processed for ${processTime(t, moment())} Second`)
})
} else if (args[0] === 'nobg') {
/**
* This is Premium feature.
* Check premium feature at https://trakteer.id/red-emperor/showcase or chat Author for Information.
*/
client.reply(from, 'ehhh, what\'s that???', id)
} else if (args.length === 1) {
if (!isUrl(url)) { await client.reply(from, 'Maaf, link yang kamu kirim tidak valid. [Invalid Link]', id) }
client.sendStickerfromUrl(from, url).then((r) => (!r && r !== undefined)
? client.sendText(from, 'Maaf, link yang kamu kirim tidak memuat gambar. [No Image]')
: client.reply(from, 'Here\'s your sticker')).then(() => console.log(`Sticker Processed for ${processTime(t, moment())} Second`))
} else {
await client.reply(from, 'Tidak ada gambar! Untuk membuka daftar perintah kirim #menu [Wrong Format]', id)
}
break
}
case 'stikergif':
case 'stickergif':
case 'gifstiker':
case 'gifsticker': {
if (args.length !== 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
const isGiphy = url.match(new RegExp(/https?:\/\/(www\.)?giphy.com/, 'gi'))
const isMediaGiphy = url.match(new RegExp(/https?:\/\/media.giphy.com\/media/, 'gi'))
if (isGiphy) {
const getGiphyCode = url.match(new RegExp(/(\/|\-)(?:.(?!(\/|\-)))+$/, 'gi'))
if (!getGiphyCode) { return client.reply(from, 'Gagal mengambil kode giphy', id) }
const giphyCode = getGiphyCode[0].replace(/[-\/]/gi, '')
const smallGifUrl = 'https://media.giphy.com/media/' + giphyCode + '/giphy-downsized.gif'
client.sendGiphyAsSticker(from, smallGifUrl).then(() => {
client.reply(from, 'Here\'s your sticker')
console.log(`Sticker Processed for ${processTime(t, moment())} Second`)
}).catch((err) => console.log(err))
} else if (isMediaGiphy) {
const gifUrl = url.match(new RegExp(/(giphy|source).(gif|mp4)/, 'gi'))
if (!gifUrl) { return client.reply(from, 'Gagal mengambil kode giphy', id) }
const smallGifUrl = url.replace(gifUrl[0], 'giphy-downsized.gif')
client.sendGiphyAsSticker(from, smallGifUrl).then(() => {
client.reply(from, 'Here\'s your sticker')
console.log(`Sticker Processed for ${processTime(t, moment())} Second`)
}).catch((err) => console.log(err))
} else {
await client.reply(from, 'maaf, untuk saat ini sticker gif hanya bisa menggunakan link dari giphy. [Giphy Only]', id)
}
break
}
// Video Downloader
case 'tiktok':
if (args.length !== 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
if (!isUrl(url) && !url.includes('tiktok.com')) return client.reply(from, 'Maaf, link yang kamu kirim tidak valid. [Invalid Link]', id)
await client.reply(from, `_Scraping Metadata..._ \n\n${menuId.textDonasi()}`, id)
downloader.tiktok(url).then(async (videoMeta) => {
const filename = videoMeta.authorMeta.name + '.mp4'
const caps = `*Metadata:*\nUsername: ${videoMeta.authorMeta.name} \nMusic: ${videoMeta.musicMeta.musicName} \nView: ${videoMeta.playCount.toLocaleString()} \nLike: ${videoMeta.diggCount.toLocaleString()} \nComment: ${videoMeta.commentCount.toLocaleString()} \nShare: ${videoMeta.shareCount.toLocaleString()} \nCaption: ${videoMeta.text.trim() ? videoMeta.text : '-'}`
await client.sendFileFromUrl(from, videoMeta.url, filename, videoMeta.NoWaterMark ? caps : `⚠ Video tanpa watermark tidak tersedia. \n\n${caps}`, '', { headers: { 'User-Agent': 'okhttp/4.5.0', referer: 'https://www.tiktok.com/' } }, true)
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
}).catch(() => client.reply(from, 'Gagal mengambil metadata, link yang kamu kirim tidak valid. [Invalid Link]', id))
break
case 'ig':
case 'instagram':
if (args.length !== 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
if (!isUrl(url) && !url.includes('instagram.com')) return client.reply(from, 'Maaf, link yang kamu kirim tidak valid. [Invalid Link]', id)
await client.reply(from, `_Scraping Metadata..._ \n\n${menuId.textDonasi()}`, id)
downloader.insta(url).then(async (data) => {
if (data.type == 'GraphSidecar') {
if (data.image.length != 0) {
data.image.map((x) => client.sendFileFromUrl(from, x, 'photo.jpg', '', null, null, true))
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
}
if (data.video.length != 0) {
data.video.map((x) => client.sendFileFromUrl(from, x.videoUrl, 'video.jpg', '', null, null, true))
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
}
} else if (data.type == 'GraphImage') {
client.sendFileFromUrl(from, data.image, 'photo.jpg', '', null, null, true)
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
} else if (data.type == 'GraphVideo') {
client.sendFileFromUrl(from, data.video.videoUrl, 'video.mp4', '', null, null, true)
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
}
})
.catch((err) => {
if (err === 'Not a video') { return client.reply(from, 'Error, tidak ada video di link yang kamu kirim. [Invalid Link]', id) }
client.reply(from, 'Error, user private atau link salah [Private or Invalid Link]', id)
})
break
case 'twt':
case 'twitter':
if (args.length !== 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
if (!isUrl(url) & !url.includes('twitter.com') || url.includes('t.co')) return client.reply(from, 'Maaf, url yang kamu kirim tidak valid. [Invalid Link]', id)
await client.reply(from, `_Scraping Metadata..._ \n\n${menuId.textDonasi()}`, id)
downloader.tweet(url).then(async (data) => {
if (data.type === 'video') {
const content = data.variants.filter(x => x.content_type !== 'application/x-mpegURL').sort((a, b) => b.bitrate - a.bitrate)
const result = await urlShortener(content[0].url)
console.log('Shortlink: ' + result)
await client.sendFileFromUrl(from, content[0].url, 'video.mp4', `Link Download: ${result} \n\nProcessed for ${processTime(t, moment())} _Second_`, null, null, true)
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
} else if (data.type === 'photo') {
for (let i = 0; i < data.variants.length; i++) {
await client.sendFileFromUrl(from, data.variants[i], data.variants[i].split('/media/')[1], '', null, null, true)
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
}
}
})
.catch(() => client.sendText(from, 'Maaf, link tidak valid atau tidak ada media di link yang kamu kirim. [Invalid Link]'))
break
case 'fb':
case 'facebook':
if (args.length !== 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
if (!isUrl(url) && !url.includes('facebook.com')) return client.reply(from, 'Maaf, url yang kamu kirim tidak valid. [Invalid Link]', id)
await client.reply(from, '_Scraping Metadata..._ \n\nTerimakasih telah menggunakan bot ini, kamu dapat membantu pengembangan bot ini dengan menyawer melalui https://saweria.co/donate/yogasakti atau mentrakteer melalui https://trakteer.id/red-emperor \nTerimakasih.', id)
downloader.facebook(url).then(async (videoMeta) => {
const title = videoMeta.response.title
const thumbnail = videoMeta.response.thumbnail
const links = videoMeta.response.links
const shorts = []
for (let i = 0; i < links.length; i++) {
const shortener = await urlShortener(links[i].url)
console.log('Shortlink: ' + shortener)
links[i].short = shortener
shorts.push(links[i])
}
const link = shorts.map((x) => `${x.resolution} Quality: ${x.short}`)
const caption = `Text: ${title} \n\nLink Download: \n${link.join('\n')} \n\nProcessed for ${processTime(t, moment())} _Second_`
await client.sendFileFromUrl(from, thumbnail, 'videos.jpg', caption, null, null, true)
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
})
.catch((err) => client.reply(from, `Error, url tidak valid atau tidak memuat video. [Invalid Link or No Video] \n\n${err}`, id))
break
// Other Command
case 'meme':
if ((isMedia || isQuotedImage) && args.length >= 2) {
const top = arg.split('|')[0]
const bottom = arg.split('|')[1]
const encryptMedia = isQuotedImage ? quotedMsg : message
const mediaData = await decryptMedia(encryptMedia, uaOverride)
const getUrl = await uploadImages(mediaData, false)
const ImageBase64 = await meme.custom(getUrl, top, bottom)
client.sendFile(from, ImageBase64, 'image.png', '', null, true)
.then((serialized) => console.log(`Sukses Mengirim File dengan id: ${serialized} diproses selama ${processTime(t, moment())}`))
.catch((err) => console.error(err))
} else {
await client.reply(from, 'Tidak ada gambar! Untuk membuka cara penggnaan kirim #menu [Wrong Format]', id)
}
break
case 'resi':
if (args.length !== 2) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
const kurirs = ['jne', 'pos', 'tiki', 'wahana', 'jnt', 'rpx', 'sap', 'sicepat', 'pcp', 'jet', 'dse', 'first', 'ninja', 'lion', 'idl', 'rex']
if (!kurirs.includes(args[0])) return client.sendText(from, `Maaf, jenis ekspedisi pengiriman tidak didukung layanan ini hanya mendukung ekspedisi pengiriman ${kurirs.join(', ')} Tolong periksa kembali.`)
console.log('Memeriksa No Resi', args[1], 'dengan ekspedisi', args[0])
cekResi(args[0], args[1]).then((result) => client.sendText(from, result))
break
case 'translate':
if (args.length != 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
if (!quotedMsg) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
const quoteText = quotedMsg.type == 'chat' ? quotedMsg.body : quotedMsg.type == 'image' ? quotedMsg.caption : ''
translate(quoteText, args[0])
.then((result) => client.sendText(from, result))
.catch(() => client.sendText(from, 'Error, Kode bahasa salah.'))
break
case 'waifu':
const data = fs.readFileSync('./lib/waifu.json')
const dataJson = JSON.parse(data)
const randIndex = Math.floor(Math.random() * dataJson.length)
const randKey = dataJson[randIndex]
client.sendFileFromUrl(from, randKey.image, 'Waifu.jpg', randKey.teks)
break
case 'ceklokasi':
if (quotedMsg.type !== 'location') return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
console.log(`Request Status Zona Penyebaran Covid-19 (${quotedMsg.lat}, ${quotedMsg.lng}).`)
const zoneStatus = await getLocationData(quotedMsg.lat, quotedMsg.lng)
if (zoneStatus.kode !== 200) client.sendText(from, 'Maaf, Terjadi error ketika memeriksa lokasi yang anda kirim.')
let data = ''
for (let i = 0; i < zoneStatus.data.length; i++) {
const { zone, region } = zoneStatus.data[i]
const _zone = zone == 'green' ? 'Hijau* (Aman) \n' : zone == 'yellow' ? 'Kuning* (Waspada) \n' : 'Merah* (Bahaya) \n'
data += `${i + 1}. Kel. *${region}* Berstatus *Zona ${_zone}`
}
const text = `*CEK LOKASI PENYEBARAN COVID-19*\nHasil pemeriksaan dari lokasi yang anda kirim adalah *${zoneStatus.status}* ${zoneStatus.optional}\n\nInformasi lokasi terdampak disekitar anda:\n${data}`
client.sendText(from, text)
break
// Group Commands (group admin only)
case 'kick':
if (!isGroupMsg) return client.reply(from, 'Maaf, perintah ini hanya dapat dipakai didalam grup! [Group Only]', id)
if (!isGroupAdmins) return client.reply(from, 'Gagal, perintah ini hanya dapat digunakan oleh admin grup! [Admin Group Only]', id)
if (!isBotGroupAdmins) return client.reply(from, 'Gagal, silahkan tambahkan bot sebagai admin grup! [Bot Not Admin]', id)
if (mentionedJidList.length === 0) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
if (mentionedJidList[0] === botNumber) return await client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
await client.sendTextWithMentions(from, `Request diterima, mengeluarkan:\n${mentionedJidList.map(x => `@${x.replace('@c.us', '')}`).join('\n')}`)
for (let i = 0; i < mentionedJidList.length; i++) {
if (groupAdmins.includes(mentionedJidList[i])) return await client.sendText(from, 'Gagal, kamu tidak bisa mengeluarkan admin grup.')
await client.removeParticipant(groupId, mentionedJidList[i])
}
break
case 'promote':
if (!isGroupMsg) return await client.reply(from, 'Maaf, perintah ini hanya dapat dipakai didalam grup! [Group Only]', id)
if (!isGroupAdmins) return await client.reply(from, 'Gagal, perintah ini hanya dapat digunakan oleh admin grup! [Admin Group Only]', id)
if (!isBotGroupAdmins) return await client.reply(from, 'Gagal, silahkan tambahkan bot sebagai admin grup! [Bot not Admin]', id)
if (mentionedJidList.length != 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format, Only 1 user]', id)
if (groupAdmins.includes(mentionedJidList[0])) return await client.reply(from, 'Maaf, user tersebut sudah menjadi admin. [Bot is Admin]', id)
if (mentionedJidList[0] === botNumber) return await client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
await client.promoteParticipant(groupId, mentionedJidList[0])
await client.sendTextWithMentions(from, `Request diterima, menambahkan @${mentionedJidList[0].replace('@c.us', '')} sebagai admin.`)
break
case 'demote':
if (!isGroupMsg) return client.reply(from, 'Maaf, perintah ini hanya dapat dipakai didalam grup! [Group Only]', id)
if (!isGroupAdmins) return client.reply(from, 'Gagal, perintah ini hanya dapat digunakan oleh admin grup! [Admin Group Only]', id)
if (!isBotGroupAdmins) return client.reply(from, 'Gagal, silahkan tambahkan bot sebagai admin grup! [Bot not Admin]', id)
if (mentionedJidList.length !== 1) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format, Only 1 user]', id)
if (!groupAdmins.includes(mentionedJidList[0])) return await client.reply(from, 'Maaf, user tersebut tidak menjadi admin. [user not Admin]', id)
if (mentionedJidList[0] === botNumber) return await client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
await client.demoteParticipant(groupId, mentionedJidList[0])
await client.sendTextWithMentions(from, `Request diterima, menghapus jabatan @${mentionedJidList[0].replace('@c.us', '')}.`)
break
case 'bye':
if (!isGroupMsg) return client.reply(from, 'Maaf, perintah ini hanya dapat dipakai didalam grup! [Group Only]', id)
if (!isGroupAdmins) return client.reply(from, 'Gagal, perintah ini hanya dapat digunakan oleh admin grup! [Admin Group Only]', id)
client.sendText(from, 'Good bye... ( ⇀‸↼‶ )').then(() => client.leaveGroup(groupId))
break
case 'del':
if (!isGroupAdmins) return client.reply(from, 'Gagal, perintah ini hanya dapat digunakan oleh admin grup! [Admin Group Only]', id)
if (!quotedMsg) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
if (!quotedMsgObj.fromMe) return client.reply(from, 'Maaf, format pesan salah silahkan periksa menu. [Wrong Format]', id)
client.deleteMessage(quotedMsgObj.chatId, quotedMsgObj.id, false)
break
case 'tagall':
case 'everyone':
/**
* This is Premium feature.
* Check premium feature at https://trakteer.id/red-emperor/showcase or chat Author for Information.
*/
client.reply(from, 'ehhh, what\'s that???', id)
break
case 'botstat': {
const loadedMsg = await client.getAmountOfLoadedMessages()
const chatIds = await client.getAllChatIds()
const groups = await client.getAllGroups()
client.sendText(from, `Status :\n- *${loadedMsg}* Loaded Messages\n- *${groups.length}* Group Chats\n- *${chatIds.length - groups.length}* Personal Chats\n- *${chatIds.length}* Total Chats`)
break
}
default:
console.log(color('[ERROR]', 'red'), color(moment(t * 1000).format('DD/MM/YY HH:mm:ss'), 'yellow'), 'Unregistered Command from', color(pushname))
break
}
} catch (err) {
console.log(color('[ERROR]', 'red'), err)
}
}
ya kalo didalam case ada deklarasi tambahin bracket { } lah
gini nih
case 'waifu': {
const data = fs.readFileSync('./lib/waifu.json')
const dataJson = JSON.parse(data)
const randIndex = Math.floor(Math.random() * dataJson.length)
const randKey = dataJson[randIndex]
client.sendFileFromUrl(from, randKey.image, 'Waifu.jpg', randKey.teks)
break
}
oalah iya bg, thx hehe awam soalna
SyntaxError: Identifier 'data' has already been declared at wrapSafe (internal/modules/cjs/loader.js:1053:16) at Module._compile (internal/modules/cjs/loader.js:1101:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Module.require (internal/modules/cjs/loader.js:1025:19) at require (internal/modules/cjs/helpers.js:72:18) at Object. (C:\bot\imageToSticker\index.js:4:20)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! whatsapp-bot-sticker-creator@10.0.0 start:
node index.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the whatsapp-bot-sticker-creator@10.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\apil\AppData\Roaming\npm-cache_logs\2020-09-17T14_51_15_203Z-debug.log