Custom Baileys WhatsApp API for ESM / CJS
npm install @rexxhayanasi/elaina-baileys
Custom WhatsApp library built upon Baileys β enhanced, modernized, and elegant.


> [!CAUTION]
> elaina-baileys The old channel was banned due to an error by one of the admins, so we moved the information to the new channel.
> Built on top of the WhiskeySockets/Baileys project. All original core logic credits go to their team. elaina-baileys extends it with thoughtful UX and DX improvements.
> π Contributors outside the Baileys code
Thanks to the following awesome contributors who help improve this project π
---
elaina-baileys is a refined version of the Baileys library with cleaner API usage, exclusive features like album messaging, newsletter controls, and full-size profile uploads β tailored for modern WhatsApp automation needs.> Update
> All update information is now redirected to the WhatsApp channel check at the bottom of the "homepage".
> Udpate changelog see on our WhatsApp channel
---
Fork Baileys (NPM) @whiskeysockets/baileys / @adiwajshing/baileys
``json`
@whiskeysockets/baileys
"dependencies": {
"@whiskeysockets/baileys": "npm:@rexxhayanasi/elaina-baileys"
}`json`
@adiwajsing/baileys
"dependencies": {
"@adiwajshing/baileys": "npm:@rexxhayanasi/elaina-baileys"
}
Or via terminal non fork
`bash`
npm install elaina-bail@npm:@rexxhayanasi/elaina-baileys
Importing (for those who don't fork another repository)
ESM & CJS
> ESM
`bash`
import makeWASocket from '@rexxhayanasi/elaina-baileys
> CJS
`bash`
const { default: makeWASocket } = require('@rexxhayanasi/elaina-baileys')
---
π Key Features
| Category | Description |
|---|---|
|channels | Seamlessly send messages to WhatsApp Channels. |
| π±οΈ Buttons | Create interactive messages with button options and quick replies. |
| πΌοΈ Albums | Send grouped images or videos as an album (carousel-like format). |
| π€ LID Grouping | Handle group operations using the latest @lid addressing style. |
| π€ AI Message Style | Add a stylized βAIβ icon to messages. |
| π· HD Profile Pics | Upload full-size profile pictures without cropping. |
| π Pairing Code | Generate custom alphanumeric pairing codes. |
| π οΈ Dev Experience | Reduced noise from logs with optimized libsignal printouts. |
---
Lihat Contoh
`js
// Create a newsletter
await sock.newsletterCreate("Elaina Updates");
// Update description
await sock.newsletterUpdateDescription(
"elaina@newsletter",
"Fresh updates weekly"
);
// React to a channel message
await sock.newsletterReactMessage(
"elaina@newsletter",
"175",
"π₯"
);
`
---
Lihat Contoh
`js
const buttons = [
{ buttonId: "btn1", buttonText: { displayText: "Click Me" }, type: 1 },
{ buttonId: "btn2", buttonText: { displayText: "Visit Site" }, type: 1 }
];
await sock.sendMessage(id, {
text: "Choose one:",
footer: "From Elaina with love π",
buttons,
headerType: 1
});
`
---
Lihat Contoh
`js
const media = [
{ image: { url: "https://example.com/pic1.jpg" } },
{ video: { url: "https://example.com/clip.mp4" } }
];
await sock.sendMessage(
id,
{ album: media, caption: "Memories π«" }
);
`
---
Lihat Contoh
`js
const code = await sock.requestPairingCode("62xxxxxxxxxx","ELAINA01");
console.log("Pairing Code:", code);
`
---
Lihat Contoh
`js`
await sock.sendMessage(id, {
poll: {
name: "Favorite Color?",
values: ["Red", "Blue", "Green"],
selectableCount: 1
}
});
---
Lihat Contoh
`js`
await sock.sendMessage(id, {
location: {
degreesLatitude: 37.422,
degreesLongitude: -122.084,
name: "Googleplex",
address: "1600 Amphitheatre Pkwy, Mountain View"
}
});
---
Lihat Contoh
`js
const group = await sock.groupCreate(
"My New Group",
[number1, number2]
);
await sock.groupAdd(group.id, [number3]);
await sock.groupUpdateDescription(group.id,"This is our awesome group!"
);
``
---
Jika Anda menemukan bug atau kendala saat menggunakan proyek ini, silakan lakukan salah satu opsi berikut:
- Buka Issue melalui website resmi (segera hadir)
- Hubungi maintainer langsung melalui WhatsApp
Terima kasih kepada semua pihak yang telah memberikan dukungan, inspirasi, serta kontribusiβbaik secara langsung maupun tidak langsungβdalam pengembangan proyek ini:
- Allah SWT β atas segala rahmat, kemudahan, dan perlindungan-Nya.
- Orang Tua β atas kasih sayang, doa, dan dukungan yang tiada henti.
- RexxHayanasi (Saya) β pengembang utama proyek ini.
RexxHayanasi [ developer project ] | Kyuu [ kiuur ] |
