Code Monkey home page Code Monkey logo

zerobot-plugin's Introduction

OneBot-YaYa

ZeroBot-Plugin

ZeroBot-Plugin 是 ZeroBot 的 实用插件合集

YAYA GOCQ OICQ MIRAI

Go Report Card Badge Badge License qq group

命令行参数

zerobot -h -t token -u url [-d|w] [-g] qq1 qq2 qq3 ...
  • -h: 显示帮助
  • -t token: 设置AccessToken,默认为空
  • -u url: 设置Url,默认为ws://127.0.0.1:6700
  • -d|w: 开启 debug | warning 级别及以上日志输出
  • -g: 开启 webgui
  • qqs: superusers 的 qq 号

功能

在编译时,以下功能除插件控制外,均可通过注释main.go中的相应import而物理禁用,减小插件体积。 通过插件控制,还可动态管理某个功能在某个群的打开/关闭。

  • web管理
    • 因为开启后可执行文件大约增加 5M ,默认注释不开启。
    • 需要配合 webgui 使用
  • 动态加载插件
    • /刷新插件
    • /加载插件 service名
    • /卸载插件 service名
    • 仅 Linux, FreeBSD, macOS 可用,默认注释不开启。
    • 每个插件的.so文件约 4 ~ 20 M ,如非必要建议不开启。
    • 动态加载的插件需放置在plugins/下,需命名为service名.so,编译命令如下。模版详见ZeroBot-Hook
    go build -ldflags "-s -w" -buildmode=plugin
  • 插件控制
    • /启用 xxx
    • /禁用 xxx
    • /用法 xxx
    • /服务列表
  • 聊天 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_chat"
    • [BOT名字]
    • [戳一戳BOT]
    • 空调开
    • 空调关
    • 群温度
    • 设置温度[正整数]
  • ATRI import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_atri"
    • 具体指令看代码
    • 注:本插件基于 ATRI ,为 Golang 移植版
  • 群管 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_manager"
    • 禁言[@xxx][分钟]
    • 解除禁言[@xxx]
    • 我要自闭 [分钟]
    • 开启全员禁言
    • 解除全员禁言
    • 升为管理[@xxx]
    • 取消管理[@xxx]
    • 修改名片[@xxx][xxx]
    • 修改头衔[@xxx][xxx]
    • 申请头衔[xxx]
    • 踢出群聊[@xxx]
    • 退出群聊[群号]
    • *入群欢迎
    • *退群通知
    • 设置欢迎语[欢迎~]
    • 在[MM]月[dd]日的[hh]点[mm]分时(用[url])提醒大家[xxx]
    • 在[MM]月[每周|周几]的[hh]点[mm]分时(用[url])提醒大家[xxx]
    • 取消在[MM]月[dd]日的[hh]点[mm]分的提醒
    • 取消在[MM]月[每周|周几]的[hh]点[mm]分的提醒
    • 列出所有提醒
    • 翻牌
    • [开启|关闭]入群验证
    • 同意入群请求
    • 同意好友请求
    • 撤回[@xxx] [xxx]
    • 警告[@xxx]
    • run[xxx]
  • GitHub仓库搜索 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_github"
    • >github [xxx]
    • >github -p [xxx]
  • 在线代码运行 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_runcode"
    • > runcode [language] help
    • > runcode [language] [code block]
  • 点歌 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_music"
    • 点歌[xxx]
    • 网易点歌[xxx]
    • 酷我点歌[xxx]
    • 酷狗点歌[xxx]
  • shindan import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_shindan"
    • 今天是什么少女[@xxx]
    • 异世界转生[@xxx]
    • 卖萌[@xxx]
    • 抽老婆[@xxx]
  • AIWife import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_aiwife"
  • gif import _ "github.com/tdf1939/ZeroBot-Plugin-Gif/plugin_gif"
  • 涩图 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_setutime"
    • 来份[涩图/二次元/风景/车万]
    • 添加[涩图/二次元/风景/车万][P站图片ID]
    • 删除[涩图/二次元/风景/车万][P站图片ID]
    • > setu status
  • lolicon import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_lolicon"
    • 来份萝莉
  • 搜图 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_saucenao"
    • 以图搜图|搜索图片|以图识图[图片]
    • 搜图[P站图片ID]
  • 随机图片与AI点评 github.com/FloatTech/ZeroBot-Plugin/plugin_acgimage
    • 随机图片(评级大于6的图将私发)
    • 直接随机(无r18检测,务必小心,仅管理可用)
    • 设置随机图片网址[url]
    • 太涩了(撤回最近发的图)
    • 评价图片(发送一张图片让bot评分)
  • 每日运势 github.com/FloatTech/ZeroBot-Plugin/plugin_fortune
    • 运势|抽签
    • 设置底图[车万 DC4 爱因斯坦 星空列车 樱云之恋 富婆妹 李清歌 公主连结 原神 明日方舟 碧蓝航线 碧蓝幻想 战双 阴阳师]
  • 浅草寺求签 github.com/FloatTech/ZeroBot-Plugin/plugin_omikuji
    • 求签|占卜
  • bilibili import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_bilibili"
    • >vup info [名字|uid]
    • >user info [名字|uid]
    • /开启粉丝日报
  • 嘉然 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_diana"
    • 小作文
    • 发大病
    • 教你一篇小作文[作文]
    • [回复]查重
  • AIfalse import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_ai_false"
    • 查询计算机当前活跃度 [身体检查]
    • 清理缓存
    • 简易语音
    • 爬图合成 [@xxx]
  • minecraft import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_minecraft"
    • /mcstart xxx
    • /mcstop xxx
    • /mclist servername
    • 注:此功能实现依赖MCSManager项目对服务器的管理api,mc服务器如果没有在该管理平台部署此功能无效
  • 炉石 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_hs"
  • 青云客 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_qingyunke"
    • @Bot 任意文本(任意一句话回复)
  • 关键字搜图 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_image_finder"
    • 来张 [xxx]
  • 拼音首字母释义工具 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_nbnhhsh"
    • ?? [缩写]
  • 选择困难症帮手 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_choose"
    • 选择[选择项1]还是[选项2]还是[更多选项]
  • 投胎 import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_reborn"
    • reborn
    • 注:本插件来源于tgbot
  • TODO...

使用方法

本项目符合 OneBot 标准,可基于以下项目与机器人框架/平台进行交互

项目地址 平台 核心作者 备注
Mrs4s/go-cqhttp MiraiGo Mrs4s
yyuueexxiinngg/cqhttp-mirai Mirai yyuueexxiinngg
takayama-lily/onebot OICQ takayama

使用稳定版/测试版 (推荐)

可以前往Release页面下载对应系统版本可执行文件,编译时开启了全部插件。

本地运行

  1. 下载安装 Go 环境
  2. 下载本项目压缩包,本地解压
  3. 编辑 main.go 文件,内容按需修改
  4. 双击 build.bat 文件 或 直接双击 run.bat 文件
  5. 运行 OneBot 框架,并同时运行本插件

编译运行

利用 Actions 在线编译

  1. 点击右上角 Fork 本项目,并转跳到自己 Fork 的仓库
  2. 点击仓库上方的 Actions 按钮,确认使用 Actions
  3. 编辑 main.go 文件,内容按需修改
  4. 前往 Release 页面发布一个 Release,tag形如v1.2.3,以触发稳定版编译流程
  5. 点击 Actions 按钮,等待编译完成,回到 Release 页面下载编译好的文件
  6. 运行 OneBot 框架,并同时运行本插件
  7. 啾咪~

本地编译/交叉编译

  1. 下载安装 Go 环境
  2. clone 并进入本项目,下载所需包
git clone --depth=1 https://github.com/FloatTech/ZeroBot-Plugin.git
cd ZeroBot-Plugin
go version
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GO111MODULE=auto
go mod tidy
  1. 编辑 main.go 文件,内容按需修改
  2. 按照平台输入命令编译,下面举了两个不太常见的例子
# 本机平台
go build -ldflags "-s -w" -o zerobot
# armv6 Linux 平台 如树莓派 zero W
GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot
# mips Linux 平台 如 路由器 wndr4300
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot
  1. 运行 OneBot 框架,并同时运行本插件

特别感谢

License

FOSSA Status

zerobot-plugin's People

Contributors

fumiama avatar kanrichan avatar suika99 avatar github-actions[bot] avatar dawnnights avatar swyuuki avatar lingmuxing avatar dihechen avatar ink-33 avatar yzqd9527 avatar fossabot avatar huoxue1 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.