astro-ws-bot

1.2.1 • Public • Published

WhatsappBot

What is this repository for?

Simple websocket to create bot!

how to get started

npm i astro-ws-bot

client.on('message', msg => {
    if (msg.body == ':hi') {
        msg.reply('hello');
    }
});

server receives following web socket actions

server sends following web socket actions

Capabilities

loadWhatsapp -> to manually load whatsapp after unloading it, initially whatsapp is loaded using token id from queryString of websocket url.

sendText -> to send message to multiple contacts at once

sendImage -> to send image with caption to multiple contacts

getMessages -> to load chat of particular contact, sometimes loads only few messages. send loadEarlierMessages action to load more messages

getUnreadMessages -> to get contact wise unread messages with count and messages both

this project was possbile thanks to the astro team

Readme

Keywords

none

Package Sidebar

Install

npm i astro-ws-bot

Weekly Downloads

3

Version

1.2.1

License

ISC

Unpacked Size

26.4 kB

Total Files

13

Last publish

Collaborators

  • astroincz