8.2.7 • Published 6 months ago
@teamolduser/baileys v8.2.7
🚀 BAILEYS-ANYA
🔮 | WHY BAILEYS-ANYA?
📌 | IMPORTANT NOTE
💫 | INSTALLATION
📂 In package.json:
"dependencies": {
"baileys-anya": "*"
}⚙️ Terminal Installation:
npm install baileys-anyaor
yarn add baileys-anyaor
pnpm add baileys-anya🔌 Import:
// ESM
import makeWASocket from 'baileys-anya'// CommonJS
const {
default: makeWASocket
} = require("baileys-anya")✨ | FEATURE SHOWCASE
🎀 Enhanced Features Matrix
| Feature | Description | Status |
|---|---|---|
| 🔊 Channel Messaging | Send & manage WhatsApp channel content | ✅ |
| 🎛️ Interactive Messages | Create rich button-based experiences | ✅ |
| 🤖 AI Message Icon | Brand your bot messages with AI icon | ✅ |
| 🖼️ Enhanced Media | Uncropped profile pictures & optimized media | ✅ |
| 🔐 Custom Pairing | Personalized device pairing codes | ✅ |
| 🔧 Performance Optimizations | Cleaner logs & improved signal handling | ✅ |
| 📱 Cross-Platform | Works on all NodeJS supported platforms | ✅ |
📰 | NEWSLETTER MANAGEMENT
📊 Get Newsletter Info
// By invite
const metadata = await sock.newsletterMetadata("invite", "xxxxx")
// By JID
const metadata = await sock.newsletterMetadata("jid", "abcd@newsletter")
console.log(metadata)📝 Update Newsletter Content
// Update description
await sock.newsletterUpdateDescription("abcd@newsletter", "New Description")
// Update name
await sock.newsletterUpdateName("abcd@newsletter", "New Name")
// Update picture
await sock.newsletterUpdatePicture("abcd@newsletter", buffer)
// Remove picture
await sock.newsletterRemovePicture("abcd@newsletter")🔔 Notification Management
// Unmute newsletter
await sock.newsletterUnmute("abcd@newsletter")
// Mute newsletter
await sock.newsletterMute("abcd@newsletter")🔄 Newsletter Management
// Create new newsletter
const metadata = await sock.newsletterCreate("Newsletter Name", "Newsletter Description")
console.log(metadata)
// Delete newsletter
await sock.newsletterDelete("abcd@newsletter")
// Follow newsletter
await sock.newsletterFollow("abcd@newsletter")
// Unfollow newsletter
await sock.newsletterUnfollow("abcd@newsletter")😀 Engagement Features
// Send reaction to newsletter post
// Get ID from message URL: https://whatsapp.com/channel/xxxxx/175
const id = "175"
await sock.newsletterReactMessage("abcd@newsletter", id, "🥳")🎛️ | INTERACTIVE MESSAGING
📝 Text Buttons
const buttons = [
{ buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
{ buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
]
const buttonMessage = {
text: "Hi it's button message",
footer: 'Hello World',
buttons,
headerType: 1,
viewOnce: true
}
await sock.sendMessage(id, buttonMessage, { quoted: null })🖼️ Image Buttons
const buttons = [
{ buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
{ buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
]
const buttonMessage = {
image: { url: "https://example.com/abcd.jpg" }, // image: buffer or path
caption: "Hi it's button message with image",
footer: 'Hello World',
buttons,
headerType: 1,
viewOnce: true
}
await sock.sendMessage(id, buttonMessage, { quoted: null })🎬 Video Buttons
const buttons = [
{ buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
{ buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
]
const buttonMessage = {
video: { url: "https://example.com/abcd.mp4" }, // video: buffer or path
caption: "Hi it's button message with video",
footer: 'Hello World',
buttons,
headerType: 1,
viewOnce: true
}
await sock.sendMessage(id, buttonMessage, { quoted: null })🔄 Advanced Interactive Messages
const interactiveButtons = [
{
name: "quick_reply",
buttonParamsJson: JSON.stringify({
display_text: "Quick Reply",
id: "ID"
})
},
{
name: "cta_url",
buttonParamsJson: JSON.stringify({
display_text: "Tap Here!",
url: "https://www.example.com/"
})
},
{
name: "cta_copy",
buttonParamsJson: JSON.stringify({
display_text: "Copy Code",
id: "12345",
copy_code: "12345"
})
}
]
const interactiveMessage = {
text: "Hello World!",
title: "this is the title",
footer: "this is the footer",
interactiveButtons
}
await sock.sendMessage(id, interactiveMessage, { quoted: null })🖼️ Rich Media Interactive Messages
const interactiveButtons = [
{
name: "quick_reply",
buttonParamsJson: JSON.stringify({
display_text: "Quick Reply",
id: "ID"
})
},
{
name: "cta_url",
buttonParamsJson: JSON.stringify({
display_text: "Visit Website",
url: "https://www.example.com/"
})
}
]
// With Image
const imageInteractiveMessage = {
image: { url: "https://example.com/abcd.jpg" },
caption: "Check out this amazing photo!",
title: "Photo Showcase",
footer: "Tap a button below",
interactiveButtons
}
await sock.sendMessage(id, imageInteractiveMessage, { quoted: null })
// With Video
const videoInteractiveMessage = {
video: { url: "https://example.com/abcd.mp4" },
caption: "Watch this awesome video!",
title: "Video Showcase",
footer: "Tap a button below",
interactiveButtons
}
await sock.sendMessage(id, videoInteractiveMessage, { quoted: null })🤖 | AI MESSAGING
AI Icon Feature
// Simply add "ai: true" to display AI icon with your message
await sock.sendMessage(id, { text: "Hello! I'm your AI assistant.", ai: true })🔐 | CUSTOM PAIRING
Custom Code Implementation
if(usePairingCode && !sock.authState.creds.registered) {
const phoneNumber = await question('Please enter your mobile phone number:\n')
const custom = "4NY4P8KA" // must be 8 digits, can be letters or numbers
const code = await sock.requestPairingCode(phoneNumber, custom)
console.log(`Pairing code: ${code?.match(/.{1,4}/g)?.join('-') || code}`)
}🛠️ | QUICK IMPLEMENTATION GUIDE
🐛 | REPORTING ISSUES
📝 | NOTES
8.2.7
6 months ago
8.2.6
6 months ago
8.2.5
6 months ago
3.5.9
6 months ago
3.5.8
6 months ago
3.5.2
6 months ago
7.5.3-0
10 months ago
0.0.4
6 months ago
0.0.7
6 months ago
0.0.6
6 months ago
7.5.11
10 months ago
7.4.14
10 months ago
7.4.11
10 months ago
7.4.13
10 months ago
7.4.10
11 months ago
7.4.7
12 months ago
7.4.6
1 year ago
7.4.5
1 year ago
7.4.3
1 year ago
7.4.1
1 year ago
7.4.0
1 year ago
7.3.1
1 year ago
7.3.0
1 year ago
7.3.5
1 year ago
7.3.3
1 year ago
7.3.2
1 year ago
7.2.9
1 year ago
7.2.8
1 year ago
7.3.6
1 year ago
7.0.0
1 year ago
7.2.2
1 year ago
7.1.3
1 year ago
7.0.4
1 year ago
7.2.1
1 year ago
7.0.3
1 year ago
7.2.0
1 year ago
7.1.1
1 year ago
7.0.2
1 year ago
7.1.0
1 year ago
7.0.1
1 year ago
7.2.6
1 year ago
7.1.7
1 year ago
7.2.5
1 year ago
7.1.6
1 year ago
7.2.4
1 year ago
7.0.6
1 year ago
7.2.3
1 year ago
7.0.5
1 year ago
7.1.9
1 year ago
7.2.7
1 year ago
7.1.8
1 year ago
6.9.5
1 year ago
6.9.2
2 years ago
6.9.4
2 years ago
3.1.0
2 years ago
4.1.1
2 years ago
3.0.0
2 years ago
1.0.0
2 years ago