whatsapp-lp
TypeScript icon, indicating that this package has built-in type declarations

5.5.6 • Public • Published

WhatsApp-LP was created with the purpose of demonopolizing the automation of chatbots and e-commerce, allowing anyone to create one.

Installation:

$ npm install whatsapp-lp

Using bower:

$ bower install whatsapp-lp

Using yarn:

$ yarn add whatsapp-lp

Using pnpm:

$ pnpm add whatsapp-lp

Basic Usage:

const whatsapp = require('whatsapp-lp');

whatsapp.create({
    session: 'whatsapp-lp', // Name of session
    headless: false,
    logQR: true,
})
    .then((client) => {
        start(client);
    });

async function start(client) {

    client.onMessage(async (message) => {
        if (message.content === "!ping") {
            // Reply
            await client.reply(message.from, `Pong! 🏓`, message.id)

            // Send Text
            await client.sendText(message.from, `Pong! 🏓`);
        }
    });

}

Using the WhatsApp-LP methods, it is possible to create a handler for text commands, images, audios, stickers, among others, these codes will be available on our GitHub.

Package Sidebar

Install

npm i whatsapp-lp

Weekly Downloads

6

Version

5.5.6

License

MIT

Unpacked Size

700 kB

Total Files

243

Last publish

Collaborators

  • felipegtestrela