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.
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.
Clone the repository, install and running it.
$ git clone https://github.com/zeative/starter-zaileys.git
$ cd starter-zaileys
$ npm install
$ npm startHere 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'
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create new branch:
git checkout -b feature/my-feature. - Commit your changes:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature/my-feature. - Open Pull Request.
If you encounter any problems or have feature requests, please open an issue
- Buy me coffee ☕
- Ko-Fi
- Trakteer
- ⭐ Star the repo on GitHub
Distributed under the MIT License. See LICENSE for details.

{ "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 }