GithubHelp home page GithubHelp logo

fumiama / zerobot-hook Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 93 KB

为 ZeroBot-Plugin 生成动态库插件

License: GNU General Public License v3.0

Go 100.00%
zerobot go-cqhttp qqbot plugin plugins go golang golang-examples

zerobot-hook's Introduction

注意:本仓库将不再维护,后续更新请移步Plugin-Template

ZeroBot-Hook

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

使用方法

编写插件

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

编译为动态库

使用Actions编译

  1. fork 本仓库
  2. 上传修改后的main.go及其它新增文件。
  3. 创建形如v1.2.3tag,触发插件编译流程。
  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-Dynamicplugins/目录下,给机器人发送/刷新插件即可,或重启也可加载。

zerobot-hook's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.