Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/develop/nodesdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
$ npm i @tencent-connect/bot-node-sdk
```

如果安装失败,可尝试使用腾讯源, 在上述命令后拼接 ` --registry=https://mirrors.tencent.com/npm/`。
如果安装失败,可尝试使用腾讯源

```sh
$ npm i @tencent/bot-node-sdk --registry=https://mirrors.tencent.com/npm/
```

### yarn 方式

Expand All @@ -54,7 +58,7 @@ $ yarn add @tencent-connect/bot-node-sdk
// import { creatOpenAPI, creatWebsocket } from '@tencent-connect/bot-node-sdk';

// CommonJs
const { creatOpenAPI, creatWebsocket } = require('@tencent/bot-node-sdk');
const { creatOpenAPI, creatWebsocket } = require('@tencent-connect/bot-node-sdk');

const testConfig = {
appID: 'APPID', // 申请机器人时获取到的机器人 BotAppID
Expand Down
4 changes: 2 additions & 2 deletions docs/develop/nodesdk/wss/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## 使用示例

### 创建 WSS 实例并监听消息
### 创建 WS 实例并监听消息

```js
import { creatWebsocket } from '@tencent/bot-node-sdk';
import { creatWebsocket } from '@tencent-connect/bot-node-sdk';
const ws = creatWebsocket(testConfigWs);
ws.on('READY', (data) => {
console.log('[READY] 事件接收 :', data);
Expand Down