Skip to content

Commit

Permalink
✨ 插件名称自动注册
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Sep 3, 2023
1 parent 5485cc3 commit 6bff62b
Show file tree
Hide file tree
Showing 108 changed files with 124 additions and 126 deletions.
2 changes: 1 addition & 1 deletion data
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/FloatTech/sqlite v1.6.2
github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b
github.com/FloatTech/zbpctrl v1.5.3-0.20230514154630-b74e6fcca380
github.com/FloatTech/zbputils v1.6.2-0.20230831134542-28c5ba506758
github.com/FloatTech/zbputils v1.6.2-0.20230903052647-820a67856603
github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e
github.com/RomiChan/websocket v1.4.3-0.20220227141055-9b2c6168c9c5
github.com/antchfx/htmlquery v1.2.5
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b h1:tvciXWq2nuvTbFeJG
github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b/go.mod h1:fHZFWGquNXuHttu9dUYoKuNbm3dzLETnIOnm1muSfDs=
github.com/FloatTech/zbpctrl v1.5.3-0.20230514154630-b74e6fcca380 h1:qmwoT8xVaND01aCdwy+5/j6z490nehQWZAVyTBN8ahU=
github.com/FloatTech/zbpctrl v1.5.3-0.20230514154630-b74e6fcca380/go.mod h1:gkGC1C1eEUd/Ld/ja68zas5j2ZktIZCdnj2FMaM+Au0=
github.com/FloatTech/zbputils v1.6.2-0.20230728081122-94d4d957f3bf h1:PwH9aMnmN+m204cVIqUrI3e7nsdQi/IGW012Fjzb1bs=
github.com/FloatTech/zbputils v1.6.2-0.20230728081122-94d4d957f3bf/go.mod h1:JRnGR7EGeEQgxOs+c0rZAhrS9Es2BTcGHdIDHXIPRzQ=
github.com/FloatTech/zbputils v1.6.2-0.20230831134542-28c5ba506758 h1:z0hhIwGN8ifKExa6xkujZwAQwJNU6AnELt+/A6nAdcY=
github.com/FloatTech/zbputils v1.6.2-0.20230831134542-28c5ba506758/go.mod h1:JRnGR7EGeEQgxOs+c0rZAhrS9Es2BTcGHdIDHXIPRzQ=
github.com/FloatTech/zbputils v1.6.2-0.20230903052647-820a67856603 h1:06zrK+XJCOLhW+HADibOmeqcVEC6vwFGRQiDRyvioWQ=
github.com/FloatTech/zbputils v1.6.2-0.20230903052647-820a67856603/go.mod h1:JRnGR7EGeEQgxOs+c0rZAhrS9Es2BTcGHdIDHXIPRzQ=
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e h1:wR3MXQ3VbUlPKOOUwLOYgh/QaJThBTYtsl673O3lqSA=
github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e/go.mod h1:vD7Ra3Q9onRtojoY5sMCLQ7JBgjUsrXDnDKyFxqpf9w=
Expand Down
22 changes: 11 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

_ "github.com/FloatTech/ZeroBot-Plugin/plugin/chat" // 基础词库

_ "github.com/FloatTech/ZeroBot-Plugin/plugin/sleep_manage" // 统计睡眠时间
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/sleepmanage" // 统计睡眠时间

_ "github.com/FloatTech/ZeroBot-Plugin/plugin/atri" // ATRI词库

Expand All @@ -61,18 +61,18 @@ import (
// vvvv //

_ "github.com/FloatTech/ZeroBot-Plugin/plugin/ahsai" // ahsai tts
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/ai_false" // 服务器监控
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/aifalse" // 服务器监控
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/aipaint" // ai绘图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/aiwife" // 随机老婆
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/alipayvoice" // 支付宝到账语音
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/autowithdraw" // 触发者撤回时也自动撤回
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/b14" // base16384加解密
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/baidu" // 百度一下
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/baiduaudit" // 百度内容审核
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/base16384" // base16384加解密
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/base64gua" // base64卦加解密
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/baseamasiro" // base天城文加解密
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/bilibili" // b站相关
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/book_review" // 哀伤雪刃吧推书记录
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/bookreview" // 哀伤雪刃吧推书记录
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/cangtoushi" // 藏头诗
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/chess" // 国际象棋
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/choose" // 选择困难症帮手
Expand All @@ -86,7 +86,7 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/dish" // 程序员做饭指南
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/drawlots" // 多功能抽签
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/dress" // 女装
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/drift_bottle" // 漂流瓶
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/driftbottle" // 漂流瓶
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/emojimix" // 合成emoji
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/event" // 好友申请群聊邀请事件处理
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/font" // 渲染任意文字到图片
Expand All @@ -100,7 +100,7 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/hitokoto" // 一言
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/hs" // 炉石
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/hyaku" // 百人一首
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/image_finder" // 关键字搜图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/imgfinder" // 关键字搜图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/inject" // 注入指令
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/jandan" // 煎蛋网无聊图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/jiami" // 兽语加密
Expand All @@ -112,14 +112,14 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/midicreate" // 简易midi音乐制作
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/moegoe" // 日韩 VITS 模型拟声
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/moyu" // 摸鱼
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/moyu_calendar" // 摸鱼人日历
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/moyucalendar" // 摸鱼人日历
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/music" // 点歌
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nativesetu" // 本地涩图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nativewife" // 本地老婆
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nbnhhsh" // 拼音首字母缩写释义工具
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nihongo" // 日语语法学习
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/novel" // 铅笔小说网搜索
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nsfw" // nsfw图片识别
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nwife" // 本地老婆
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/omikuji" // 浅草寺求签
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/qqwife" // 一群一天一夫一妻制群老婆
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/quan" // QQ权重查询
Expand All @@ -139,16 +139,16 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/tracemoe" // 搜番
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/translation" // 翻译
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/vitsnyaru" // vits猫雷
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/vtb_quotation" // vtb语录
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/vtbmusic" // vtb点歌
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/vtbquotation" // vtb语录
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wallet" // 钱包
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wangyiyun" // 网易云音乐热评
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wantquotes" // 据意查句
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/warframeapi" // warframeAPI插件
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wenben" // 文本指令大全
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wenxinAI" // 百度文心AI画图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wenxinvilg" // 百度文心AI画图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wife" // 抽老婆
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/word_count" // 聊天热词
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wordcount" // 聊天热词
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wordle" // 猜单词
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/ygo" // 游戏王相关插件
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/ymgal" // 月幕galgame
Expand Down
2 changes: 1 addition & 1 deletion plugin/ahsai/ahsai.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (
)

func init() {
engine := control.Register("ahsai", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "フリーテキスト音声合成",
Help: "- 使[伊織弓鶴|紲星あかり|結月ゆかり|京町セイカ|東北きりたん|東北イタコ|ついなちゃん標準語|ついなちゃん関西弁|音街ウナ|琴葉茜|吉田くん|民安ともえ|桜乃そら|月読アイ|琴葉葵|東北ずん子|月読ショウタ|水奈瀬コウ]说(日语)",
Expand Down
2 changes: 1 addition & 1 deletion plugin/ai_false/ai_false.go → plugin/aifalse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var (
)

func init() { // 插件主体
engine := control.Register("aifalse", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "自检, 全局限速",
Help: "- 查询计算机当前活跃度: [检查身体 | 自检 | 启动自检 | 系统状态]\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/aipaint/aipaint.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (r *result) String() string {
}

func init() { // 插件主体
engine := control.Register("aipaint", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "ai绘图",
Help: "- [ ai绘图 | 生成色图 | 生成涩图 | ai画图 ] xxx\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/aiwife/non-existent.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
)

func init() { // 插件主体
control.Register("aiwife", &ctrl.Options[*zero.Ctx]{
control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "ai随机生成老婆",
Help: "- waifu | 随机waifu",
Expand Down
2 changes: 1 addition & 1 deletion plugin/alipayvoice/alipayvoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
)

func init() { // 插件主体
engine := control.Register("alipayvoice", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "支付宝到账语音",
Help: "- 支付宝到账 1",
Expand Down
2 changes: 1 addition & 1 deletion plugin/antiabuse/anti.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func onDel(uid int64, _ struct{}) {
}

func init() {
engine := control.Register("antiabuse", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "违禁词检测",
Help: "- /[添加|删除|查看]违禁词",
Expand Down
2 changes: 1 addition & 1 deletion plugin/atri/atri.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func isAtriSleeping(*zero.Ctx) bool {
}

func init() { // 插件主体
engine := control.Register("atri", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "atri人格文本回复",
Help: "本插件基于 ATRI ,为 Golang 移植版\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/autowithdraw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func init() {
control.Register("autowithdraw", &ctrl.Options[*zero.Ctx]{
control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "触发者撤回时也自动撤回",
Help: "- 撤回一条消息\n",
Expand Down
2 changes: 1 addition & 1 deletion plugin/baidu/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type result struct {
}

func init() { // 主函数
en := control.Register("baidu", &ctrl.Options[*zero.Ctx]{
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Help: "百科\n" +
"- 百度/百科/维基/wiki[关键字]",
Expand Down
2 changes: 1 addition & 1 deletion plugin/baiduaudit/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
)

func init() {
engine := control.Register("baiduaudit", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "百度内容审核",
Help: "##该功能来自百度内容审核, 需购买相关服务, 并创建app##\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/b14/main.go → plugin/base16384/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func init() {
en := control.Register("base16384", &ctrl.Options[*zero.Ctx]{
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "base16384加解密",
Help: "- 加密xxx\n- 解密xxx\n- 用yyy加密xxx\n- 用yyy解密xxx",
Expand Down
2 changes: 1 addition & 1 deletion plugin/base64gua/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func init() {
en := control.Register("base64gua", &ctrl.Options[*zero.Ctx]{
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "六十四卦加解密",
Help: "- 六十四卦加密xxx\n- 六十四卦解密xxx\n- 六十四卦用yyy加密xxx\n- 六十四卦用yyy解密xxx",
Expand Down
2 changes: 1 addition & 1 deletion plugin/baseamasiro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func init() {
en := control.Register("baseamasiro", &ctrl.Options[*zero.Ctx]{
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "天城文加解密",
Help: "- 天城文加密xxx\n- 天城文解密xxx\n- 天城文用yyy加密xxx\n- 天城文用yyy解密xxx",
Expand Down
2 changes: 1 addition & 1 deletion plugin/bilibili/bilibili.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var (

// 查成分的
func init() {
engine := control.Register("bilibili", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "b站查成分查弹幕",
Help: "- >vup info [xxx]\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

func init() {
engine := control.Register("bookreview", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "哀伤雪刃推书书评",
Help: "- 书评[xxx]\n- 随机书评",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion plugin/breakrepeat/breakrepeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const throttle = 3 // 不可超过 9
var sm syncx.Map[int64, string]

func init() {
engine := control.Register("breakrepeat", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "打断复读",
Help: "- 打断" + strconv.Itoa(throttle) + "次以上复读\n",
Expand Down
2 changes: 1 addition & 1 deletion plugin/cangtoushi/cangtoushi.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
)

func init() {
engine := control.Register("cangtoushi", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "藏头诗, 藏尾诗",
Help: "- 藏头诗[xxx]\n- 藏尾诗[xxx]",
Expand Down
2 changes: 1 addition & 1 deletion plugin/chat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

var (
poke = rate.NewManager[int64](time.Minute*5, 8) // 戳一戳
engine = control.Register("chat", &ctrl.Options[*zero.Ctx]{
engine = control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "基础反应, 群空调",
Help: "chat\n- [BOT名字]\n- [戳一戳BOT]\n- 空调开\n- 空调关\n- 群温度\n- 设置温度[正整数]",
Expand Down
2 changes: 1 addition & 1 deletion plugin/chess/chess.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const helpString = `- 参与/创建一盘游戏:「下棋」(chess)
var (
limit = ctxext.NewLimiterManager(time.Microsecond*2500, 1)
tempFileDir string
engine = control.Register("chess", &ctrl.Options[*zero.Ctx]{
engine = control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "国际象棋",
Help: helpString,
Expand Down
2 changes: 1 addition & 1 deletion plugin/choose/choose.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func init() {
engine := control.Register("choose", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "选择困难症帮手",
Help: "例: 选择可口可乐还是百事可乐\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/chouxianghua/chouxianghua.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func init() {
en := control.Register("chouxianghua", &ctrl.Options[*zero.Ctx]{
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "翻译为抽象话",
Help: "- 抽象翻译xxx",
Expand Down
2 changes: 1 addition & 1 deletion plugin/chrev/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func init() {
// 初始化engine
engine := control.Register("chrev", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "英文字符翻转",
Help: "例: 翻转 I love you",
Expand Down
2 changes: 1 addition & 1 deletion plugin/coser/coser.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func init() {
if err != nil {
panic(err)
}
control.Register("coser", &ctrl.Options[*zero.Ctx]{
control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "三次元coser",
Help: "- coser",
Expand Down
2 changes: 1 addition & 1 deletion plugin/cpstory/cpstory.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

func init() {
engine := control.Register("cpstory", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "cp短打", // 这里也许有更好的名字
Help: "- 组cp[@xxx][@xxx]\n- 磕cp大老师 雪乃",
Expand Down
2 changes: 1 addition & 1 deletion plugin/curse/curse.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
)

func init() {
engine := control.Register("curse", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: true,
Brief: "骂人反击",
Help: "- 骂我\n- 大力骂我",
Expand Down
2 changes: 1 addition & 1 deletion plugin/dailynews/dailynews.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
const api = "http://dwz.2xb.cn/zaob"

func init() {
engine := control.Register("dailynews", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "今日早报",
Help: "- 今日早报",
Expand Down
2 changes: 1 addition & 1 deletion plugin/danbooru/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

func init() { // 插件主体
engine := control.Register("danbooru", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "二次元图片标签识别",
Help: "- 鉴赏图片[图片]",
Expand Down
2 changes: 1 addition & 1 deletion plugin/diana/bing.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/FloatTech/ZeroBot-Plugin/plugin/diana/data"
)

var engine = control.Register("diana", &ctrl.Options[*zero.Ctx]{
var engine = control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "嘉然相关", // 也许使用常用功能当Brief更好
Help: "- 小作文\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/dish/dish.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
)

func init() {
en := control.Register("dish", &ctrl.Options[*zero.Ctx]{
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "程序员做饭指南",
Help: "-怎么做[xxx]|烹饪[xxx]|随机菜谱|随便做点菜",
Expand Down
2 changes: 1 addition & 1 deletion plugin/drawlots/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var (
}
return lotsList
}()
en = control.Register("drawlots", &ctrl.Options[*zero.Ctx]{
en = control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "多功能抽签",
Help: "支持图包文件夹和gif抽签\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/dress/dress.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

func init() { // 插件主体
engine := control.Register("dress", &ctrl.Options[*zero.Ctx]{
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "女装",
Help: "女装\n" +
Expand Down
2 changes: 1 addition & 1 deletion plugin/drift_bottle/main.go → plugin/driftbottle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var seaLocker sync.RWMutex
// We need a container to inject what we need :(

func init() {
en := control.Register("driftbottle", &ctrl.Options[*zero.Ctx]{
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "漂流瓶",
Help: "- @bot pick" + "- @bot throw xxx (xxx为投递内容)",
Expand Down
Loading

0 comments on commit 6bff62b

Please sign in to comment.