briuor / wbm Goto Github PK
View Code? Open in Web Editor NEWwbm is an unofficial API to send bulk messages in whatsapp.
License: MIT License
wbm is an unofficial API to send bulk messages in whatsapp.
License: MIT License
Authenticating...
TypeError: process.stdout.clearLine is not a function
at sendTo (D:\Work\Gtion\DiscordBotSimple\node_modules\wbm\src\api.js:170:24)
at async Object.send (D:\Work\Gtion\DiscordBotSimple\node_modules\wbm\src\api.js:184:9)
at async D:\Work\Gtion\DiscordBotSimple\index.js:59:3
im trying to make a simple bot integrated from discord to WA
I want to test from your example, but I got an error. can you help me?
$ node index.js
E:\project\wagela\node_modules\wbm\src\api.js:110
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (E:\project\wagela\node_modules\wbm\src\index.js:1:8
0)
Hey, I found this API very interesting, I am a newbie to node.js, but I was wondering if there was a way to send Messages from a saved contact or a Whatsapp Group.
Regards,
I have followed all all things but messages are not been sent. In cmd it is showing message as sent but in real message is not been sent
I think there is a recent change, worked few days ago, but right now it fails.
Bug is on line 162
await page.waitForSelector(SELECTORS.SEND_BUTTON, { timeout: 5000 });
I think that the Selector value needs to be updated:
SEND_BUTTON: 'div:nth-child(3) > button > span[data-icon="send"]'
this one fails currently
can u please help make it so it won't send messages to someone I already have a chat with?
Hey,
I am facing the issue that whatsapp tells me to update chrome, but only when I am using a saved session, not when I am newly loggin with a qr code somehow.
here is the .html I extracted (I am using a linux cli)
https://cdn.discordapp.com/attachments/924373570275115148/1012006625072132246/Capture.PNG
Hi there,
I would to integrate the script into a github action.
How can I save the QR validation?
Cheers and thx
Why sometimes using node-scheduler with WBM causes memory leaks?
Thank you so much for making this greate tools
I cant sent +
in the message!
Any solution?
My application runs correct, connects but does not send msg.
In test.js mode it loops, loses the connection after authentication is done and doesn't send the message.
Minha aplicação esta rodando corretamente, mas ela conecta e não envia as mensagens;
No modo test.js, o navegador é aberto, autenticado, fica em loop (reiniciando) e não envia a mensagem.
Alguma dica?
I used this method to use session saver, recently it keeps failing and generating new qr and the new qr code can't be scanned
wbm.start({showBrowser: false, qrCodeData: true, session: true})
.then(async qrCodeData => {
console.log(qrCodeData);
await wbm.waitQRCode();
// ...
await wbm.end();
} ).catch(err => { console.log(err); });
How to send to all my contacts at once?
It is possible?
Hi,
How to use it for multiple account on same server? Is there any solution?
Also Can anybody help me with the sample code for setting it on server for browser output i have tried many ways but it didn't work?
app.get('/myQR', (req, res) => {
wbm.start({showBrowser: false, qrCodeData: false, session: true}).then(async () => {
res.send(<!DOCTYPE html> <html> <body> <script> ${wbm.generateQRCode()}; </script> </body> </html>
);
await wbm.end();
}).catch(err => console.log(err));
})
I tried using express also but not working.
Is it possible to check details when send message fails? Current console message is not very helpful since you do not know why it failed.
The web application I made using wbm was working locally. But when I hosted on heroku it is not working.
Message sent successfully in logs but not received.
I also checked in the phone app and there is no message sent.
I used your technique, and now I can send texts. How do I send attachments of files?
What is the format or structure of the attachment parameter in the WhatsApp Web URL? Is it a separate URL, a file path, or some other format?
Are there any alternative methods or libraries within the Puppeteer ecosystem that can simplify the process of attaching files to WhatsApp message
i want the qr code on my app so user can connect to WhatsApp
I am using the package in my project. I hosted the web application on Heroku. But it doesn't work.
I'm not good at programming. I'm trying to adapt the code to send an attachment or audio. I'm not getting. Any tips?
const message = fs.readFileSync('photo.jpg');
it's not the expected result.
I am new in github. And I have'nt used these types of softwares or websites before.
Please help me to get out of this.
It will be so helpful if explained through a video
const wbm = require('wbm');
wbm.start().then(async () => {
const phones = ['target number'];
const message = 'test';
await wbm.send(phones, message);
await wbm.end();
}).catch(err => console.log(err));
first time use this module i can send message, but now i cant send message again
Hi,
I'm using version 1.1.16
Node version v11.12.0
Mac os big surr 11.2.1
Message sent successfully in logs but not showing in app. just first contact get the message.
I open the browser (showBrowser:true), I see the message initialisation for second contact and onwards but send button in not clicking
I check SEND_BUTTON in node_modules/wbm/src/api.js
SEND_BUTTON: 'div:nth-child(2) > button > span[data-icon="send"]'
I also try with delay page.waitFor(5000) but not working
New Feature Request - Do you have any plan to give a web interface to scan QR code and select mobile number csv, amd message input. with Images.
It would be nice to be able to log in through QR once and then reuse the session.
A similar solution is used in pedroslopez/whatsapp-web.js
It’s also good to be able to use multiple sessions at the same time.
Is this possible now?
Possible?
I got banned for sending to more than 20 contacts. lol.
I thought it because of the interval for every message seems to fast.
so I add randomInt()
function
and replace line 154 with:
await page.waitFor((6 * getRandomInt(1, 3)) * 10000);
so the msg would be sent randomly between 1-3 minutes.
I think it will be good feature if you want to add it as an option.
just my two cents 😃
the randomInt()
function
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min;
}
What limit of messages sent per day?
I am trying to do this in ubuntu-server.. QR-code generated but not scanning by whatsapp.
I was using the standard sample template given in the README , even after the message was send succesfully (message sent in the terminal) my client didn't recieve any message.
waitFor is deprecated and will be removed in a future release
Requiring me to re-authenticate through QR code every message sent. Already tried turning session argument to false, then back to true; did not work. Also reinstalled dependency. Application currently hosted on Amazon AWS EC2 Instance.
Any thoughts would be greatly appreciated.
I created an api for many people to use at the same time but it error and using same session.
app.post('/sendtext',jsonParser,(req, res) => {
wbm.start({showBrowser: false, qrCodeData: true, session: false})
.then(async qrCodeData => {
//.................................................
await wbm.send(arraynumber, text);
await wbm.end();
})
})
Can you help me the method for this?
Hi I am trying to send messages to all the contacts after specified interval of time. But as soon I add setInterval in then block send is failing
Dear Briuor,
Please advise if your npm wbm package sends automated voice notes. I successfully tested the message sending.
Thanks ahead,
Mohamad
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.