@cikikomo/baileys
v1.0.11
Published
CikiKomo Baileys fork — pairing preferred sendNode+nonce0, USync, assertSessions, noSelfSync, extractDeviceJids LID fix, luxu noSelfSync (syntax fix), newsletter 120363426628484388
Maintainers
Readme
CikiKomo
A WebSockets library for interacting with WhatsApp Web, maintained under the CikiKomo brand. This project is a fork built on top of Baileys by WhiskeySockets.
Latest: @cikikomo/[email protected] — pairing wire from 1.0.3/1.0.9 (unchanged), USync / noSelfSync, LID extractDeviceJids, luxu noSelfSync (1.0.11 syntax fix).
Includes USync device resolve + assertSessions so you can send without a prior chat,
and noSelfSync to send without the message appearing on your own devices.
Installation
From npm (recommended):
npm install @cikikomo/[email protected]Or alias over the original package name so existing imports keep working:
"dependencies": {
"@whiskeysockets/baileys": "npm:@cikikomo/[email protected]"
}From GitHub:
npm install github:aryoagung321-sudo/bilysImport
const {
default: makeWASocket,
// other exports
} = require('@cikikomo/baileys');Connecting To WhatsApp
With QR Code
const {
default: makeWASocket,
Browsers
} = require('@cikikomo/baileys');
const client = makeWASocket({
browser: Browsers.cikikomo('Chrome'),
printQRInTerminal: true
});Connect With Pairing Code
const {
default: makeWASocket,
fetchLatestWAWebVersion,
Browsers
} = require('@cikikomo/baileys');
const client = makeWASocket({
browser: Browsers.cikikomo('Chrome'),
printQRInTerminal: false,
version: await fetchLatestWAWebVersion(),
aiLabel: false // set true to show an AI label on messages sent by the bot
// other options
});
const number = "628XXXXXXXXXX";
const code = await client.requestPairingCode(number.trim()); // or (number, "YYYYYYYY") for a custom pairing code
console.log("Your pairing code: " + code);Storing Data
const {
default: makeWASocket,
makeInMemoryStore
} = require('@cikikomo/baileys');
const pino = require('pino');
const store = makeInMemoryStore({
logger: pino().child({ level: 'silent', stream: 'store' })
});
const client = makeWASocket({
// options
});
store.bind(client.ev);
client.ev.on('contacts.upsert', () => {
console.log('New contact: ' + Object.values(store.contacts()));
});Sending Messages
Send / relay a message with noSelfSync
noSelfSync is an option for sendMessage / relayMessage (private/1-on-1 chats only).
It controls whether the message is also synced to your own linked devices (phone / other
WhatsApp Web sessions on the same account). Delivery to the recipient is unchanged.
noSelfSync: true— message goes to the recipient, but does not appear on your own devices.noSelfSync: false(default) — normal behavior; message is synced to your own devices too.
// Cara pakai: kirim tanpa muncul di device lu
await client.sendMessage(m.chat, {
text: "Hello"
}, {
noSelfSync: true
})
// Default: muncul juga di device lu
await client.sendMessage(m.chat, {
text: "Hello"
}, {
noSelfSync: false
})
// Sama via relayMessage
await client.relayMessage(m.chat, {
conversation: "Hello"
}, {
noSelfSync: true
})Send an orderMessage
const fs = require('fs');
const thumbnail = fs.readFileSync('./pouthumb.jpg');
await client.sendMessage(m.chat, {
thumbnail,
message: "Order summary",
orderTitle: "My Store",
totalAmount1000: 72502,
totalCurrencyCode: "IDR"
}, { quoted: m });Send a pollResultSnapshotMessage
await client.sendMessage(m.chat, {
pollResultMessage: {
name: "My Poll",
options: [
{ optionName: "Option 1" },
{ optionName: "Option 2" }
],
newsletter: {
newsletterName: "CikiKomo",
newsletterJid: "120363426628484388@newsletter"
}
}
});Send a productMessage
await client.relayMessage(m.chat, {
productMessage: {
title: "Product.pdf",
description: "Product description",
thumbnail: { url: "./pouthumb.jpg" },
productId: "EXAMPLE_TOKEN",
retailerId: "EXAMPLE_RETAILER_ID",
url: "https://example.com",
body: "Body text",
footer: "Footer",
buttons: [
{
name: "cta_url",
buttonParamsJson: "{\"display_text\":\"Visit\",\"url\":\"https://example.com\"}"
}
],
priceAmount1000: 72502,
currencyCode: "IDR"
}
});Send an interactiveMessage
await client.sendMessage(m.chat, {
image: { url: "./pouimg.jpg" },
text: "body",
title: "title", // required when sending media
footer: "footer",
interactiveButtons: [
{
name: "single_select",
buttonParamsJson: JSON.stringify({
title: "\0"
})
}
],
messageParams: JSON.stringify({
bottom_sheet: {
/** other params **/
}
})
});Send a member label
await client.sendMessage(m.chat, {
groupLabel: {
labelText: "Tagged members appear here"
}
});Send a message to group members
await client.sendMessageMembers(m.chat, {
extendedTextMessage: {
text: "Hello members"
}
}, {});Simple sendMessage Helpers
Send text
await client.sendText(m.chat, "Hello!", {
contextInfo: {
mentionedJid: [m.chat]
}
}, {
key: {
remoteJid: "status@broadcast",
participant: m.sender,
fromMe: true
},
message: {
conversation: "\0"
}
});Send image
await client.sendImage(m.chat, { url: "./pouimg.jpg" }, "Caption", {
contextInfo: {
mentionedJid: [m.chat]
}
}, {
key: {
remoteJid: "status@broadcast",
participant: m.sender,
fromMe: true
},
message: {
conversation: "\0"
}
});Send video
await client.sendVideo(m.chat, { url: "./video.mp4" }, "Caption", {
contextInfo: {
mentionedJid: [m.chat]
}
}, {
key: {
remoteJid: "status@broadcast",
participant: m.sender,
fromMe: true
},
message: {
conversation: "\0"
}
});Send audio
await client.sendAudio(m.chat, { url: "./pouaudio.mp3" }, {
contextInfo: {
mentionedJid: [m.chat]
}
}, {
key: {
remoteJid: "status@broadcast",
participant: m.sender,
fromMe: true
},
message: {
conversation: "\0"
}
});Send location
await client.sendLocation(m.chat, "Caption", 90.0, 90.0, "https://example.com", "1234567890", {
contextInfo: {
mentionedJid: [m.chat]
}
}, {
key: {
remoteJid: "status@broadcast",
participant: m.sender,
fromMe: true
},
message: {
conversation: "\0"
}
});Send poll
await client.sendPoll(m.chat, "Pick one", ["1", "2", "3"], true, {
contextInfo: {
mentionedJid: [m.chat]
}
}, {
key: {
remoteJid: "status@broadcast",
participant: m.sender,
fromMe: true
},
message: {
conversation: "\0"
}
});Send quiz
await client.sendQuiz(m.chat, "Quiz question", ["1", "2", "3"], "2", {
contextInfo: {
mentionedJid: [m.chat]
}
}, {
key: {
remoteJid: "status@broadcast",
participant: m.sender,
fromMe: true
},
message: {
conversation: "\0"
}
});Send status mention
await client.statusMention(m.chat, {
extendedTextMessage: {
text: "Mentioned in status"
}
});Credits
CikiKomo is a fork of Baileys, originally created by Adhiraj Singh and maintained by the WhiskeySockets community. All credit for the underlying protocol implementation goes to the original authors and contributors. See LICENSE for the full license text and copyright notices.
Contributing
See CONTRIBUTING.md for guidelines on reporting issues and submitting pull requests.
Disclaimer
This is not an official WhatsApp product. Use of this library to send bulk or unsolicited messages may violate WhatsApp's Terms of Service and can result in your number being banned. Use responsibly.
