From df8a320fbe0ce13f9a23b5625286dbbd796feebb Mon Sep 17 00:00:00 2001 From: GenesisAN Date: Sat, 12 Nov 2022 11:16:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20baiduaudit=E7=9A=84=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=20(#495)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复一个正则错误,导致不能正确解析第二个ApiKey的问题 --- plugin/baiduaudit/audit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/baiduaudit/audit.go b/plugin/baiduaudit/audit.go index f59edada..799f4505 100644 --- a/plugin/baiduaudit/audit.go +++ b/plugin/baiduaudit/audit.go @@ -241,7 +241,7 @@ func init() { config.Groups[ctx.Event.GroupID] = group ctx.SendChain(message.At(ctx.Event.UserID), message.Text(fmt.Sprintf("本群%s已%s", k2, k1))) }) - engine.OnRegex(`^配置BDAKey\s*(.*)\s*(.*)$`, zero.SuperUserPermission).SetBlock(true). + engine.OnRegex(`^配置BDAKey\s(.*)\s(.*)$`, zero.SuperUserPermission).SetBlock(true). Handle(func(ctx *zero.Ctx) { k1 := ctx.State["regex_matched"].([]string)[1] k2 := ctx.State["regex_matched"].([]string)[2]