Code Monkey home page Code Monkey logo

zwa's Introduction

ZWA MD - WhatsApp NodeJS

Simple package to make Whatsapp bot Light and Fast! This is a replacement for the removed @adiwajshing/baileys library. and now this package uses the library from @whiskeysockets/baileys then I make it easier and I break it down so that everyone can easily make WhatsApp Bot.

Installation

Install zwa in your project :

  npm install zwa
  yarn add zwa

Running Tests

To run tests, run the following command :

  git clone https://github.com/zaadevofc/zwa
  cd zwa
  npm install
  npm run test

Usage

initial configuration that needs to be considered when running it.

const { Connection, Config } = require('zwa')

const config = Config({
    /*  */
})

// must async function ...
const connect = async () => {
    const ZWA = new Connection({ config })
    await ZWA.initial(connect) // fill with function name
}

connect()

Configuration

{
    showLogs: true, // show a logs of some actions
    dir: 'session', // folder path of your session
    prefix: '/', // set prefix for use command object
    authors: [/* 628... */], // set authors
    banned: [/* 628... */], // set banned
    browser: ['ZWA MD', 'Safari', '3.0.0'] // set browser to show in your connection
}

Event Listener

ZWA.on('connection', ({ status }) => {
    // this event for actived and running the bot
    // don't delete this event
    // status "connecting" || "open" || "close"
})

ZWA.on('messages', (msg) => {
    /* .... */
})

ZWA.on('messages.delete', (msg) => {
    /* .... */
})

ZWA.on('call', (msg) => {
    /* .... */
})

ZWA.on('update.status', (msg) => {
    /* .... */
})

Demo

Demo

Feedback

If you have any feedback, please reach out to us at [email protected]

License

Copyright (c) 2022 Dominik Wilkowski. Licensed under the GNU GPL-3.0-or-later.

zwa's People

Contributors

zaadevofc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zwa's Issues

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.