> git clone https://github.com/Rex-Arnab/Jarvis_Whatsapp_Bot_2.0.git
A WhatsApp API client that connects through the WhatsApp Web browser app
It uses Puppeteer 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.
The module is now available on npm! npm i whatsapp-web.js
Please note that Node v10.18.1+ is required due to Puppeteer.
const { Client } = require('whatsapp-web.js');
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 for another example with more use cases.
Make sure all the necessary dependencies are installed. https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
Feature | Status |
---|---|
Send messages | ✅ |
Receive messages | ✅ |
Send media (images/audio/documents) | ✅ |
Send media (video) | ✅ (requires google chrome) |
Send stickers | ✅ |
Receive media (images/audio/video/documents) | ✅ |
Send contact cards | ✅ |
Send location | ✅ |
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 | ✅ |
Something missing? Make an issue and let us know!
Sticker Creator | Feature |
---|---|
✅ | Send Photo with Caption |
✅ | Reply A Photo |
❌ | Image Url |
❌ | Send Video or GIF with Caption |
Downloader | Feature |
---|---|
❌ | YouTube mp3/mp4 Downloader |
❌ | Doujin Downloader |
❌ | Instagram Video/Image Downloader |
❌ | Facebook Video Downloader |
Other | Feature |
---|---|
❌ | Get a random meme |
❌ | Text to speech |
❌ | Get a random waifu images |
❌ | Get a random quotes |
❌ | Get a random anime quotes |
❌ | Get info gempa from BMKG |
❌ | Weather's report's |
❌ | Wikipedia |
❌ | Anime searcher |
❌ | Get a random cat images |
❌ | Get a random dog images |
And | Others... |
Group Only | Feature |
---|---|
✅ | Promote User |
✅ | Demote User |
✅ | Kick User |
✅ | Add User |
✅ | Mention All User |
✅ | Get link group |
❌ | Get Admin list |
❌ | Get owner group |
❌ | enable or disable nsfw command |
❌ | enable or disable welcome feature |
Owner Group Only | Feature |
---|---|
❌ | Kick All Member Group |
Owner Bot Only | Feature |
---|---|
❌ | leave all group |
❌ | clear all message |
❌ | Broadcast |