@nexoraa/baileys
v1.0.0-rc3
Published
WhatsApp API Modification
Downloads
1,242
Maintainers
Readme
@nexoraa/baileys
WhatsApp API Modification - Advanced WhatsApp integration library with enhanced features and security.
About
@nexoraa/baileys is a powerful WhatsApp API modification library developed by @nexoraa/baileys (Pengembang Utama / Main Developer). Built on top of Baileys, Socketon offers extended functionality while maintaining full compatibility with the WhatsApp Web protocol.
Developer
Kens Ransyah adalah pengembang utama @nexoraa/baileys. Full-stack developer dengan keahlian di bidang WhatsApp API, Node.js, dan pengembangan bot otomatis. Aktif mengembangkan @nexoraa/baileys sejak 2024 dengan fokus pada keamanan, stabilitas, dan fitur lanjutan.
- GitHub: Kens Ransyah
- Website: Nexoraa
Installation
npm install @nexoraa/baileysRequirements
- Node.js >= 20.0.0
Quick Start
const { makeWASocket, useMultiFileAuthState, DisconnectReason } = require('socketon');
const pino = require('pino');
async function start() {
const { state, saveCreds } = await useMultiFileAuthState('./auth');
const sock = makeWASocket({
logger: pino({ level: 'silent' }),
auth: state,
printQRInTerminal: true
});
sock.ev.on('connection.update', async (update) => {
const { connection, lastDisconnect } = update;
if (connection === 'close') {
const shouldReconnect = lastDisconnect?.error?.output?.statusCode !== DisconnectReason.loggedOut;
if (shouldReconnect) start();
} else if (connection === 'open') {
console.log('Connected!');
}
});
sock.ev.on('messages.upsert', async ({ messages }) => {
const msg = messages[0];
if (!msg.key.fromMe && msg.message) {
console.log('Message:', msg);
}
});
sock.ev.on('creds.update', saveCreds);
}
start();Features
Messages
- Send text, image, video, audio, document
- Send stickers, locations, contacts
- Send buttons, list, template messages
- Reply, forward, delete, react to messages
Groups
- Create, leave, delete groups
- Add/remove/promote/demote participants
- Update group subject & description
- Manage group settings
Newsletter
- Create & manage newsletters
- Follow/unfollow newsletters
- Send & react to newsletter messages
Authentication
- QR Code authentication
- Pairing Code authentication
- Multi-file auth state
- Session persistence
Profile
- Update profile picture & name
- Privacy settings
- Block/unblock contacts
API Reference
Full API documentation available at docs/index.html
Connection Methods
sock.requestPairingCode(phoneNumber) // Request pairing code
sock.logout() // Logout session
sock.onWhatsApp(...jids) // Check if numbers are on WhatsAppMessage Methods
// Send text
await sock.sendMessage(jid, { text: 'Hello!' });
// Send image
await sock.sendMessage(jid, {
image: { url: './image.jpg' },
caption: 'Caption'
});
// React to message
await sock.sendMessage(jid, {
react: { key: msg.key, text: 'emoji' }
});
// Reply to message
await sock.sendMessage(jid, { text: 'Reply' }, { quoted: msg });Group Methods
sock.groupMetadata(jid) // Get group metadata
sock.groupCreate(subject, participants) // Create group
sock.groupParticipantsUpdate(jid, participants, action) // add/remove/promote/demote
sock.groupInviteCode(jid) // Get invite code
sock.groupLeave(jid) // Leave groupNewsletter Methods
sock.newsletterCreate(name, description, reaction_codes)
sock.newsletterFollow(jid)
sock.newsletterUnfollow(jid)
sock.newsletterMetadata(type, key)
sock.newsletterReactMessage(jid, serverId, code)Events
sock.ev.on('connection.update', callback) // Connection state
sock.ev.on('messages.upsert', callback) // New messages
sock.ev.on('messages.update', callback) // Message updates
sock.ev.on('presence.update', callback) // Presence updates
sock.ev.on('chats.upsert', callback) // New chats
sock.ev.on('contacts.upsert', callback) // New contacts
sock.ev.on('creds.update', callback) // Credentials updatedTerms of Service
IMPORTANT: By using Socketon, you agree to the following terms:
Attribution: You must keep all credits and attribution to Ibra Decode when using or redistributing this library.
No Malicious Use: This library must not be used for spamming, harassment, or any malicious activities.
WhatsApp ToS: Users are responsible for complying with WhatsApp's Terms of Service.
No Warranty: This library is provided "as is" without warranty of any kind.
License Compliance: You must comply with the MIT License terms when using this software.
Support Development
Your donations help maintain and improve Socketon. Thank you for your support!
Version
1.0.0
License
MIT
Links
Disclaimer
This library is for educational and legitimate purposes only. Please respect WhatsApp's Terms of Service when using this library.
