From c1e87ace78b17fd673407b04839b616fd00a9bcd Mon Sep 17 00:00:00 2001 From: fumiama Date: Sun, 31 Oct 2021 19:28:31 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20atri=20=E6=8F=92=E4=BB=B6=20?= =?UTF-8?q?=E5=BC=95=E5=85=A5=20control?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_atri/atri.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_atri/atri.go b/plugin_atri/atri.go index f3fd587f..b52415fb 100644 --- a/plugin_atri/atri.go +++ b/plugin_atri/atri.go @@ -30,7 +30,7 @@ func init() { // 插件主体 zero.OnFullMatch("ATRI醒醒", zero.AdminPermission).SetBlock(true).SetPriority(prio). Handle(func(ctx *zero.Ctx) { c, ok := control.Lookup(servicename) - if ok { + if ok && !c.IsEnabledIn(ctx.Event.GroupID) { c.Enable(ctx.Event.GroupID) process.SleepAbout1sTo2s() ctx.SendChain(message.Text("嗯呜呜……夏生先生……?")) @@ -39,7 +39,7 @@ func init() { // 插件主体 engine.OnFullMatch("ATRI睡吧", zero.AdminPermission).SetBlock(true).SetPriority(prio). Handle(func(ctx *zero.Ctx) { c, ok := control.Lookup(servicename) - if ok { + if ok && c.IsEnabledIn(ctx.Event.GroupID) { c.Disable(ctx.Event.GroupID) process.SleepAbout1sTo2s() ctx.SendChain(message.Text("Zzz……Zzz……"))