mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 11:39:14 +00:00
Compare commits
3 Commits
patch-part
...
auto-wa-we
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2f31092a5 | ||
|
|
8655badc0f | ||
|
|
a7b77e15ed |
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
github: [pedroslopez, PurpShell]
|
||||||
|
ko_fi: pedroslopez
|
||||||
|
custom: ["paypal.me/psla", "buymeacoff.ee/pedroslopez"]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[](https://www.npmjs.com/package/whatsapp-web.js) [](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765)  [](https://discord.gg/H7DqQs4)
|
[](https://www.npmjs.com/package/whatsapp-web.js) [](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765)  [](https://discord.gg/H7DqQs4)
|
||||||
|
|
||||||
# whatsapp-web.js
|
# whatsapp-web.js
|
||||||
A WhatsApp API client that connects through the WhatsApp Web browser app
|
A WhatsApp API client that connects through the WhatsApp Web browser app
|
||||||
@@ -94,7 +94,7 @@ You can support the maintainer of this project through the links below
|
|||||||
|
|
||||||
- [Support via GitHub Sponsors](https://github.com/sponsors/pedroslopez)
|
- [Support via GitHub Sponsors](https://github.com/sponsors/pedroslopez)
|
||||||
- [Support via PayPal](https://www.paypal.me/psla/)
|
- [Support via PayPal](https://www.paypal.me/psla/)
|
||||||
- [Sign up for DigitalOcean](https://m.do.co/c/73f906a36ed4) and get $100 in credit when you sign up (Referral)
|
- [Sign up for DigitalOcean](https://m.do.co/c/73f906a36ed4) and get $200 in credit when you sign up (Referral)
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
|
|||||||
@@ -257,6 +257,15 @@ client.on('change_state', state => {
|
|||||||
console.log('CHANGE STATE', state );
|
console.log('CHANGE STATE', state );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Change to false if you don't want to reject incoming calls
|
||||||
|
let rejectCalls = true;
|
||||||
|
|
||||||
|
client.on('call', async (call) => {
|
||||||
|
console.log('Call received, rejecting. GOTO Line 261 to disable', call);
|
||||||
|
if (rejectCalls) await call.reject();
|
||||||
|
await client.sendMessage(call.from, `[${call.fromMe ? 'Outgoing' : 'Incoming'}] Phone call from ${call.from}, type ${call.isGroup ? 'group' : ''} ${call.isVideo ? 'video' : 'audio'} call. ${rejectCalls ? 'This call was automatically rejected by the script.' : ''}`);
|
||||||
|
});
|
||||||
|
|
||||||
client.on('disconnected', (reason) => {
|
client.on('disconnected', (reason) => {
|
||||||
console.log('Client was logged out', reason);
|
console.log('Client was logged out', reason);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ exports.Events = {
|
|||||||
DISCONNECTED: 'disconnected',
|
DISCONNECTED: 'disconnected',
|
||||||
STATE_CHANGED: 'change_state',
|
STATE_CHANGED: 'change_state',
|
||||||
BATTERY_CHANGED: 'change_battery',
|
BATTERY_CHANGED: 'change_battery',
|
||||||
INCOMING_CALL: 'incoming_call',
|
INCOMING_CALL: 'call',
|
||||||
REMOTE_SESSION_SAVED: 'remote_session_saved'
|
REMOTE_SESSION_SAVED: 'remote_session_saved'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.2245.9
|
2.2247.7
|
||||||
Reference in New Issue
Block a user