Open andrecordeiro opened 8 years ago
So on whatsapp web, you have a QR code:
Open the QR code scanner on the phone and scan it:
Give it a moment, it should change the page in the browser. Click on a chat and right click, click inspect element then go to the JS console
I've found that right clicking on the chat info bar works.
Then paste in the code from WhatsappUtils.js
inside. If it blocks a popup, allow it, then run the code again.
And you can play with this starter code:
window.whatsapp = initWhatsappAPI();
whatsapp.attachHandler({
newMessage: function (text) {
console.log("NEW MESSAGE: " + text);
}
});
whatsapp.startWatching();
Also, note that I am working on a pure nodejs way of doing this. No more messy CORS getarounds.
What is the problem with the chatbot?
Necklace? What necklace?
If the server is started then load this link to see the file
Yep. You could try a MutationObserver
on the chat list, but right now I can't really get it to work
i am starting to implement MutationObserver but now a day i can't got success.
I might be able to get a basic version of the pure nodejs api soon, and it should have multi chats at once.
can you give me basic idea on which you are working on
It is a new version of the API that uses jsdom to do all the magic instead of a browser. This lets it do all the DOM magic inside nodejs, without a browser. This also allows me to upload files (hopefully) and be easier to setup.
you mean this is also multi user chat enabled logic using node.js
Not yet, but when I can get the nodejs version to work
I don't, but we could try gitter?
Get an account on gitter, then go here
Signup first. Then I can add you to the room
dear all can we have any updates regarding dom majic inside node.js
no sir i have't any update i just asking Que that any update occurred in this script or not
Currently, I don't have an update as I can't get jsdom to work as I want it to.
Hello eyeballcode,
I have followed the readme, paste both files in JS console, and nothing happens apart another browser fully blank. What should be the outcome?
Thanks
Hi, this repository is outdated, please use https://github.com/TeamFreeHugs/WhatsApp-Chatbot-2.0 instead. Thanks
On 18 Jun 2017 4:24 a.m., "Jean Bouez" notifications@github.com wrote:
Hello eyeballcode,
I have followed the readme, paste both files in JS console, and nothing happens apart another browser fully blank. What should be the outcome?
Thanks
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TeamFreeHugs/Whatsapp-Chatbot/issues/2#issuecomment-309230710, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcWoxAEBbsoVMj0baMqVB9x3ZXndPrbks5sFBUsgaJpZM4H1JBp .
@eyeballcode Hello, I do not quite understand how to use this chatbot. I started the web server and it is running on port 3000. I opened the url https://web.whatsapp.com. And now what do I do?
This is my console: