From 4b771f2809e0cf0e41477a223362836a1febc427 Mon Sep 17 00:00:00 2001 From: copurxia <53603471+copurxia@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:38:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(qqwife&robbery):=20at=20=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#961)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(gif, qqwife): at 解析问题 适配买礼物的at解析问题 * fix(robbery): at 解析问题 robbery同样的@解析问题 * Update robbery.go * Update favorSystem.go --- plugin/qqwife/favorSystem.go | 2 +- plugin/robbery/robbery.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/qqwife/favorSystem.go b/plugin/qqwife/favorSystem.go index 9c7acf1007..409ab63ed4 100644 --- a/plugin/qqwife/favorSystem.go +++ b/plugin/qqwife/favorSystem.go @@ -47,7 +47,7 @@ func init() { ) }) // 礼物系统 - engine.OnRegex(`^买礼物给\s?(\[CQ:at,qq=(\d+)\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). + engine.OnRegex(`^买礼物给\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). Handle(func(ctx *zero.Ctx) { gid := ctx.Event.GroupID uid := ctx.Event.UserID diff --git a/plugin/robbery/robbery.go b/plugin/robbery/robbery.go index b029be6354..0ba3035f92 100644 --- a/plugin/robbery/robbery.go +++ b/plugin/robbery/robbery.go @@ -74,7 +74,7 @@ func init() { }) // 打劫功能 - engine.OnRegex(`^打劫\s?(\[CQ:at,qq=(\d+)\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). + engine.OnRegex(`^打劫\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]|(\d+))`, getdb).SetBlock(true).Limit(ctxext.LimitByUser). Handle(func(ctx *zero.Ctx) { uid := ctx.Event.UserID fiancee := ctx.State["regex_matched"].([]string)