WAppAI / assistant

A WhatsApp chatbot that leverages Bing AI's and others LLMs conversational capabilities.
MIT License
94 stars 31 forks source link

Update broke everything #11

Closed dinushay closed 1 year ago

dinushay commented 1 year ago

After I did git pull and tried to write a message, this message came up after the AI ​​tried to send the message

root/sydney-whatsapp-chatbot/node_modules/whatsapp-web.js/src/structures/Message.js:91
        this.deviceType = data.id.id.length > 21 ? 'android' : data.id.id.substring(0, 2) == '3A' ? 'ios' : 'web';
                                                                          ^
TypeError: data.id.id.substring is not a function
    at Message._patch (/root/sydney-whatsapp-chatbot/node_modules/whatsapp-web.js/src/structures/Message.js:91:75)
    at new Message (/root/sydney-whatsapp-chatbot/node_modules/whatsapp-web.js/src/structures/Message.js:18:24)
    at Client.sendMessage (/root/sydney-whatsapp-chatbot/node_modules/whatsapp-web.js/src/Client.js:699:16)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
veigamann commented 1 year ago

This is due to whatsapp-web.js being outdated. Try running yarn install so it updates automatically. If that doesn't work, run yarn upgrade-interactive --latest then select whatsapp-web.js with spacebar and press enter.

veigamann commented 1 year ago

To prevent these kinds of issues of happening, I think we need to add a release system, so every release is a fully functional minimum viable product.

dinushay commented 1 year ago

GitHub supports such a release system