ZeroBot-Hook

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2022 License: GPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ZeroBot-Hook

为 ZeroBot-Plugin 生成动态库插件。

使用方法

编写插件

复制main.go到本地或使用模版,修改main.go的Inita函数为插件内容,语法与ZeroBot基本相同。

编译为动态库
使用Actions编译
  1. fork 本仓库
  2. 上传修改后的main.go及其它新增文件。
  3. 创建形如v1.2.3的tag,触发插件编译流程。
  4. 编译好后前往Release页面下载即可。
本地编译
# 本机架构
go build -ldflags "-s -w" -buildmode=plugin -o demo.so
# 交叉编译:详见 workflow 相关代码
CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=6 CC=arm-linux-gnueabihf-gcc-9 CXX=g++-9-arm-linux-gnueabihf go build -ldflags="-s -w" -buildmode=plugin -o artifacts/zbpd-linux-armv6
开始使用

放置动态库到ZeroBot-Plugin-Dynamic的plugins/目录下,给机器人发送/刷新插件即可,或重启也可加载。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址