Skip to content

zeative/starter-zaileys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starter Kit for Zaileys Library Simplified WhatsApp Node.js

Starter Kit for Zaileys Library
Simplified WhatsApp Node.js


NPM Version NPM Downloads NPM Downloads GitHub Code Size TypeScript
GitHub License Discord GitHub Stars GitHub Forks GitHub Watchers Ask DeepWiki

starter-zaileys is a robust and ready-to-use template for building WhatsApp automation bots using the Zaileys library. It comes pre-configured with essential features, best practices, and a modular structure to help you kickstart your project immediately.


Discord


🚀 Overview

Zaileys solves the complexity of managing raw WhatsApp socket connections by providing a high-level, opinionated API. It is built for developers who need to create bots, customer support agents, or automated notification systems without getting bogged down in protocol details.

Targeting Node.js and TypeScript developers, Zaileys integrates essential features like rate limiting, session management, and input validation out of the box.

📦 Installation

Clone the repository, install and running it.

$ git clone https://github.com/zeative/starter-zaileys.git
$ cd starter-zaileys

$ npm install
$ npm start

⚡ Quick Start

Here is a minimal example to get your bot running with QR code authentication:

import { Client } from "zaileys";
// or
const { Client } = require("zaileys");

const wa = new Client({
  // dynamic session you can change
  session: "zaileys", // default

  // qr code
  authType: "qr",

  // pairing code
  authType: "pairing",
  phoneNumber: 6280000000,

  // if you want to disable built-in ffmpeg
  // disableFFmpeg: true,
});

wa.on("messages", async (ctx) => {
  if (ctx.text == "ping") {
    await wa.send(ctx.roomId, "Pong! 🏓");
  }
});

structure of ctx on event listener 'messages'

{
  "uniqueId": "Z4D3FCXXXXXXXXXXXXX",
  "channelId": "Z4D3FCXXXXXXXXXXXXX",

  "chatId": "ACAE07XXXXXXXXXXXXX",
  "chatType": "text",

  "receiverId": "628xxxxxxxx@s.whatsapp.net",
  "receiverName": "Zaileys",

  "roomId": "120xxxxxxxx@g.us",
  "roomName": "Group Test",
  "senderLid": "272xxxxxxxx@lid",

  "senderId": "628xxxxxxxx@s.whatsapp.net",
  "senderName": "kejaa",
  "senderDevice": "android",

  "timestamp": 1766045633000,
  "text": "World Hello! https://github.com/zeative/zaileys",

  "mentions": ["@628xxxxxxxx", "@123xxxxxxxx"],
  "links": ["https://github.com/zeative/zaileys"],

  "isBot": false,
  "isFromMe": false,
  "isPrefix": false,
  "isTagMe": false,

  "isStatusMention": false,
  "isGroupStatusMention": false,
  "isHideTags": true,

  "isSpam": false,
  "isGroup": true,
  "isNewsletter": false,
  "isQuestion": false,
  "isStory": false,

  "isViewOnce": false,
  "isEdited": false,
  "isDeleted": false,
  "isPinned": false,
  "isUnPinned": false,

  "isBroadcast": false,
  "isEphemeral": false,
  "isForwarded": false,

  "citation": {
    "authors": [AsyncFunction (anonymous)],
    "banned": [AsyncFunction (anonymous)]  
  },

  "media": {
  // ...
  // buffer promise
  // stream promise
  },

  "message": [Function (anonymous)],
  "replied": {} // MessagesContext
}

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create new branch: git checkout -b feature/my-feature.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/my-feature.
  5. Open Pull Request.

🎯 Issues & Feedback

If you encounter any problems or have feature requests, please open an issue

📜 License

Distributed under the MIT License. See LICENSE for details.

Starter Kit for Zaileys Library Simplified WhatsApp Node.js Copyright © 2025 zaadevofc. All rights reserved.

About

Starter Kit for Zaileys Library Simplified WhatsApp Node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published