- ◆ 支持核心
- CatServer,Spigot
- ◆ 插件前置
- XinxinBotApi, XinxinCustomMessage
- ◆ 游戏版本
- 1.12.2
本插件为XXCM附属插件,需要正确部署好xxbot以及xxcm,如果你无法部署,请移步XinxinCustomMessage
插件变量:
YAML:
较为重要的几个变量
%yuque_doc_title% #文档标题
%yuque_doc_url% #文档地址
%yuque_actor_name% #文档作者昵称
#(你可以通过找规律的方法找出变量的格式哟!)
{
"data": {
"id": 176716697,
"slug": "vpezto6sd9q0e7gi",
"title": "附属插件导航",
"book_id": 52612070,
"user_id": 26234742,
"format": "lake",
"body": "以下是收录的机器人的附属插件(如果你是开发者想要开发附属请联系QQ2821396723)<br />[XinxinCustomMessage](https://www.yuque.com/haishen668/xinxinbot/qxc0wpq762aycagd?view=doc_embed)<br />[XinxinWhiteList](https://www.yuque.com/haishen668/xinxinbot/pbvmwne432fdhi2w?view=doc_embed)\n",
"body_draft": "",
"body_html": "<!doctype html><div class=\"lake-content\" typography=\"classic\"><p id=\"ua291b753\" class=\"ne-p\"><span class=\"ne-text\">以下是收录的机器人的附属插件(如果你是开 发者想要开发附属请联系QQ2821396723)</span></p><div id=\"FN8x1\" class=\"ne-yuque\">此处为语雀内容卡片,点击链接查看:<a href=\"https://www.yuque.com/haishen668/xinxinbot/qxc0wpq762aycagd\" target=\"_blank\">https://www.yuque.com/haishen668/xinxinbot/qxc0wpq762aycagd</a></div><div id=\"KF2jQ\" class=\"ne-yuque\">此处为语雀内容卡片,点击链接查看:<a href=\"https://www.yuque.com/haishen668/xinxinbot/pbvmwne432fdhi2w\" target=\"_blank\">https://www.yuque.com/haishen668/xinxinbot/pbvmwne432fdhi2w</a></div></div>",
"word_count": 68,
"likes_count": 0,
"comments_count": 0,
"created_at": "2024-07-05T11:12:54.000Z",
"updated_at": "2024-07-09T03:49:38.000Z",
"deleted_at": null,
"published_at": "2024-07-09T03:49:38.000Z",
"first_published_at": "2024-07-05T11:16:48.538Z",
"content_updated_at": "2024-07-05T11:50:45.000Z",
"user": {
"id": 26234742,
"type": "User",
"login": "haishen668",
"name": "haishen668",
"avatar_url": "https://cdn.nlark.com/yuque/0/2022/jpeg/anonymous/1645429347507-35177ff5-ca01-4d6c-a30f-ac6a661eb111.jpeg",
"books_count": 1,
"public_books_count": 0,
"followers_count": 0,
"following_count": 0,
"public": 1,
"description": null,
"created_at": "2022-02-21T07:42:53.000Z",
"updated_at": "2024-07-08T05:39:48.000Z",
"work_id": "",
"_serializer": "v2.user"
},
"book": {
"id": 52612070,
"type": "Book",
"slug": "xinxinbot",
"name": "XinxinBotAPI",
"user_id": 26234742,
"description": "",
"creator_id": 26234742,
"public": 1,
"items_count": 7,
"likes_count": 0,
"watches_count": 0,
"content_updated_at": "2024-07-09T03:49:37.640Z",
"created_at": "2024-07-05T07:14:30.000Z",
"updated_at": "2024-07-09T03:49:38.000Z",
"user": null,
"_serializer": "v2.book"
},
"tags": [],
"path": "haishen668/xinxinbot/vpezto6sd9q0e7gi",
"_serializer": "webhook.doc_detail",
"publish": false,
"actor_id": 26234742,
"actor": {
"id": 26234742,
"type": "User",
"login": "haishen668",
"name": "haishen668",
"avatar_url": "https://cdn.nlark.com/yuque/0/2022/jpeg/anonymous/1645429347507-35177ff5-ca01-4d6c-a30f-ac6a661eb111.jpeg",
"books_count": 1,
"public_books_count": 0,
"followers_count": 0,
"following_count": 0,
"public": 1,
"description": null,
"created_at": "2022-02-21T07:42:53.000Z",
"updated_at": "2024-07-08T05:39:48.000Z",
"work_id": "",
"_serializer": "v2.user"
},
"webhook_subject_type": "update",
"action_type": "update",
"url": "https://www.yuque.com/haishen668/xinxinbot/vpezto6sd9q0e7gi"
}
}
这是数据示例
yuque.yml示例:
YAML:
custom_messages:
文档更新监听:
#触发的关键词
trigger: "[update]"
#需要推送的群聊请自行修改
groups:
- "123456"
#回复的内容
responses:
- "语雀文档《%yuque_doc_title%》更新了"
- "作者:%yuque_actor_name%"
- "文档地址: %yuque_doc_url%"
使用方法:
1. 确保部署完毕xxbot以及xxcm2. 将yuque.yml置入xxcm的message文件夹中
3. 打开插件配置文件夹,其中仅有配置port(端口)一个所需修改项
4. 前往语雀打开知识库管理,点入消息推送(此功能由语雀会员提供)
Webhook地址填写格式为:
http://你的服务器地址:你所开放的空闲的端口/webhook
例如: http://127.0.0.1:25565/webhook
5. 重载xxcm即可进行测试