@fvckerss/baileys
v1.0.11
Published
Baileys mod by Swiper
Maintainers
Readme
📱 Baileys
Baileys adalah library WhatsApp Web API untuk Node.js yang memungkinkan developer membuat bot WhatsApp, automation, sistem customer service, broadcast, newsletter/channel tools, dan berbagai fitur WhatsApp lainnya tanpa menggunakan browser.
Library ini bekerja langsung menggunakan protokol WhatsApp Web sehingga lebih ringan dibanding solusi berbasis browser seperti Puppeteer.
Baileys ini modifan dari baileys @whiskeysockets/baileys
✨ Features
- Multi Device Support
- QR Code Login
- Pairing Code Login
- Send Text Message
- Send Image / Video / Audio / Document
- Send Sticker
- Interactive Message
- Native Flow Message
- Buttons Message
- List Message
- Poll Message
- Status Upload
- Group Management
- Newsletter / Channel Management
- Contact & Location Message
- Product Message
- Event Message
- Scheduled Call Message
- View Once Message
- Forward Message
- Read Receipt
- Presence Update
- AI Rich Response Message
- Full WhatsApp Web Protocol Access
📦 Installation
npm install @fvckerss/baileys
🚀 Basic Connection
const {
default: makeWASocket,
useMultiFileAuthState,
DisconnectReason
} = require("@fvckerss/baileys")
async function startBot() {
const { state, saveCreds } =
await useMultiFileAuthState("./session")
const sock = makeWASocket({
auth: state
})
sock.ev.on("creds.update", saveCreds)
sock.ev.on("connection.update", ({ connection }) => {
if (connection === "open") {
console.log("Bot Connected")
}
})
}
startBot()💬 Send Text Message
await sock.sendMessage(
jid,
{
text: "Halo Dunia!"
}
)🖼️ Send Image
await sock.sendMessage(
jid,
{
image: {
url: "./image.jpg"
},
caption: "Hello"
}
)🎥 Send Video
await sock.sendMessage(
jid,
{
video: {
url: "./video.mp4"
},
caption: "Video Test"
}
)🎵 Send Audio
await sock.sendMessage(
jid,
{
audio: {
url: "./audio.mp3"
},
mimetype: "audio/mpeg"
}
)📄 Send Document
await sock.sendMessage(
jid,
{
document: {
url: "./file.pdf"
},
fileName: "README.pdf",
mimetype: "application/pdf"
}
)📍 Send Location
await sock.sendMessage(
jid,
{
location: {
degreesLatitude: -6.732,
degreesLongitude: 108.552
}
}
)👤 Send Contact
await sock.sendMessage(
jid,
{
contacts: {
displayName: "Swiper",
contacts: [
{
vcard: `
BEGIN:VCARD
VERSION:3.0
FN:Swiper
TEL;type=CELL:+628123456789
END:VCARD`
}
]
}
}
)✨ Rich Product Card
await sock.sendMessage(jid, {
disclaimerText: "🚀 SWIPER FVCK",
product: [{
title: "FVCKERS",
brand: "Swiper Fvck",
price: "Rp 999.999.999",
sale_price: "Rp 666.666.666",
product_url: "https://wa.me/6283895883216",
image_url: "https://c.termai.cc/i116/Z6flN6.jpg",
icon_url: "https://static.nike.com/a/images/t_PDP_1280_v1/f_auto,q_auto:eco/additional_image_1.png"
}],
suggested: [
"SWIPER FVCK",
"FVCKERS"
],
footerText: 'Generate By Fvckers'
}, {
quoted: m
})✨ Rich Code Block
await sock.sendMessage(jid, {
headerText: "# JavaScript Example",
contentText: "Berikut contoh code sederhana",
code: `
async function hello() {
console.log("Hello World")
}
`,
language: "javascript",
footerText: 'Generate By Fvckers'
}, { quoted: m })✨ Rich Table
await sock.sendMessage(jid, {
disclaimerText: "🚀 SWIPER FVCK",
headerText: '## Package Info',
contentText: "Data package:",
table: [
["Package", "Version"],
["Baileys", "7.0.0"],
["Express", "5.1.0"],
["Axios", "1.11.0"]
],
footerText: 'Generate By Fvckers'
}, { quoted: m })✨ Rich Inline Entites
await sock.sendMessage(jid, {
disclaimerText: 'Inline Entities',
headerText: '## Check!',
links: [
{
text: `Website`,
title: " Portofolio",
url: "https://swiper.my.id"
}
],
footerText: 'Generate By Fvckers'
}, { quoted: m })📋 List Message
await sock.sendMessage(jid, {
text: "Hello World",
footer: "FVCKERS",
buttons: [
{
buttonId: "single_select",
buttonText: { displayText: "Select Menu" },
type: 1,
nativeFlowInfo: {
name: "single_select",
paramsJson: JSON.stringify({
title: "List Group",
sections: [
{
title: "Group",
rows: [
{
title: `Button`,
description: `> Ini tampilan button`,
id: `.listb`
}
]
}
]
})
}
}
],
headerType: 1
});📋 List Message With Thumbnail
await sock.sendMessage(jid, {
image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" },
text: "Hello World",
footer: "FVCKERS",
buttons: [
{
buttonId: "single_select",
buttonText: { displayText: "Select Menu" },
type: 1,
nativeFlowInfo: {
name: "single_select",
paramsJson: JSON.stringify({
title: "List Group",
sections: [
{
title: "Group",
rows: [
{
title: `Button`,
description: `> Ini tampilan button`,
id: `.listb`
}
]
}
]
})
}
}
],
headerType: 1
});🔘 Buttons Message
await sock.sendMessage(jid, {
text: "Hello World",
buttons: [
{
buttonId: ".menu",
buttonText: {
displayText: "Menu"
}
},
{
buttonId: ".owner",
buttonText: {
displayText: "Owner"
}
}
]
})🔘 Buttons Message With Thumbnail
await sock.sendMessage(jid, {
image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" },
text: "Hello World",
buttons: [
{
buttonId: ".menu",
buttonText: {
displayText: "Menu"
}
},
{
buttonId: ".owner",
buttonText: {
displayText: "Owner"
}
}
]
})⚡ InteractiveMessage NativeFlowMessage With Thumbnail
const img = await generateWAMessageContent(
{ image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" }},
{ upload: sock.waUploadToServer }
);
const msg = generateWAMessageFromContent(
m.chat,
{
viewOnceMessageV2: {
message: {
interactiveMessage: {
header: {
hasMediaAttachment: true,
imageMessage: img.imageMessage
},
body: {
text: "Hallo"
},
footer: {
text: "test"
},
contextInfo: {
mentionedJid: [m.sender],
forwardingScore: 7,
isForwarded: true,
forwardedNewsletterMessageInfo: {
newsletterName: `Fvckers`,
newsletterJid: `1@newsletter`
}
},
nativeFlowMessage: {
messageParamsJson: JSON.stringify({
limited_time_offer: {
text: "FVCKERS",
url: "http://swiper.my.id",
copy_code: "Fvckers",
expiration_time: Date.now() + 86400000
},
bottom_sheet: {
in_thread_buttons_limit: 1,
divider_indices: [1, 2, 3, 4, 5, 999],
list_title: "List Menu",
button_title: "List Menu"
},
tap_target_configuration: {
title: " X ",
description: "bomboclard",
canonical_url: "https://swiper.my.id",
domain: "shop.example.com",
button_index: 0
}
}),
buttons: [
{
name: "single_select",
buttonParamsJson: JSON.stringify({
has_multiple_buttons: true
})
},
{
name: "single_select",
buttonParamsJson: JSON.stringify({
title: "Menu Bagian 1",
sections: [
{
title: "",
highlight_label: "",
rows: [
{
title: "Menu 1",
description: "> Menu 1",
id: "menu1"
}
]
},
{
title: "",
highlight_label: "",
rows: [
{
title: "Menu 2",
description: "> Menu2",
id: "menu2"
}
]
},
{
title: "",
highlight_label: "",
rows: [
{
title: "Menu 3",
description: "> Menu 3",
id: "menu3"
}
]
}
],
has_multiple_buttons: true
})
},
{
name: "single_select",
buttonParamsJson: JSON.stringify({
title: "Menu Bagian 2",
sections: [
{
title: "",
highlight_label: "",
rows: [
{
title: "Menu 1",
description: "> Menu 1",
id: "menu1"
}
]
},
{
title: "",
highlight_label: "",
rows: [
{
title: "Menu 2",
description: "> Menu 2",
id: "menu2"
}
]
},
{
title: "",
highlight_label: "",
rows: [
{
title: "Menu 3",
description: "> Menu 3",
id: "menu3"
}
]
}
],
has_multiple_buttons: true
})
},
{
name: "cta_url",
buttonParamsJson: JSON.stringify({
display_text: "[ My Owner ]",
url: "https://wa.me/62812345678"
})
},
{
name: "cta_url",
buttonParamsJson: JSON.stringify({
display_text: "[ My Website ]",
url: "https://swiper.my.id"
})
}
]
}
}
}
}
},
{ quoted: m }
);
await sock.relayMessage(m.chat, msg.message, {
messageId: msg.key.id
});📊 Create Poll
await sock.sendMessage(jid, {
poll: {
name: "Pilih Bahasa",
values: [
"JavaScript",
"Python",
"Go"
],
selectableCount: 1
}
})👥 Group Management
Create Group
await sock.groupCreate(
"Test Group",
[
"[email protected]"
]
)Get Metadata
const metadata =
await sock.groupMetadata(groupJid)
console.log(metadata)📢 Newsletter / Channel
Create Channel
await sock.newsletterCreate(
"FVCKERS Channel",
"Official Channel"
)Get Metadata
const meta =
await sock.newsletterMetadata(
"invite",
inviteCode
)
console.log(meta)📸 Upload Status
await sock.sendMessage(
"status@broadcast",
{
text: "Hello Status"
}
)📨 Message Event
sock.ev.on(
"messages.upsert",
async ({ messages }) => {
const m = messages[0]
if (!m.message) return
console.log(m)
}
)🔐 Authentication
Baileys mendukung:
- QR Login
- Pairing Code Login
- Multi File Auth
- Single File Auth
- Custom Auth Store
⚠️ Notes
- Gunakan Node.js v20+
- Jangan bagikan folder session
- Simpan credentials dengan aman
- Hindari spam agar akun tidak terkena limit WhatsApp
💌 Contact Developer
For questions, support, or collaboration, feel free to contact the developer:
- Telegram: Telegram Contact
- Channel WhatsApp: Channel WhatsApp
💖 Contributors outside the Baileys code
Thanks to the following awesome contributors who help improve this project
