I recive the following error while sending a media with the message options for the caption:
C:\Users\giova\Desktop\bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
^
Error: Evaluation failed: TypeError: e.match is not a function
at t.validateAndGetParts (https://web.whatsapp.com/app.d5fe617c5b54f888d7bb.js:307:227600)
at new f (https://web.whatsapp.com/app.d5fe617c5b54f888d7bb.js:307:215779)
at Object.d [as createWid] (https://web.whatsapp.com/app.d5fe617c5b54f888d7bb.js:307:222220)
at puppeteer_evaluation_script:2:53
at ExecutionContext._evaluateInternal (C:\Users\giova\Desktop\bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (C:\Users\giova\Desktop\bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16)
at async Client.sendMessage (C:\Users\giova\Desktop\bot\node_modules\whatsapp-web.js\src\Client.js:888:28)
at async exports.run (C:\Users\giova\Desktop\bot\commands\profile.js:110:9)
the interested code is:
let media = await MessageMedia.fromUrl(pfp,{
filename:userimage from wa.me/${botNumber},
unsafeMime:true
});
await message.reply(media, {
caption:profiletxt
})
pfp, botNumber and profiletxt are all defined