Merge pull request #31 from wangcham/main

add support for dingtalk
This commit is contained in:
Junyan Qin (Chin)
2025-02-13 23:57:14 +08:00
committed by GitHub
9 changed files with 63 additions and 3 deletions
+3 -2
View File
@@ -86,8 +86,6 @@ export default defineConfig({
},
],
},
{ text: "企业微信", link: "/deploy/platforms/wecom/wecom" },
{ text:"微信公众号",link:"/deploy/platforms/wxoa.md"},
{ text: "个人微信",
collapsed: true,
items: [
@@ -97,7 +95,10 @@ export default defineConfig({
},
],
},
{ text: "企业微信", link: "/deploy/platforms/wecom/wecom" },
{ text:"微信公众号",link:"/deploy/platforms/wxoa.md"},
{ text: "飞书", link: "/deploy/platforms/lark" },
{ text:"钉钉",link:"/deploy/platforms/dingtalk.md"},
{ text: "Discord", link: "/deploy/platforms/discord" },
],
},
Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

+43
View File
@@ -0,0 +1,43 @@
# 部署钉钉机器人
## 创建机器人
进入 [钉钉开发者后台](https://open-dev.dingtalk.com/?spm=ding_open_doc.document.0.0.74f445e5MkawbT#/),登录并且进入组织。登陆成功后进入开放平台,是这样的:
![钉钉开放平台](/assets/image/ding1.png)
点击上方的 `应用开发`,然后点击右面蓝色的按钮 `创建应用`,填写机器人的基本信息,点击保存。
进入了机器人的后台,比如我们有机器人 langbot2 ,那么它的管理页面是这样的:
![机器人页面](/assets/image/ding2.png)
## 配置机器人
点击 `添加应用能力`,`其他应用能力`,`机器人`中的 `配置`,点击配置并且填写信息之后,如下图:
![机器人配置](/assets/image/ding3.png)
点击页面下方的`发布`,发布成功之后,点击机器人页面中左侧最下方的`版本管理与发布`,如图:
![版本管理与发布](/assets/image/ding4.png)
如果是第一次创建机器人,那么右边是空的,需要点击`创建新版本`,在其中设置信息,然后设置`应用可见范围`,点击保存。
点击`事件订阅`,将其中的推送方式改为`Stream模式推送`。
## 填写配置信息
点击`凭证与基础信息`,记录`Client ID` 和 `Client Secret`,
点击`应用能力`,`机器人`,记录下 RobotCode 和 机器人名称。
将以上配置项填写入[钉钉机器人配置项](/deploy/quick-config/config.md#钉钉适配器)。<br>
启动 LangBot 。
## 添加机器人
本文使用钉钉 windows 桌面版举例,点击上方的`搜索`,`功能`,然后输入刚才机器人创建的名称,如图:
![robot_png](/assets/image/ding5.png)
点击机器人即可和机器人聊天。<br>
如果想要添加到群里,那么点击钉钉群的`群管理`,`机器人`,`添加机器人`,然后搜索机器人名称就可以在群中使用。
+1
View File
@@ -11,4 +11,5 @@ LangBot 需要连接消息平台 API 才能与用户交互,目前支持以下
| 微信公众号 | ✅ | 微信公众平台机器人 | [教程](/deploy/platforms/wxoa.md) |
| 个人微信 | ✅ | 个人微信机器人 | [Gewechat](/deploy/platforms/wechat/gewechat) |
| 飞书 | ✅ | | [教程](/deploy/platforms/lark) |
| 钉钉 | ✅ | | [教程](/deploy/platforms/dingtalk) |
| Discord | ✅ | | [教程](/deploy/platforms/discord) |
+16 -1
View File
@@ -9,7 +9,7 @@
## platform.json
修改此配置文件以指定需要连接的消息平台,只需要关注`platform-adapters`字段。
目前支持 `go-cqhttp`(QQ逆向)、`aiocqhttp`(QQ逆向)、`qq-botpy`(QQ官方)、`wecom`(企业微信官方) 消息平台适配器,也可以同时启用多个同种类或不同种类的平台适配器。
目前支持 `go-cqhttp`(QQ逆向)、`aiocqhttp`(QQ逆向)、`qq-botpy`(QQ官方)、`wecom`(企业微信官方) 等多种消息平台适配器,也可以同时启用多个同种类或不同种类的平台适配器。
请根据你部署的消息平台的情况选择填写。
::: info
@@ -213,6 +213,21 @@
},
```
## 钉钉适配器
具体用法请查看[配置钉钉机器人](/deploy/platforms/dingtalk.md)
```json
{
"adapter":"dingtalk",
"enable": false,
"client_id":"",
"client_secret":"",
"robot_code":"",
"robot_name":""
},
```
## Discord
具体用法请查看[配置 Discord](/deploy/platforms/discord.md)。