tera-baileys
v1.0.1
Published
Custom Baileys WhatsApp API for ESM / CJS
Downloads
24
Maintainers
Readme
💫 TERA BAILEYS
Custom WhatsApp library built on Baileys — enhanced, modernized, and elegant.
[!CAUTION] The old Tera Baileys channel was closed due to an admin error, and all updates have been moved to the new channel (linked above). This project is built on top of the WhiskeySockets/Baileys project. All original core logic credits belong to that team. Tera Baileys extends it with UX and DX improvements.
📌 Overview
tera-baileys is an enhanced version of the Baileys library with cleaner API usage and modern features such as album messaging, newsletter controls, and full-size profile uploads — designed for modern WhatsApp automation.
Updates: All update information is now available on the WhatsApp channel (see homepage section).
📦 Installation
Via package.json
To use the forked version of Baileys:
{
"dependencies": {
"@whiskeysockets/baileys": "npm:tera-baileys"
}
}Or for the alternative package:
{
"dependencies": {
"@adiwajshing/baileys": "npm:tera-baileys"
}
}Alternatively, install directly (non-fork):
npm install elaina-bail@npm:tera-baileysImporting
ESM
import makeWASocket from 'tera-baileys';CJS
const { default: makeWASocket } = require('tera-baileys');🌟 Key Features
| Category | Description | | ---------------- | --------------------------------------------------- | | Channels | Send messages to WhatsApp channels seamlessly. | | 🖱️ Buttons | Interactive messages with quick reply options. | | 🖼️ Albums | Group images or videos into carousel-style albums. | | 👤 LID Grouping | Use modern @lid addressing for group operations. | | 🤖 AI Message Style | Display messages with an AI-style icon. | | 📷 HD Profile Pics | Upload full-size profile pictures without cropping. | | 🔐 Pairing Code | Generate custom alphanumeric pairing codes. | | 🛠️ Dev Experience | Reduced logging noise and optimized performance. |
🚀 Features & Usage
📬 Newsletter Control
Manage WhatsApp newsletters (channels), including creation and messaging.
// Create a newsletter
await sock.newsletterCreate("Tera Updates");
// Update description
await sock.newsletterUpdateDescription(
"tera@newsletter",
"Fresh updates weekly"
);
// React to a channel message
await sock.newsletterReactMessage(
"tera@newsletter",
"175",
"🔥"
);📌 Interactive Messaging
Send interactive messages with buttons to improve engagement.
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 Tera with love 💜",
buttons,
headerType: 1
});🖼️ Send Album
Send multiple images or videos as a single album message.
const media = [
{ image: { url: "https://example.com/pic1.jpg" } },
{ video: { url: "https://example.com/clip.mp4" } }
];
await sock.sendMessage(id, {
album: media,
caption: "Memories 💫"
});🔐 Custom Pairing Code
Generate a pairing code for WhatsApp device linking.
const code = await sock.requestPairingCode("94xxxxxxxxxx", "TERA01");
console.log("Pairing Code:", code);📊 Poll Creation
Create polls for quick voting in chats or groups.
await sock.sendMessage(id, {
poll: {
name: "Favorite Color?",
values: ["Red", "Blue", "Green"],
selectableCount: 1
}
});📍 Location Sharing
Share a location with coordinates and address information.
await sock.sendMessage(id, {
location: {
degreesLatitude: 37.422,
degreesLongitude: -122.084,
name: "Googleplex",
address: "1600 Amphitheatre Pkwy, Mountain View"
}
});👥 Group Management
Create groups, add members, and update group descriptions.
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!");🐞 Found a Bug?
If you encounter a bug or issue, you can:
- Report it via the official issue tracker (coming soon)
- Contact the maintainer directly on WhatsApp
Special thanks to everyone who contributed inspiration and support:
- Nimesh Piyumal — project lead and developer.
