wwebjs/whatsapp-web.js ? reverse-engineered prompt
Reverse engineered prompt
Hey, can you build me a WhatsApp bot using Node.js? I want to run a script that can connect to my WhatsApp account and automate some tasks.
It should work by using a browser in the background to connect to WhatsApp Web. For authentication, I'd like it to generate a QR code in my terminal that I can scan with my phone's WhatsApp app to log in.
Once it's connected and ready, I want it to be able to listen for incoming messages and automatically reply based on keywords. For instance, if someone messages "!ping", the bot should reply with "pong". I also need the ability to send messages, images, and maybe even react to messages with emojis. It would also be great if it could manage group chats, like adding or removing people. Basically, I need a script that gives me programmatic control over my WhatsApp.
Are you gonna build this?
make sure you review the code using coderabbit