Discover Packages
github.com/FloatTech/ZeroBot-Plugin-Dynamic
command
module
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Oct 16, 2021
License: GPL-3.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
命令行参数
zerobot -h -t token -u url [-d|w] qq1 qq2 qq3 ...
-h : 显示帮助
-t token : 设置AccessToken
,默认为空
-u url : 设置Url
,默认为ws://127.0.0.1:6700
-d|w : 开启 debug | warning 级别及以上日志输出
qqs : superusers 的 qq 号
功能
更多插件详见ZeroBot-Plugin
动态加载插件
/刷新插件
/加载插件 service名
/卸载插件 service名
仅 Linux, FreeBSD, macOS 可用,默认注释不开启。
开启后主可执行文件大约增加 2M ,每个插件的.so
文件约为 2 ~ 10 M ,如非必要建议不开启。
动态加载的插件需放置在plugins/
下,需命名为service名.so
,编译模版详见ZeroBot-Hook 。
插件控制
/启用 xxx
/禁用 xxx
/用法 xxx
/服务列表
使用方法
本项目符合 OneBot 标准,可基于以下项目与机器人框架/平台进行交互
使用稳定版/测试版 (推荐)
可以前往Release 页面下载对应系统版本可执行文件,并将插件放到plugins/
目录下。
编译运行
利用 Actions 在线编译
点击右上角 Fork 本项目,并转跳到自己 Fork 的仓库
点击仓库上方的 Actions 按钮,确认使用 Actions
编辑 main.go 文件,内容按需修改
前往 Release 页面发布一个 Release,tag
形如v1.2.3
,以触发稳定版编译流程
点击 Actions 按钮,等待编译完成,回到 Release 页面下载编译好的文件
运行 OneBot 框架,并同时运行本程序,并将插件放到plugins/
目录下。
啾咪~
本地编译/交叉编译
下载安装 Go 环境,并安装C
编译器以支持cgo
。
clone 并进入本项目,下载所需包
git clone --depth=1 https://github.com/FloatTech/ZeroBot-Plugin-Dynamic.git
cd ZeroBot-Plugin-Dynamic
go version
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GO111MODULE=auto
go mod tidy
编辑 main.go 文件,内容按需修改
按照平台输入命令编译
# 本机平台
go build -ldflags "-s -w" -o zerobot
运行 OneBot 框架,并同时运行本程序,并将插件放到plugins/
目录下。
特别感谢
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.