loadmeta-btns
v1.0.1
Published
WhatsApp button utilities for Meta AI bot
Maintainers
Readme
loadmeta/btns
WhatsApp button utilities for Meta AI bot. A lightweight package for creating and sending interactive buttons, lists, and templates with WhatsApp API.
Installation
npm install loadmeta/btnsUsage
const { createButtonUtils } = require('loadmeta/btns');
// Initialize with your WhatsApp socket
const buttonUtils = createButtonUtils(whatsappSocket);
// Create buttons
const buttons = buttonUtils.createButtons([
{ id: 'btn1', text: 'Button 1' },
{ id: 'btn2', text: 'Button 2' }
]);
// Send button message
await buttonUtils.sendButton('[email protected]', 'Hello!', buttons);
// Or use shortcuts
await buttonUtils.button.send('[email protected]', 'Hello!', buttons);Features
· ✅ Create interactive buttons (URL, Quick Reply, Call, Single Select) · ✅ Send button messages with text, images, videos, documents, audio, location · ✅ Create list messages with sections · ✅ Send template messages · ✅ Reply methods for easy interaction handling · ✅ Typing indicators and read receipts · ✅ Fully compatible with Baileys WhatsApp library
