Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dikaardnt/wajs
an open source to connect WhatsApp Web via playwright
https://github.com/dikaardnt/wajs
playwright playwright-javascript whatsapp-bot whatsapp-web whatsapp-webdriver
Last synced: 27 days ago
JSON representation
an open source to connect WhatsApp Web via playwright
- Host: GitHub
- URL: https://github.com/dikaardnt/wajs
- Owner: DikaArdnt
- License: apache-2.0
- Created: 2023-12-06T18:03:21.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-04-16T05:20:39.000Z (7 months ago)
- Last Synced: 2024-10-09T11:23:55.431Z (27 days ago)
- Topics: playwright, playwright-javascript, whatsapp-bot, whatsapp-web, whatsapp-webdriver
- Language: JavaScript
- Homepage: https://wajs.dikaardnt.com/
- Size: 610 KB
- Stars: 21
- Watchers: 3
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Special Big Thanks To
Pedro S. Lopez
Author of whatsapp-web.js
Edgard Lorraine Messias
Author of wa-js
# Info
This repo is the result of a recode from the [pedroslopez/whatsapp-web.js](https://github.com/pedroslopez/whatsapp-web.js) repo and additions from [wppconnect-team/wa-js](https://github.com/wppconnect-team/wa-js)# wajs
A WhatsApp API client that connects through the WhatsApp Web browser appIt uses Playwright to run a real instance of Whatsapp Web to avoid getting blocked.
**NOTE:** I can't guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.
## Quick Links
* [GitHub](https://github.com/DikaArdnt/wajs)
## Installation
The module is now available on npm! `npm i github:DikaArdnt/wajs`
Please note that Node v12+ is required.
## Example usage
```js
const { Client } = require('@dikaardnt/wajs');const client = new Client();
client.on('qr', (qr) => {
// Generate and scan this code with your phone
console.log('QR RECEIVED', qr);
});client.on('ready', () => {
console.log('Client is ready!');
});client.on('message', msg => {
if (msg.body == '!ping') {
msg.reply('pong');
}
});client.initialize();
```Take a look at [example.js](https://github.com/DikaArdnt/wajs/blob/master/example.js) for another example with more use cases.
## Supported features
| Feature | Status |
| ------------- | ------------- |
| Multi Device | ✅ |
| Send messages | ✅ |
| Receive messages | ✅ |
| Send media (images/audio/documents) | ✅ |
| Send media (video) | ✅ |
| Send stickers | ✅ |
| Receive media (images/audio/video/documents) | ✅ |
| Send contact cards | ✅ |
| Send location | ✅ |
| Send status | ✅ |
| Receive location | ✅ |
| Message replies | ✅ |
| Join groups by invite | ✅ |
| Get invite for group | ✅ |
| Modify group info (subject, description) | ✅ |
| Modify group settings (send messages, edit info) | ✅ |
| Add group participants | ✅ |
| Kick group participants | ✅ |
| Promote/demote group participants | ✅ |
| Mention users | ✅ |
| Mute/unmute chats | ✅ |
| Block/unblock contacts | ✅ |
| Get contact info | ✅ |
| Get profile pictures | ✅ |
| Set user status message | ✅ |
| React to messages | ✅ |Something missing? Make an issue and let us know!
## Contributing
Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.
## Supporting the project
You can support the maintainer of this project through the links below
- [Support via PayPal](https://www.paypal.me/CakHaho)
- [Support via Saweria](https://saweria.co/DikaArdnt)
- [Support via Trakteer](https://trakteer.id/cakhaho)## Disclaimer
This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at https://whatsapp.com. "WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners.