From 89a5b686015079314e6402aaf3e6cc4d9498d49d Mon Sep 17 00:00:00 2001 From: starim00 <30364176+starim00@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:08:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(gif,=20qqwife):=20at=20=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#960)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: hutiance Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com> --- plugin/gif/run.go | 2 +- plugin/qqwife/function.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/gif/run.go b/plugin/gif/run.go index 04524c2cd1..ad87880cac 100644 --- a/plugin/gif/run.go +++ b/plugin/gif/run.go @@ -150,7 +150,7 @@ func init() { // 插件主体 PrivateDataFolder: "gif", }).ApplySingle(ctxext.DefaultSingle) datapath = file.BOTPATH + "/" + en.DataFolder() - en.OnRegex(`^(` + strings.Join(cmd, "|") + `)[\s\S]*?(\[CQ:(image\,file=([0-9a-zA-Z]{32}).*|at.+?(\d{5,11}))\].*|(\d+))$`). + en.OnRegex(`^(` + strings.Join(cmd, "|") + `)[\s\S]*?(\[CQ:(image\,file=([0-9a-zA-Z]{32}).*|at.+?qq=(\d{5,11})).*\].*|(\d+))$`). SetBlock(true).Handle(func(ctx *zero.Ctx) { list := ctx.State["regex_matched"].([]string) atUserID, _ := strconv.ParseInt(list[4]+list[5]+list[6], 10, 64) diff --git a/plugin/qqwife/function.go b/plugin/qqwife/function.go index 0bbb65f8ee..3a8d2e8e50 100644 --- a/plugin/qqwife/function.go +++ b/plugin/qqwife/function.go @@ -93,7 +93,7 @@ func init() { ctx.SendChain(message.Text("设置成功")) }) // 单身技能 - engine.OnRegex(`^(娶|嫁)\[CQ:at,qq=(\d+)\]`, zero.OnlyGroup, getdb, checkSingleDog).SetBlock(true).Limit(ctxext.LimitByUser). + engine.OnRegex(`^(娶|嫁)\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]`, zero.OnlyGroup, getdb, checkSingleDog).SetBlock(true).Limit(ctxext.LimitByUser). Handle(func(ctx *zero.Ctx) { gid := ctx.Event.GroupID uid := ctx.Event.UserID