@cikikomo/baileys

中文文档
1.0.11发布于 2026/08/07MITTypeScriptES Module近 30 天下载 2942

CikiKomo Baileys fork — pairing preferred sendNode+nonce0, USync, assertSessions, noSelfSync, extractDeviceJids LID fix, luxu noSelfSync (syntax fix), newsletter 120363426628484388

原始使用文档
文档目录19 节
  1. Installation
  2. Import
  3. With QR Code
  4. Connect With Pairing Code
  5. Send / relay a message with noSelfSync
  6. Send an orderMessage
  7. Send a pollResultSnapshotMessage
  8. Send a productMessage
  9. Send an interactiveMessage
  10. Send a member label
  11. Send a message to group members
  12. Send text
  13. Send image
  14. Send video
  15. Send audio
  16. Send location
  17. Send poll
  18. Send quiz
  19. Send status mention

CikiKomo

CikiKomo

npm License GitHub Node

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/bilys

Import

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.

版本与发布记录

@cikikomo/baileys 共发布 12 个版本,首次发布于 2026/07/29;过去 12 个月发布了 12 个版本。

版本发布日期距今
1.0.11latest2026/08/073 个月前
1.0.102026/08/073 个月前
1.0.92026/08/073 个月前
1.0.82026/08/073 个月前
1.0.72026/08/073 个月前
1.0.62026/08/073 个月前

关于 @cikikomo/baileys 的常见问题

@cikikomo/baileys 是什么?

CikiKomo Baileys fork — pairing preferred sendNode+nonce0, USync, assertSessions, noSelfSync, extractDeviceJids LID fix, luxu noSelfSync (syntax fix), newsletter 120363426628484388

如何安装 @cikikomo/baileys?

在项目目录运行 npm install @cikikomo/baileys,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:sharp(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cikikomo/baileys 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cikikomo/baileys 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@cikikomo/baileys 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cikikomo/baileys 可以商用吗?

@cikikomo/baileys 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cikikomo/baileys 的下载量有多少?

根据 npm 官方下载统计,@cikikomo/baileys 在 2026/10/10 – 2026/11/08 这 30 天内被下载 2,942 次,日均约 98 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cikikomo/baileys 还在维护吗?

最新版本 1.0.11 发布于 2026/08/07(3 个月前);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/07/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。