stegripe / bajigur

A simple and easy-to-use WhatsApp bot project, written in TypeScript.
GNU Affero General Public License v3.0
168 stars 53 forks source link

[Bug Report] Commands `/avatar` causing module crash #275

Closed brianabdl closed 1 year ago

brianabdl commented 2 years ago

Log:

const isDataURL = (s) => !!s.match(/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[\w\W]*?[^;])*),(.+)$/g);
                             ^

TypeError: Cannot read properties of undefined (reading 'match')
    at isDataURL (D:\Data\WebProjects\whatsapp-bot\node_modules\@open-wa\wa-automate\dist\utils\tools.js:133:30)
    at Client.<anonymous> (D:\Data\WebProjects\whatsapp-bot\node_modules\@open-wa\wa-automate\dist\api\Client.js:1572:40)
    at Generator.next (<anonymous>)
    at D:\Data\WebProjects\whatsapp-bot\node_modules\@open-wa\wa-automate\dist\api\Client.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (D:\Data\WebProjects\whatsapp-bot\node_modules\@open-wa\wa-automate\dist\api\Client.js:23:12)
    at Client.sendImage (D:\Data\WebProjects\whatsapp-bot\node_modules\@open-wa\wa-automate\dist\api\Client.js:1570:16)
    at AvatarCommand.execute (file:///D:/Data/WebProjects/whatsapp-bot/dist/commands/general/AvatarCommand.js:18:39)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async file:///D:/Data/WebProjects/whatsapp-bot/dist/structures/WhatsappBot.js:18:17
noxzym commented 1 year ago

invalid issue since we migrate to baileys and removed that command