Skip to content

Commit

Permalink
docs: 修复文档中的 zhlint 错误并增加 GitHub Workflow (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
st1020 authored Nov 6, 2024
1 parent 79c9a91 commit 886d4c0
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/lint-other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@ jobs:
uses: ./.github/actions/setup-node

- run: pnpm run eslint

zhlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: ./.github/actions/setup-node

- run: pnpm run zhlint
2 changes: 1 addition & 1 deletion .zhlintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"preset": "default",
"rules": {
"adjustedFullWidthPunctuation": ""
"adjustedFullwidthPunctuation": ""
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ AliceBot 是一个简单的 Python 异步多后端机器人框架,支持多种
目前 AliceBot 官方维护了以下协议适配:

- [OneBot (CQHTTP) 协议](https://github.com/botuniverse/onebot-11) (支持 QQ 等) [ws](https://github.com/botuniverse/onebot-11/blob/master/communication/ws.md)[ws-reverse](https://github.com/botuniverse/onebot-11/blob/master/communication/ws-reverse.md) 连接方式
- [OneBot v12 协议](https://12.onebot.dev/) [ws](https://12.onebot.dev/connect/communication/websocket/)[ws-reverse](https://12.onebot.dev/connect/communication/websocket-reverse/) 连接方式
- [OneBot v12 协议](https://12.onebot.dev/)[ws](https://12.onebot.dev/connect/communication/websocket/)[ws-reverse](https://12.onebot.dev/connect/communication/websocket-reverse/) 连接方式
- [mirai-api-http 协议](https://github.com/project-mirai/mirai-api-http) 2.0+ [ws](https://github.com/project-mirai/mirai-api-http/blob/master/docs/adapter/WebsocketAdapter.md)[reverse-ws](https://github.com/project-mirai/mirai-api-http/blob/master/docs/adapter/ReverseWebsocketAdapter.md) 连接方式
- [钉钉](https://developers.dingtalk.com/document/robots/robot-overview)企业机器人的 outgoing (回调) 连接方式
- [Telegram](https://core.telegram.org/bots) 机器人的 polling 和 webhook 连接方式
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/adapters/cqhttp-adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pip install alicebot-adapter-cqhttp

## 配置协议端

CQHTTP 协议适配器是 OneBot v11 协议 (原 CKYU 平台的 CQHTTP 协议) 的适配器,需要一个兼容 OneBot 协议的协议端进行通讯,你可以参考 [OneBot 官网](https://onebot.dev/ecosystem.html) 寻找支持 OneBot v11 协议的协议端。
CQHTTP 协议适配器是 OneBot v11 协议 (原 CKYU 平台的 CQHTTP 协议) 的适配器,需要一个兼容 OneBot 协议的协议端进行通讯,你可以参考 [OneBot 官网](https://onebot.dev/ecosystem.html)寻找支持 OneBot v11 协议的协议端。

以下以 go-cqhttp 为例:

Expand Down
4 changes: 2 additions & 2 deletions docs/guide/adapters/telegram-adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pip install alicebot-adapter-telegram

## 配置协议端

Telegram 协议适配器是 Telegram Bot 协议的适配器,你需要根据 [Telegram Bots 文档](https://core.telegram.org/bots) 创建机器人并且获得一个类似 `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11` 这样的的 token。
Telegram 协议适配器是 Telegram Bot 协议的适配器,你需要根据 [Telegram Bots 文档](https://core.telegram.org/bots)创建机器人并且获得一个类似 `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11` 这样的的 token。

## 配置 AliceBot

Expand All @@ -27,7 +27,7 @@ bot_token = "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
proxy = "http://127.0.0.1:1234"
```

如果你部署 AliceBot 的服务器具有公网 IP 或者域名,则可以使用 Webhook 获取事件不推荐
如果你部署 AliceBot 的服务器具有公网 IP 或者域名,则可以使用 Webhook 获取事件 (不推荐)

```toml
[adapter.telegram]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ AliceBot 推荐的目录结构如下:

## 配置协议端

上面的例子中使用了 `alicebot.adapter.cqhttp` 协议适配器,它是 OneBot v11 协议 (原 CKYU 平台的 CQHTTP 协议) 的适配器,需要一个兼容 OneBot 协议的协议端进行通讯,你可以参考 [OneBot 官网](https://onebot.dev/ecosystem.html) 寻找支持 OneBot v11 协议的协议端。
上面的例子中使用了 `alicebot.adapter.cqhttp` 协议适配器,它是 OneBot v11 协议 (原 CKYU 平台的 CQHTTP 协议) 的适配器,需要一个兼容 OneBot 协议的协议端进行通讯,你可以参考 [OneBot 官网](https://onebot.dev/ecosystem.html)寻找支持 OneBot v11 协议的协议端。

更多信息详见 [CQHTTP 协议使用指南](/guide/adapters/cqhttp-adapter.md)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"docs:serve": "vitepress serve docs",
"changelog": "conventional-changelog -p angular -i docs/changelog.md -s -r 0",
"markdownlint": "markdownlint-cli2 '{*.md,docs/guide/**/*.md,packages/**/*.md}'",
"zhlint": "zhlint '{docs/guide/**/*.md,packages/**/*.md}'",
"zhlint": "zhlint '{README.md,docs/guide/**/*.md,packages/**/*.md}'",
"pyright": "pyright",
"prettier": "prettier -c .",
"prettier:fix": "prettier -w .",
Expand Down

0 comments on commit 886d4c0

Please sign in to comment.