Home

Awesome

<div align="center"> <img src=".github/hua_nobg_512.gif" alt="椛" width = "256"> <img src="https://github.com/FloatTech/ZeroBot-Plugin/assets/41315874/93fb795d-e519-45a6-a654-076fd6ac54ae" alt="zbp-uwu" width = "400"> <br> <h1>ZeroBot-Plugin</h1>

“椛椛是真寻的好朋友!”

ZeroBot-Plugin 是 ZeroBot 的 实用插件合集<br><br>

<img src="https://counter.seku.su/cmoe?name=ZeroBot-Plugin&theme=r34" /><br>

miraigo oicq mirai

go onebot zerobot

license tencent-qq tencent-guild telegram

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

项目地址平台核心作者备注
LLOneBotNTQQlinyuchen目前推荐使用
go-cqhttpMiraiGoMrs4s因签名原因不再维护
onebot-kotlinMiraiyyuueexxiinngg不再积极维护
oicq/http-apiOICQtakayama已归档不再维护

Star Trend

</div>

专为后 go-cqhttp 时代开发迁移的类zbp新机器人现已出炉,基于官方api,稳定不风控: NanoBot-Plugin

如果您对开发插件感兴趣,欢迎加入ZeroBot-Plugin-Playground

webui持续开发中, 欢迎加入ZeroBot-Plugin-Webui

命令行参数

[]代表是可选参数

zerobot [-h] [-m] [-n nickname] [-t token] [-u url] [-g url] [-p prefix] [-d|w] [-c|s config.json] [-l latency] [-r ringlen] [-x max process time] [-mirror] [qq1 qq2 qq3 ...] [&]

默认配置文件格式如下。当选择从配置文件加载时,将忽略相应命令行参数。

{
  "zero": {
    "nickname": ["椛椛", "ATRI", "atri", "亚托莉", "アトリ"],
    "command_prefix": "/",
    "super_users": [],
    "ring_len": 4096,
    "latency": 233000000,
    "max_process_time": 240000000000,
    "mark_message": true
  },
  "ws": [{ "Url": "ws://127.0.0.1:6700", "AccessToken": "" }],
  "wss": null
}

功能

在编译时,以下功能除插件控制外,均可通过注释main.go中的相应import而物理禁用,减小插件体积。

通过插件控制,还可动态管理某个功能在某个群的打开/关闭。

插件的优先级为import的先后顺序。

webui默认禁用不编译,打开后会增加程序体积。

<details> <summary>插件控制</summary> </details> <details> <summary>动态加载插件</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin-Dynamic/dyloader"

</details>

高优先级

<details> <summary>聊天</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/chat"

</details> <details> <summary>聊天时长统计</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/chatcount"

</details> <details> <summary>睡眠管理</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/sleep_manage"

</details> <details> <summary>ATRI</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/atri"

</details> <details> <summary>群管</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/manager"

</details> <details> <summary>定时指令触发器</summary>

import _ "github.com/FloatTech/zbputils/job"

每日9:30推送摸鱼人日历

记录在"30 9 * * *"触发的指令
run[CQ:image,file=https://api.vvhan.com/api/moyu]

每日12:00以1/2概率执行coser指令

记录在"0 12 * * *"触发的指令
注入指令结果:>runcoderaw py
from random import random
if random() > 0.5: print('coser')
else: print('今天没有coser哦~')

每日15:00询问设置定时者否想看coser

记录在"0 15 * * *"触发的指令
注入指令结果:>runcoderaw py
if '?::想看coser吗?::1!' == '想': print('coser')
else: print('好吧')

自行编写简易的选择困难症助手小插件

记录以"简易的选择困难症助手"触发的指令
执行指令:>runcoderaw py
from random import random
if random() > 0.5: print('您最终会选?::请输入您的选择1::1!')
else: print('您最终会选?::请输入您的选择2::2!')
简易的选择困难症助手

自行编写随机b站404页趣图插件

记录以"随机b站404页趣图"触发的代表我执行的指令
注入指令结果:>runcoderaw py
import json
j = json.loads(r'''!::https://api.iyk0.com/bili_chart::1!''')
print("run[CQ:image,file="+j["img"]+"]")
随机b站404页趣图

随机b站404页趣图

</details>

中优先级

<details> <summary>ahsai tts</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ahsai"

</details> <details> <summary>AIfalse</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ai_false"

</details> <details> <summary>AIWife</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/aiwife"

</details> <details> <summary>支付宝到账语音</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/alipayvoice"

</details> <details> <summary>触发者撤回时也自动撤回</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/autowithdraw"

</details> <details> <summary>base16384加解密</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/b14"

</details> <details> <summary>百度内容审核</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/baiduaudit"

</details> <details> <summary>base64卦加解密</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/base64gua"

</details> <details> <summary>base天城文加解密</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/baseamasiro"

</details> <details> <summary>bilibili</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/bilibili"

</details> <details> <summary>b站动态、专栏、视频、直播解析</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/bilibili"

</details> <details> <summary>b站动态、直播推送,需要配合job一起使用</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/bilibili"

</details> <details> <summary>书评</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/book_review"

</details> <details> <summary>选择困难症帮手</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/choose"

</details> <details> <summary>抽象话</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/chouxianghua"

</details> <details> <summary>英文字符翻转</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/chrev"

</details> <details> <summary>coser</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/coser"

</details> <details> <summary>cp短打</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/cpstory"

</details> <details> <summary>今日早报</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/dailynews"

</details> <details> <summary>DeepDanbooru二次元图标签识别</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/danbooru"

</details> <details> <summary>嘉然</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/diana"

</details> <details> <summary>程序员做饭指南</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/dish"

</details> <details> <summary>多功能抽签</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/drawlots"

支持图包文件夹和gif抽签

</details> <details> <summary>漂流瓶</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/drift_bottle"

</details> <details> <summary>合成emoji</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/emojimix"

</details> <details> <summary>颜文字抽象转写</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/emozi"

</details> <details> <summary>好友申请及群聊邀请事件处理</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/event"

</details> <details> <summary>渲染任意文字到图片</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/font"

</details> <details> <summary>每日运势</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/fortune"

</details> <details> <summary>笑话</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/funny"

</details> <details> <summary>原神抽卡</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/genshin"

</details> <details> <summary>gif</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/gif"

</details> <details> <summary>GitHub仓库搜索</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/github"

</details> <details> <summary>猜歌</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/guessmusic"

猜歌插件(该插件依赖ffmpeg)

---------主 人 指 令---------

-------管 理 员 指 令--------

------公 用 指 令------

------插 件 扩 展------

</details> <details> <summary>一言</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/hitokoto"

</details> <details> <summary>炉石</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/hs"

</details> <details> <summary>百人一首</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/hyaku"

</details> <details> <summary>注入指令</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/inject"

</details> <details> <summary>煎蛋网无聊图</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/jandan"

</details> <details> <summary>日语听力学习材料</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/jptingroom"

</details> <details> <summary>疯狂星期四</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/kfccrazythursday"

</details> <details> <summary>kokomi原神面板</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/kokomi"

</details> <details> <summary>lolicon</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/lolicon"

记录在"@every 1h"触发的指令
来份萝莉
</details> <details> <summary>桑帛云 API</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/lolimi"

</details> <details> <summary>MagicPrompt-Stable-Diffusion吟唱提示</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/magicprompt"

</details> <details> <summary>钓鱼模拟器</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/mcfish"

</details> <details> <summary>简易midi音乐制作</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/midicreate"

</details> <details> <summary>摸鱼</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/moyu"

记录在"0 10 * * *"触发的指令
摸鱼提醒
</details> <details> <summary>摸鱼人日历</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/moyu_calendar"

记录在"30 8 * * *"触发的指令
摸鱼人日历
</details> <details> <summary>点歌</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/music"

</details> <details> <summary>本地涩图</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/nativesetu"

</details> <details> <summary>拼音首字母释义工具</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/nbnhhsh"

</details> <details> <summary>日语语法学习</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/nihongo"

</details> <details> <summary>牛牛大作战</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/niuniu"

</details> <details> <summary>小说</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/novel"

</details> <details> <summary>nsfw图片识别</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/nsfw"

</details> <details> <summary>抽wife</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/nwife"

</details> <details> <summary>浅草寺求签</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/omikuji"

</details> <details> <summary>抽扑克</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/poker"

</details> <details> <summary>一群一天一夫一妻制群老婆</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/qqwife"

</details> <details> <summary>qq空间表白墙</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/qzone"

</details> <details> <summary>Real-CUGAN清晰术</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/realcugan"

</details> <details> <summary>投胎</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/reborn"

</details> <details> <summary>打劫</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/robbery"

</details> <details> <summary>在线代码运行</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/runcode"

</details> <details> <summary>搜图</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/saucenao"

</details> <details> <summary>签到得分</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/score"

</details> <details> <summary>沙雕app</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/shadiao"

</details> <details> <summary>shindan</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/shindan"

</details> <details> <summary>steam</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/steam"

</details> <details> <summary>抽塔罗牌</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/tarot"

</details> <details> <summary>舔狗日记</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/tiangou"

</details> <details> <summary>搜番</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/tracemoe"

</details> <details> <summary>翻译</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/translation"

</details> <details> <summary>vtb语录</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/vtb_quotation"

</details> <details> <summary>钱包</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wallet"

</details> <details> <summary>据意查句</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wantquotes"

</details> <details> <summary>星际战甲</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/warframeapi"

</details> <details> <summary>百度文心AI</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wenxinAI"

基于百度文心API的一些功能

key申请链接:https://wenxin.baidu.com/moduleApi/key

例:“为10086设置画图key 123 456”;“为群10010设置画图key 789 101”

文心key和画图key的API key 可以是相同的,只是文心key日限为200,画图日限为50,以此作区别。

指令示例:

</details> <details> <summary>抽老婆</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wife"

</details> <details> <summary>聊天热词</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/word_count"

</details> <details> <summary>猜单词</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wordle"

</details> <details> <summary>鬼东西</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wtf"

</details> <details> <summary>一些游戏王插件</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ygo"

白鸽API卡查
"github.com/FloatTech/ZeroBot-Plugin/plugin/ygo/ygocdb.go"
集换社卡价查询
"github.com/FloatTech/ZeroBot-Plugin/plugin/ygo/ygotrade.go"
</details> <details> <summary>月幕galgame图</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ymgal"

</details> <details> <summary>遇见API</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/yujn"

</details>

低优先级

<details> <summary>骂人</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/curse"

</details> <details> <summary>词典匹配回复</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/thesaurus"

</details> <details> <summary>打断复读</summary>

import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/breakrepeat"

</details>

三种使用方法,推荐第一种

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

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

2. 本地直接运行

  1. 下载安装最新 Go 环境
  2. 下载本项目压缩包,本地解压
  3. 编辑 main.go 文件,内容按需修改
  4. 运行 OneBot 框架
  5. Windows下双击 run.bat 文件,Linux下使用 run.sh 运行本插件

3. 编译运行

a. 利用 Actions 在线编译

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

b. 本地编译/交叉编译

  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 -trimpath
# x64 Linux 平台 如各种云服务器
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o zerobot -trimpath
# x64 Windows 平台 如大多数家用电脑
GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o zerobot.exe -trimpath
# armv6 Linux 平台 如树莓派 zero W
GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot -trimpath
# (由于引入了github.com/fumiama/sqlite3,本项不再可用)mips Linux 平台 如 路由器 wndr4300
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot -trimpath
  1. 运行 OneBot 框架,并同时运行本插件

特别感谢

同时感谢以下开发者对 ZeroBot-Plugin 作出的贡献:

<a href="https://github.com/FloatTech/ZeroBot-Plugin/graphs/contributors"> <img src="https://contrib.rocks/image?repo=FloatTech/ZeroBot-Plugin&max=1000" /> </a>