Sulla is a javascript library which provides a high-level API control to Whatsapp so it can be configured to automatize resposes or any data that goes trough Whatsapp effortlessly.
It is built using puppeteer and based on this python wrapper
> npm i sulla
// import { create, Whatsapp } from 'sulla';
const sulla = require('sulla');
sulla.create().then(client => start(client));
function start(client) {
client.onMessage(message => {
if (message.body === 'Hi') {
client.sendText(message.from, '👋 Hello from sulla!');
}
});
}
After executing create()
function, sulla will create an instance of whatsapp web. If you are not logged in, it will print a QR code in the terminal. Scan it with your phone and you are ready to go!
Function | Description | Implemented |
---|---|---|
Receive message | ✅ | |
Send text | ✅ | |
Get contacts | ✅ | |
Get chats | ✅ | |
Get groups | ✅ | |
Get group members | ✅ | |
Send contact | ✅ | |
Get contact detail | ✅ | |
Send media (image, audio, doc) | ||
Send stickers | ||
Decrypt media (image, audio, doc) |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.