From 8ec4b5251b5dc4364bf73fd8879f58b9c72edee7 Mon Sep 17 00:00:00 2001 From: fumiama Date: Thu, 17 Jun 2021 20:05:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- randimg/setu_geter.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/randimg/setu_geter.go b/randimg/setu_geter.go index 45e783b2..1d65840c 100644 --- a/randimg/setu_geter.go +++ b/randimg/setu_geter.go @@ -24,6 +24,7 @@ var ( last_message_id int64 last_dhash string last_visit = 0 + last_group_id int64 ) func init() { // 插件主体 @@ -73,6 +74,7 @@ func init() { // 插件主体 } else { last_message_id = ctx.Send(msgext.ImageNoCache(CACHE_URI)) last_dhash = dhash + last_group_id = ctx.Event.GroupID if class > 2 { ctx.Send("我好啦!") } @@ -89,7 +91,7 @@ func init() { // 插件主体 }) zero.OnFullMatch("不许好").SetBlock(true).SetPriority(24). Handle(func(ctx *zero.Ctx) { - if last_message_id != 0 { + if last_message_id != 0 && last_group_id == ctx.Event.GroupID { ctx.DeleteMessage(last_message_id) last_message_id = 0 vote(5) @@ -97,7 +99,7 @@ func init() { // 插件主体 }) zero.OnFullMatch("太涩了").SetBlock(true).SetPriority(24). Handle(func(ctx *zero.Ctx) { - if last_message_id != 0 { + if last_message_id != 0 && last_group_id == ctx.Event.GroupID { ctx.DeleteMessage(last_message_id) last_message_id = 0 vote(6)