@cikikomo/baileys

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

Cikikomo Baileys分叉——对接首选发件Node+nonce0,USync, professions, no selfSync, except DeviceJids LID fix, luxu no SelfSync (语法固定),通讯12036242628484388

中文使用文档
文档目录19 节
  1. 安装
  2. 导入
  3. 使用 QR 代码
  4. 用对等码连接
  5. 用 noSelfSync
  6. 发送命令
  7. 发送民意调查
  8. 发送产品信息
  9. 发送交互式消息
  10. 发送成员标签
  11. 向组成员发送消息
  12. 发送文本
  13. 发送图像
  14. 发送视频
  15. 发送音频
  16. 发送位置
  17. 发送民意调查
  18. 发送问答
  19. 发送状态

齐克科莫

CikiKomo

npm License GitHub Node

用于与WhatsApp Web互动的 WebSockets 库, 维护在 齐克科莫 商标. 这个项目是一个叉子 建造在顶部 贝利 由WhiskeySockets所著.

最近报告: @cikikomo/[email protected] ——对接线从 1.0.3/1.0.9 (中文(简体) ) (未更改),USync / no SelfSync,LID摘录 DeviceJids, luxu no SelfSync (1.0.11语法修饰).

包括USync设备解析+ assertSessions 这样你就可以 发送而不进行先前的聊天, (中文(简体) ), 财务报告和审定财务报表 noSelfSync 改为 发送时未在您自己的设备上显示信件。 。 。 .


安装

从 npm( 建议):

npm install @cikikomo/[email protected]

或者在原包名上用别名来表示,这样现有的进口继续工作:

"dependencies": {
  "@whiskeysockets/baileys": "npm:@cikikomo/[email protected]"
}

从 GitHub :

npm install github:aryoagung321-sudo/bilys

导入

const {
  default: makeWASocket,
  // other exports
} = require('@cikikomo/baileys');

正在连接到 WhatsApp

使用 QR 代码

const {
  default: makeWASocket,
  Browsers
} = require('@cikikomo/baileys');

const client = makeWASocket({
  browser: Browsers.cikikomo('Chrome'),
  printQRInTerminal: true
});

用对等码连接

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);

存储数据

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()));
});

发送信件

用 noSelfSync

noSelfSync 是用于 sendMessage 编号 : relayMessage (仅限私人/1-on-1聊天). 它控制信件是否同步到 您自己的链接设备 (电话/其他) 同一账户上的WhatsApp Web会话). 交付给接受方的货款不变.

  • noSelfSync: true ——消息传递给接收者,但确实 没有 显示在您自己的设备上.
  • noSelfSync: false (default)——正常行为;消息也被同步到自己的设备上.
// 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
})

发送命令

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 });

发送民意调查

await client.sendMessage(m.chat, {
  pollResultMessage: {
    name: "My Poll",
    options: [
      { optionName: "Option 1" },
      { optionName: "Option 2" }
    ],
    newsletter: {
      newsletterName: "CikiKomo",
      newsletterJid: "120363426628484388@newsletter"
    }
  }
});

发送产品信息

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"
  }
});

发送交互式消息

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 **/
    }
  })
});

发送成员标签

await client.sendMessage(m.chat, {
  groupLabel: {
    labelText: "Tagged members appear here"
  }
});

向组成员发送消息

await client.sendMessageMembers(m.chat, {
  extendedTextMessage: {
    text: "Hello members"
  }
}, {});

简单发送

发送文本

await client.sendText(m.chat, "Hello!", {
  contextInfo: {
    mentionedJid: [m.chat]
  }
}, {
  key: {
    remoteJid: "status@broadcast",
    participant: m.sender,
    fromMe: true
  },
  message: {
    conversation: "\0"
  }
});

发送图像

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"
  }
});

发送视频

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"
  }
});

发送音频

await client.sendAudio(m.chat, { url: "./pouaudio.mp3" }, {
  contextInfo: {
    mentionedJid: [m.chat]
  }
}, {
  key: {
    remoteJid: "status@broadcast",
    participant: m.sender,
    fromMe: true
  },
  message: {
    conversation: "\0"
  }
});

发送位置

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"
  }
});

发送民意调查

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"
  }
});

发送问答

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"
  }
});

发送状态

await client.statusMention(m.chat, {
  extendedTextMessage: {
    text: "Mentioned in status"
  }
});

贷项

奇克科莫是一个叉子 贝利,最初由 阿迪拉吉·辛格 由惠克索克特社区负责维护. 执行基本协议的所有功劳都归功于原始作者和贡献者. 见 自由主义 对许可证全文和版权通知.

捐款

见 捐款额 关于报告问题和提交牵引请求的准则.

免责声明

这是 没有 一个官方WhatsApp产品。 使用此库发送批量或非请求发送的信息 可能会违反WhatsApp的服役条款,并可能导致你的号码被禁. 负责任地使用.

版本与发布记录

@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分叉——对接首选发件Node+nonce0,USync, professions, no selfSync, except DeviceJids LID fix, luxu no SelfSync (语法固定),通讯12036242628484388

如何安装 @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 和提交记录判断。