Comparing version 0.1.17 to 0.1.18
@@ -1,3 +0,2 @@ | ||
// const wa = require('waweb-phi') | ||
const wa = require('./index') | ||
const wa = require('waweb-phi') | ||
@@ -8,10 +7,9 @@ | ||
authTimeout: 30000, | ||
// u can passing wa session here, and example, just uncoment and change to ur session | ||
// u can see ur session when u get AUTHENTICATED | ||
// | ||
// session:{ WABrowserId: '"WCHSqNpc1nEPbVwcBP9cCA=="', | ||
// WASecretBundle: | ||
// '{"key":"fJ8ZO/gC1fwKXBr4rq51XE714ZZ6x/nn9QbfEKplcN4=","encKey":"pmu5SZLDxI/alQkR7TnyVolDF3aC6KBhJeMZbmglX9I=","macKey":"fJ8ZO/gC1fwKXBr4rq51XE714ZZ6x/nn9QbfEKplcN4="}', WAToken1: '"p9e7+FADmpH6VFXq4Kt7N0b+c4tO8JTaMrZtJ2n2/bE="', | ||
// WAToken2: | ||
// '"1@oV7XytZvsnufZlQT6wrH2SG1ygONSw6GTKOmty3kALI022iud0ESuGUTOgC8AS73bFl+PuEmgzrw+g=="' } | ||
// // u can passing wa session here, and example, just uncoment and change to ur session | ||
// // u can see ur session when u get AUTHENTICATED | ||
// session:{ WABrowserId: '"WCHSqNpc1nEPbVwcBP9cCA=="', | ||
// WASecretBundle: | ||
// '{"key":"fJ8ZO/gC1fwKXBr4rq51XE714ZZ6x/nn9QbfEKplcN4=","encKey":"pmu5SZLDxI/alQkR7TnyVolDF3aC6KBhJeMZbmglX9I=","macKey":"fJ8ZO/gC1fwKXBr4rq51XE714ZZ6x/nn9QbfEKplcN4="}', WAToken1: '"p9e7+FADmpH6VFXq4Kt7N0b+c4tO8JTaMrZtJ2n2/bE="', | ||
// WAToken2: | ||
// '"1@oV7XytZvsnufZlQT6wrH2SG1ygONSw6GTKOmty3kALI022iud0ESuGUTOgC8AS73bFl+PuEmgzrw+g=="' } | ||
@@ -18,0 +16,0 @@ |
{ | ||
"name": "waweb-phi", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"description": "control whatsapp web with nodejs", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
104
README.md
@@ -8,5 +8,5 @@ # WAWEB-phi | ||
What is the difference? This library uses wapi.js which contains features such as sending pictures, sending to numbers that are not in the contact list | ||
and many more | ||
## Installation | ||
@@ -28,33 +28,5 @@ NPM | ||
const client = new wa({ | ||
puppeteer: { headless: false } | ||
}); | ||
client.initialize(); | ||
``` | ||
## Example | ||
```js | ||
const wa = require('waweb-phi') | ||
const client = new wa({ | ||
puppeteer: { headless: false },//change it to true if u want hidding the chrome/headles mode | ||
puppeteer: { headless: false }, //change it to true if u want hidding the chrome/ | ||
authTimeout: 30000, | ||
// u can passing wa session here, and example, just uncoment and change to ur session | ||
// u can see ur session when u get AUTHENTICATED | ||
// | ||
// session: { | ||
// WABrowserId: '"qU5V5x/V2iasdasdTdfH5QdHc7yg=="', | ||
// WASecretBundle: | ||
// '{"key":"TVCj4p60Jasdasd9nklQDp+hSmK+nvCVMHK2fwID9tpShGQVo=","encKey":"do3JhuI3JvkTAuTs4UNUbZHuHasdasdGjXA+UOopphm5un2b8=","macKey":"TVCj4p60J9nklQDp+hSmK+nvCVMHK2fwID9tpShGQVo="}', | ||
// WAToken1: '"F+hVGpk5GwmSNhasdasd1bQYlPaffAL//Oc00Oj9C9VZqWlBQ="', | ||
// WAToken2: | ||
// '"1@RDZOZEmI8Yxi8m8qw3spzoNK/YqfI8JGLxzWSJ5jeVJVp8faNGDB6asdasdasdLXSuxiA1gvyFeSapmChrc6JfA=="' | ||
// } | ||
}); | ||
@@ -84,12 +56,2 @@ | ||
console.log('READY'); | ||
// send message, u can send to anyone, even if number not saved in ur contact | ||
client.sendMessage("628950609xxxx@c.us", `test`).then((r) => { | ||
@@ -99,54 +61,2 @@ console.log("sendMessage",r) | ||
// bingung kata2nya pokoknya event ceklis 1 ceklis 2 ceklis 2 biru | ||
client.on('ack', (data) => { | ||
console.log('ACK', data); | ||
}); | ||
// send Attachment,image/rar/video anythings | ||
// convert to base64 first | ||
let base64file =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0+rkXxz59onwToD7uppL/Jpk+X603awGjz37cEnrRnWm6s/e5lTeKOx4U1RsK4tPmuZ8zn7l+V8WfHTHDB3jM9/HinkgsFnL3OWCy1zNrr0y7+r+f8A+ZxMd2rKwo4AAAAASUVORK5CYII=` | ||
client.sendAttach(base64file,'caption','namafile.png',"628950609xxxx@c.us").then((r) => { | ||
console.log("sendMessage",r) | ||
}) | ||
// get Device Info | ||
client.deviceInfo().then((r) => { | ||
console.log("deviceInfo", r) | ||
}) | ||
// return | ||
// { wa_version: '2.20.28', | ||
// mcc: '510', | ||
// mnc: '010', | ||
// os_version: '9', | ||
// device_manufacturer: 'OPPO', | ||
// device_model: 'RMX1801', | ||
// os_build_number: 'RMX1801EX_11_C.26' } | ||
// get Send Seen | ||
client.sendSeen('628950609xxxx@c.us').then((r) => { | ||
console.log("sendSeen", r) | ||
}) | ||
// get battery level | ||
client.getBatteryLevel().then((r) => { | ||
console.log("getBatteryLevel", r) | ||
}) | ||
// cek number status | ||
let number = "628950609xxxx@c.us" | ||
client.checkNumberStatus(number).then((r) => { | ||
console.log("NumberStatus", r) | ||
}) | ||
// also you can access wapi.js directly | ||
}); | ||
@@ -168,2 +78,3 @@ | ||
##### for more detail example, see example.js | ||
@@ -173,2 +84,3 @@ | ||
## Update | ||
- 27/03/2020 (v0.1.18) fix Update | ||
- 27/03/2020 (v0.1.16) Update | ||
@@ -180,8 +92,4 @@ - 06/03/2020 (v0.1.15) add ack status (send,received,read) | ||
## Todo | ||
- [ ] Implement+fix `important` WAPI.js Function | ||
## Legal | ||
@@ -188,0 +96,0 @@ This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk. Commercial use of this code/repo is strictly prohibited. |
@@ -15,5 +15,5 @@ 'use strict'; | ||
exports.Selectors = { | ||
KEEP_PHONE_CONNECTED_IMG_SELECTOR: '._1pn8B', | ||
QR_CONTAINER_SELECTOR: '.zCzor', | ||
QR_VALUE_SELECTOR: '._11ozL', | ||
KEEP_PHONE_CONNECTED_IMG_SELECTOR: '.YD4Yw', | ||
QR_CONTAINER_SELECTOR: '._2nIZM', | ||
QR_VALUE_SELECTOR: '._1QMFu', | ||
} | ||
@@ -20,0 +20,0 @@ |
@@ -14,3 +14,3 @@ /** | ||
let neededObjects = [ | ||
{ id: "Store", conditions: (module) => (module.Chat && module.Msg) ? module : null }, | ||
{ id: "Store", conditions: (module) => (module.default && module.default.Chat && module.default.Msg) ? module.default : null}, | ||
// { id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processFiles !== undefined) ? module.default : null }, | ||
@@ -64,5 +64,7 @@ { id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null }, | ||
}); | ||
// window.Store.ChatClass.default.prototype.sendMessage = function (e) { | ||
// return window.Store.SendTextMsgToChat(this, ...arguments); | ||
// } | ||
window.Store.sendMessage = function (e) { | ||
return window.Store.SendTextMsgToChat(this, ...arguments); | ||
} | ||
if(window.Store.MediaCollection) window.Store.MediaCollection.prototype.processFiles = window.Store.MediaCollection.prototype.processFiles || window.Store.MediaCollection.prototype.processAttachments; | ||
return window.Store; | ||
@@ -69,0 +71,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74534
1604
96