From 0e2da1b983385adf5d662f8bebf9b9787a508089 Mon Sep 17 00:00:00 2001 From: fumiama Date: Mon, 17 Jan 2022 23:44:47 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20add=20rough=20guild=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_acgimage/classify.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin_acgimage/classify.go b/plugin_acgimage/classify.go index 8ba68e56..636bfcb9 100644 --- a/plugin_acgimage/classify.go +++ b/plugin_acgimage/classify.go @@ -15,6 +15,7 @@ import ( "github.com/FloatTech/ZeroBot-Plugin/order" control "github.com/FloatTech/zbputils/control" + "github.com/FloatTech/zbputils/ctxext" "github.com/FloatTech/zbputils/web" ) @@ -63,7 +64,7 @@ func init() { // 插件主体 ctx.SendChain(message.Text("你太快啦!")) }) // 直接随机图片,无r18保护,后果自负。如果出r18图可尽快通过发送"太涩了"撤回 - engine.OnFullMatch("直接随机", zero.OnlyPublic, zero.AdminPermission).SetBlock(true). + engine.OnFullMatch("直接随机", ctxext.UserOrGrpAdmin).SetBlock(true). Handle(func(ctx *zero.Ctx) { if block { ctx.SendChain(message.Text("请稍后再试哦")) @@ -80,7 +81,7 @@ func init() { // 插件主体 } }) // 撤回最后的直接随机图片 - engine.OnFullMatch("太涩了").SetBlock(true). + engine.OnFullMatch("太涩了", zero.OnlyGroup).SetBlock(true). Handle(func(ctx *zero.Ctx) { msg, ok := msgof[ctx.Event.GroupID] if ok { @@ -132,6 +133,7 @@ func replyClass(ctx *zero.Ctx, class int, dhash string, comment string, isupload if dhash != "" && !isupload { ctx.SendChain(message.Text(comment + "\n给你点提示哦:" + b14)) ctx.Event.GroupID = 0 + ctx.Event.DetailType = "private" ctx.SendChain(img) return }