JFCodes/WhatsAppJS ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript library that acts like a simple wrapper around WhatsApp Web so I can automate sending messages from a logged in account.
I want it to use a browser based approach, like opening WhatsApp Web in a controlled browser session, and expose a clean API for common things like connecting, checking login status, sending a message, and handling basic events or responses. Make it feel easy to use from another app, with clear functions and types, and include a small example of how to start it and send a chat message.
Keep it focused on WhatsApp Web only, without any extra server or data collection stuff. Use the current WhatsApp Web flow, and if you need to check the latest browser or automation docs, look them up online. Since this is meant for a real account, make the login and QR flow obvious and safe to use, with good comments and sensible error handling.
Are you gonna build this?
make sure you review the code using coderabbit