# @cikikomo/baileys 中文文档

规范地址：https://npmcn.com/package/%40cikikomo/baileys/

版本：1\.0\.11
npm 元数据更新时间：2026-08-07T14:46:40.691Z
中文译文更新时间：2026-11-09T16:07:34.555Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40cikikomo/baileys
原文对照：https://npmcn.com/package/%40cikikomo/baileys/?lang=original
项目主页：https://github.com/aryoagung321-sudo/bilys
源码仓库：https://github.com/aryoagung321-sudo/bilys

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：17.6 MB，116 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=20\.0\.0
- 运行依赖：13 个
- peer 依赖：audio-decode ^2\.1\.3，jimp ^1\.6\.1，link-preview-js ^3\.0\.0，sharp \*
- 首次发布：2026-07-28T18:25:49.457Z
- 最新版本发布：2026-08-07T14:46:40.537Z
- 近 30 天下载量：2942（2026-10-10 至 2026-11-08，npm 官方下载统计）
- 已发布版本数：12（近 12 个月 12 个）

## 中文简介

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

## 安装

```sh
npm install @cikikomo/baileys
```

也可以使用：`pnpm add @cikikomo/baileys`、`yarn add @cikikomo/baileys`、`bun add @cikikomo/baileys`

## README

# 

齐克科莫

![CikiKomo](https://files.catbox.moe/vqizuu.png)

[![npm](https://img.shields.io/npm/v/@cikikomo/baileys.svg)](https://www.npmjs.com/package/@cikikomo/baileys) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://npmcn.com/package/%40cikikomo/baileys/LICENSE) [![GitHub](https://img.shields.io/badge/source-GitHub-black.svg)](https://github.com/aryoagung321-sudo/bilys) [![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://npmcn.com/package/%40cikikomo/baileys/package.json)

用于与WhatsApp Web互动的 WebSockets 库, 维护在 **齐克科莫** 商标. 这个项目是一个叉子 建造在顶部 [贝利](https://github.com/WhiskeySockets/Baileys) 由WhiskeySockets所著.

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

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

* * *

## 安装

从 npm( 建议):

```bash
npm install @cikikomo/baileys@1.0.11
```

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

```json
"dependencies": {
  "@whiskeysockets/baileys": "npm:@cikikomo/baileys@1.0.11"
}
```

从 GitHub :

```bash
npm install github:aryoagung321-sudo/bilys
```

## 导入

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

* * *

# 正在连接到 WhatsApp

## 使用 QR 代码

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

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

## 用对等码连接

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

# 存储数据

```javascript
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)——正常行为;消息也被同步到自己的设备上.

```javascript
// 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
})
```

## 发送命令

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

## 发送民意调查

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

## 发送产品信息

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

## 发送交互式消息

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

## 发送成员标签

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

## 向组成员发送消息

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

# 简单发送

## 发送文本

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

## 发送图像

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

## 发送视频

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

## 发送音频

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

## 发送位置

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

## 发送民意调查

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

## 发送问答

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

## 发送状态

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

* * *

# 贷项

奇克科莫是一个叉子 [贝利](https://github.com/WhiskeySockets/Baileys),最初由 [阿迪拉吉·辛格](https://github.com/adiwajshing) 由惠克索克特社区负责维护. 执行基本协议的所有功劳都归功于原始作者和贡献者. 见 [自由主义](https://npmcn.com/package/%40cikikomo/baileys/LICENSE) 对许可证全文和版权通知.

# 捐款

见 [捐款额](https://npmcn.com/package/%40cikikomo/baileys/CONTRIBUTING.md) 关于报告问题和提交牵引请求的准则.

# 免责声明

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

## 常见问题

### @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 和提交记录判断。

