Coder Social home page Coder Social logo

waweb-phi's Introduction

WAWEB-phi

npm NPM GitHub last commit

WAWEB-phi is library for controlling whatsapp web for nodejs, inspired from whatsapp-web.js and WAPI.js

Installation

NPM

npm install waweb-phi 

YARN

yarn add waweb-phi 

Usage

const wa = require('waweb-phi')

const client = new wa({
    puppeteer: { headless: false }, //change it to true if u want hidding the chrome/
    authTimeout: 30000,
   
});


client.initialize();


client.on('qr', (qr) => {
    console.log('QR RECEIVED', qr);

});

client.on('authenticated', (session) => {
    console.log('AUTHENTICATED', session);

});

client.on('auth_failure', msg => {
    console.error('AUTHENTICATION FAILURE', msg);


})

client.on('ready', () => {
    console.log('READY');
        client.sendMessage("[email protected]", `test`).then((r) => {
            console.log("sendMessage",r)
        })

});


client.on('message', async msg => {
    console.log('MESSAGE RECEIVED', msg);

});

client.on('disconnected', () => {

    console.log('Client was logged out');
})
for more detail example, see example.js

Update

  • 26/02/2021 (v0.1.21) fix Update from wa
  • 20/11/2020 (v0.1.20) fix Update from wa
  • 27/03/2020 (v0.1.19) Update puppeter to last version, now headless mode can run on linux cli
  • 27/03/2020 (v0.1.16) Update
  • 06/03/2020 (v0.1.15) add ack status (send,received,read)
  • 19/02/2020 (v0.1.14) Add SendImageToID + fix SendImage + add sendSeen + add deviceInfo
  • 27/01/2020 (v0.1.12 > v0.1.13) add authTimeout option + change default authTimeout value from 5000ms to 10000ms , for detail check example.js
  • 17/01/2020 (v0.1.11) fix selector qr/qrvalue/keep phoneimage update

Legal

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.

License

APACHE v2

made with ๐Ÿ’—

waweb-phi's People

Contributors

oqhadev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.