lilys-builder
v1.0.0
Published
Baileys Interactive support MessageBuilder Nixel - OpenSource
Maintainers
Readme
Lilys Builder 🌸
Interactive message toolkit for Baileys
Crafted and maintained by FallZx Infinity
What is Lilys Builder?
Lilys Builder is a developer utility for constructing interactive WhatsApp message payloads without having to manually assemble complex nested objects.
Instead of writing a large payload by hand, you can create a message through a small chain of readable methods:
const Lily = require("lilys-builder");
const message = new Lily.Button()
.text("Welcome!")
.button("Menu", "menu")
.button("Owner", "owner")
.footer("Lilys Builder")
.build();The builder is intended for Baileys-based WhatsApp bots, especially projects using CommonJS.
At a Glance
| Area | Support | |---|:---:| | Button messages | ✅ | | Multi-row buttons | ✅ | | Carousel | ✅ | | Rich response | ✅ | | Native Flow | ✅ | | Chainable API | ✅ | | CommonJS | ✅ |
Get Started
Install
npm install lilys-builderIf Baileys is not already installed in your project:
npm install lilys-baileysThen load the builder:
const Lily = require("lilys-builder");Message Builders
01 — Button
Use Button when you need a compact interactive message.
const message = new Lily.Button()
.text("Select an option")
.button("Open Menu", "menu")
.button("Contact Owner", "owner")
.footer("Powered by Lilys Builder")
.build();Available methods
.text(value)
.button(label, id)
.header(value)
.footer(value)
.viewOnce()
.build()02 — ButtonV2
For layouts containing multiple rows, use ButtonV2.
const message = new Lily.ButtonV2()
.text("Choose one of the options below.")
.row(row =>
row
.button("Menu", "menu")
.button("Owner", "owner")
)
.row(row =>
row.button("Help", "help")
)
.footer("Lilys Builder")
.build();Available methods
.text(value)
.row(callback)
.header(value)
.footer(value)
.viewOnce()
.build()03 — Carousel
Build multiple cards inside one carousel message.
const message = new Lily.Carousel()
.card(card =>
card
.image("https://example.com/image.jpg")
.title("First Card")
.text("Card description")
.button("Open", "open")
)
.card(card =>
card
.image("https://example.com/image-2.jpg")
.title("Second Card")
.text("Another description")
.button("View", "view")
)
.build();Card API
.image(url)
.title(value)
.text(value)
.button(label, id)Carousel API
.card(callback)
.build()04 — AIRich
AIRich is intended for messages that require richer text formatting.
const message = new Lily.AIRich()
.text("Visit [Google](https://google.com) for more information.")
.build();Configuration methods:
.text(value)
.extract(value)
.hyperlink(value)
.citation(value)
.latex(value)
.build()Example:
const message = new Lily.AIRich()
.extract(true)
.hyperlink(true)
.citation(true)
.latex(true)
.text("Your rich response here.")
.build();Native Flow
Projects that use WhatsApp Native Flow can access the corresponding builder:
const flow = new Lily.NativeFlow();Native Flow payloads depend on the implementation and Baileys version used by the project.
Builder Map
Lilys Builder
│
├── Button
│ └── Compact interactive buttons
│
├── ButtonV2
│ └── Multi-row button layout
│
├── Carousel
│ └── Image + text + button cards
│
├── AIRich
│ └── Rich formatted responses
│
└── NativeFlow
└── Native Flow payloadsIntegration Example
A simple menu can be prepared like this:
const Lily = require("lilys-builder");
async function createMenu() {
return new Lily.ButtonV2()
.text("🌸 Main Menu")
.row(row =>
row
.button("All Menu", "allmenu")
.button("Owner", "owner")
)
.row(row =>
row.button("Information", "info")
)
.footer("Lilys Builder")
.build();
}The generated payload should be passed to the sending layer used by your Baileys implementation.
Requirements
Before using the package, make sure your environment provides:
Node.js
Baileys
CommonJS supportRecommended project loading style:
const Lily = require("lilys-builder");Project Philosophy
Lilys Builder is built around a straightforward idea:
Keep message construction readable.
The API separates message construction into small builder operations so bot source code remains easier to maintain when menus, cards, buttons, or rich responses become more complex.
Updating Your Project
After installing a new package release, refresh the dependency with:
npm update lilys-builderOr install a specific version:
npm install lilys-builder@VERSIONCheck the installed version:
npm list lilys-builderTroubleshooting
Package cannot be loaded
Check the installation:
npm install lilys-builderThen verify:
npm list lilys-builderBaileys dependency error
Make sure the required Baileys package is installed and that its version is compatible with the builder release.
npm install @whiskeysockets/baileysMessage payload does not work
Inspect the generated payload and verify that the Baileys version currently used by your bot supports the message type being generated.
Release Information
Project: Lilys Builder
Maintainer: FallZx Infinity
Package: lilys-builder
Runtime: Node.js
Target: Baileys WhatsApp Bots
Copyright
Copyright © 2026 FallZx Infinity.
All Rights Reserved.The Lilys Builder name, documentation, examples, branding, and original project materials are maintained by FallZx Infinity.
Unauthorized redistribution, republishing, or presenting the project as an unrelated original work is not permitted.
Important: Copyright and licensing of third-party libraries or source components remain subject to their respective owners and licenses. This notice applies only to original materials for which FallZx Infinity holds the applicable rights.
Author
FallZx Infinity
Creator & Maintainer of Lilys Builder
🌸 Lilys Builder
Interactive messages, built simply.Support
For bugs, compatibility issues, or development questions, open an issue in the project's repository or contact the project maintainer through the official support channel.
