{"id":19854898,"url":"https://github.com/floattech/zerobot-plugin-dynamic","last_synced_at":"2025-08-23T06:06:13.824Z","repository":{"id":57710259,"uuid":"417010843","full_name":"FloatTech/ZeroBot-Plugin-Dynamic","owner":"FloatTech","description":"ZeroBot-Plugin 的模块化，不支持 Windows，需要 CGO","archived":false,"fork":false,"pushed_at":"2023-09-23T11:11:00.000Z","size":174,"stargazers_count":10,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T20:36:07.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FloatTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-14T06:15:09.000Z","updated_at":"2024-08-29T01:48:42.000Z","dependencies_parsed_at":"2024-06-19T01:32:27.071Z","dependency_job_id":"1bd4cc29-4997-4992-9e60-427cf719b22f","html_url":"https://github.com/FloatTech/ZeroBot-Plugin-Dynamic","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2FZeroBot-Plugin-Dynamic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2FZeroBot-Plugin-Dynamic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2FZeroBot-Plugin-Dynamic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloatTech%2FZeroBot-Plugin-Dynamic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FloatTech","download_url":"https://codeload.github.com/FloatTech/ZeroBot-Plugin-Dynamic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969249,"owners_count":21673182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:11:01.619Z","updated_at":"2025-05-02T01:30:36.234Z","avatar_url":"https://github.com/FloatTech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/yaya.jpg\" width = \"150\" height = \"150\" alt=\"OneBot-YaYa\"\u003e\u003cbr\u003e\n  \u003ch1\u003eZeroBot-Plugin-Dynamic\u003c/h1\u003e\n  ZeroBot-Plugin 的模块化，不支持 Windows，需要 CGO\u003cbr\u003e\u003cbr\u003e\n\n  \u003cimg src=\"http://counter.seku.su/cmoe?name=ZeroBot-Plugin\u0026theme=r34\" /\u003e\n\n[![GOCQ](https://img.shields.io/badge/OneBot-MiraiGo-green.svg?style=social\u0026logo=appveyor)](https://github.com/Mrs4s/go-cqhttp)\n[![OICQ](https://img.shields.io/badge/OneBot-OICQ-green.svg?style=social\u0026logo=appveyor)](https://github.com/takayama-lily/node-onebot)\n[![MIRAI](https://img.shields.io/badge/OneBot-Mirai-green.svg?style=social\u0026logo=appveyor)](https://github.com/yyuueexxiinngg/onebot-kotlin)\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/FloatTech/ZeroBot-Plugin?style=flat-square\u0026logo=go)](https://goreportcard.com/report/github.com/github.com/FloatTech/ZeroBot-Plugin)\n[![Badge](https://img.shields.io/badge/onebot-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://github.com/howmanybots/onebot)\n[![Badge](https://img.shields.io/badge/zerobot-v1.6.11-black?style=flat-square\u0026logo=go)](https://github.com/wdvxdr1123/ZeroBot)\n[![License](https://img.shields.io/github/license/FloatTech/ZeroBot-Plugin.svg?style=flat-square\u0026logo=gnu)](https://raw.githubusercontent.com/FloatTech/ZeroBot-Plugin/master/LICENSE)\n[![qq group](https://img.shields.io/badge/group-1048452984-red?style=flat-square\u0026logo=tencent-qq)](https://jq.qq.com/?_wv=1027\u0026k=QMb7x1mM)\n\n本项目符合 [OneBot](https://github.com/howmanybots/onebot) 标准，可基于以下项目与机器人框架/平台进行交互\n| 项目地址 | 平台 | 核心作者 |\n| --- | --- | --- |\n| [Mrs4s/go-cqhttp](https://github.com/Mrs4s/go-cqhttp) | [MiraiGo](https://github.com/Mrs4s/MiraiGo) | Mrs4s |\n| [yyuueexxiinngg/cqhttp-mirai](https://github.com/yyuueexxiinngg/cqhttp-mirai) | [Mirai](https://github.com/mamoe/mirai) | yyuueexxiinngg |\n| [takayama-lily/onebot](https://github.com/takayama-lily/onebot) | [OICQ](https://github.com/takayama-lily/oicq) | takayama |\n\n\u003c/div\u003e\n\n## 命令行参数\n\u003e `[]`代表是可选参数\n```bash\nzerobot [-h] [-n nickname] [-t token] [-u url] [-p prefix] [-d|w] [-c|s config.json] [-l latency] [-r ringlen] [-x max process time] [qq1 qq2 qq3 ...] [\u0026]\n```\n- **-h**: 显示帮助\n- **-n nickname**: 设置默认昵称，默认为`椛椛`\n- **-t token**: 设置`AccessToken`，默认为空\n- **-u url**: 设置`Url`，默认为`ws://127.0.0.1:6700`\n- **-p prefix**: 设置命令前缀，默认为`/`\n- **-d|w**: 开启 debug | warning 级别及以上日志输出\n- **-c config.json**: 从`config.json`加载`bot`配置\n- **-s config.json**: 保存现在`bot`配置到`config.json`\n- **-l latency**: 全局处理延时 (ms)\n- **-r ringlen**: 接收消息环缓冲区大小，`0`为不设缓冲，并发处理\n- **-x max process time**: 最大处理时间 (min)\n- **qqs**: superusers 的 qq 号\n- **\u0026**: 驻留在后台，必须放在最后，仅`Linux`下有效\n\n默认配置文件格式如下。当选择从配置文件加载时，将忽略相应命令行参数。\n```json\n{\n    \"zero\": {\n        \"nickname\": [\n            \"椛椛\",\n            \"ATRI\",\n            \"atri\",\n            \"亚托莉\",\n            \"アトリ\"\n        ],\n        \"command_prefix\": \"/\",\n        \"super_users\": [],\n        \"ring_len\": 4096,\n        \"latency\": 233000000,\n        \"max_process_time\": 240000000000\n    },\n    \"ws\": [\n        {\n            \"Url\": \"ws://127.0.0.1:6700\",\n            \"AccessToken\": \"\"\n        }\n    ],\n    \"wss\": null\n}\n```\n\n## 功能\n\u003e 更多插件详见[ZeroBot-Plugin](https://github.com/FloatTech/ZeroBot-Plugin)\n\n- **动态加载插件**\n    - [x] /刷新插件\n    - [x] /加载插件 service名\n    - [x] /卸载插件 service名\n    - 仅 Linux, FreeBSD, macOS 可用\n    - 开启后主可执行文件大约增加 2M ，每个插件的`.so`文件约为 2 ~ 10 M ，如非必要不建议使用\n    - 动态加载的插件需放置在`plugins/`下，命名为`service名.so`，编译模版详见[Plugin-Template](https://github.com/FloatTech/Plugin-Template)\n- **插件控制**\n    - [x] /响应 (在发送的群/用户开始工作)\n    - [x] /沉默 (在发送的群/用户停止工作)\n    - [x] /全局响应 (在所有位置开始工作，无视单独的沉默)\n    - [x] /全局沉默 (在所有本应沉默的位置停止工作，显式指定启用的位置不受影响)\n    - [x] /启用 xxx (在发送的群/用户启用xxx)\n    - [x] /禁用 xxx (在发送的群/用户禁用xxx)\n    - [x] /此处启用所有插件\n    - [x] /此处禁用所有插件\n    - [x] /全局启用 xxx\n    - [x] /全局禁用 xxx\n    - [x] /还原 xxx (在发送的群/用户还原xxx的开启状态到初始状态)\n    - 注：当全局未配置或与默认相同时，状态取决于单独配置，后备为默认配置；当全局与默认不同时，状态取决于全局配置，单独配置失效。\n    - [x] /改变默认启用状态 xxx\n    - [x] /禁止 service qq1 qq2... (禁止 qqs 使用服务 service)\n    - [x] /允许 service qq1 qq2... (重新允许 qqs 使用服务 service)\n    - [x] /封禁 qq1 qq2... (禁止 qqs 使用全部服务)\n    - [x] /解封 qq1 qq2... (允许 qqs 使用全部服务)\n    - [x] /用法 xxx\n    - [x] /服务列表\n    - [x] /设置服务列表显示行数 xx (默认值为 9, 该设置仅运行时有效, zbp 重启后重置)\n    - [x] @Bot 插件冲突检测 (会在本群发送一条消息并在约 1s 后撤回以检测其它同类 bot 中已启用的插件并禁用)\n\n## 使用方法\n\n### 使用稳定版/测试版 (推荐)\n\n可以前往[Release](https://github.com/FloatTech/ZeroBot-Plugin-Dynamic/releases)页面下载对应系统版本可执行文件，并将插件放到`plugins/`目录下。\n\n### 本地直接运行\n\n1. 下载安装最新 [Go](https://studygolang.com/dl) 环境\n2. 下载本项目[压缩包](https://github.com/FloatTech/ZeroBot-Plugin/archive/master.zip)，本地解压\n3. 编辑 main.go 文件，内容按需修改\n4. 运行 OneBot 框架\n5. `Windows`下双击 run.bat 文件，`Linux`下使用 run.sh 运行本插件\n\n### 编译运行\n\n#### 利用 Actions 在线编译\n\n1. 点击右上角 Fork 本项目，并转跳到自己 Fork 的仓库\n2. 点击仓库上方的 Actions 按钮，确认使用 Actions\n3. 编辑 main.go 文件，内容按需修改\n4. 前往 Release 页面发布一个 Release，`tag`形如`v1.2.3`，以触发稳定版编译流程\n5. 点击 Actions 按钮，等待编译完成，回到 Release 页面下载编译好的文件\n6. 运行 OneBot 框架，并同时运行本插件\n7. 啾咪~\n\n#### 本地编译/交叉编译\n\n1. 下载安装最新 [Go](https://studygolang.com/dl) 环境\n2. clone 并进入本项目，下载所需包\n\n```bash\ngit clone --depth=1 https://github.com/FloatTech/ZeroBot-Plugin.git\ncd ZeroBot-Plugin\ngo version\ngo env -w GOPROXY=https://goproxy.cn,direct\ngo env -w GO111MODULE=auto\ngo mod tidy\n```\n\n3. 编辑 main.go 文件，内容按需修改\n4. 按照平台输入命令编译，下面举了一些例子\n\n```bash\n# 本机平台\ngo build -ldflags \"-s -w\" -o zerobot -trimpath\n# x64 Linux 平台 如各种云服务器\nGOOS=linux GOARCH=amd64 go build -ldflags \"-s -w\" -o zerobot -trimpath\n# x64 Windows 平台 如大多数家用电脑\nGOOS=windows GOARCH=amd64 go build -ldflags \"-s -w\" -o zerobot.exe -trimpath\n# armv6 Linux 平台 如树莓派 zero W\nGOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags \"-s -w\" -o zerobot -trimpath\n# （由于引入了github.com/logoove/sqlite，本项不再可用）mips Linux 平台 如 路由器 wndr4300\nGOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags \"-s -w\" -o zerobot -trimpath\n```\n\n5. 运行 OneBot 框架，并同时运行本插件\n\n## 特别感谢\n\n- [ZeroBot](https://github.com/wdvxdr1123/ZeroBot)\n- [ATRI](https://github.com/Kyomotoi/ATRI)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloattech%2Fzerobot-plugin-dynamic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloattech%2Fzerobot-plugin-dynamic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloattech%2Fzerobot-plugin-dynamic/lists"}