From 65a5b53b882fe3f94b77a0ff563abd3352dd686a Mon Sep 17 00:00:00 2001 From: fumiama Date: Fri, 10 Sep 2021 14:52:36 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=20=E7=BC=A9=E5=B0=8F?= =?UTF-8?q?=E9=9D=92=E4=BA=91=E5=AE=A2=E5=8C=B9=E9=85=8D=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_qingyunke/qingyunke.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_qingyunke/qingyunke.go b/plugin_qingyunke/qingyunke.go index e42940201e..5bb97391a2 100644 --- a/plugin_qingyunke/qingyunke.go +++ b/plugin_qingyunke/qingyunke.go @@ -33,8 +33,8 @@ func init() { // 插件主体 Help: "青云客\n" + "- @Bot 任意文本(任意一句话回复)", }) - // 回复 - engine.OnRegex("(^.{1,30}$)", zero.OnlyToMe).SetBlock(true).SetPriority(prio). + // 回复 匹配中文、英文、数字但不包括下划线等符号 + engine.OnRegex("(^[\u4E00-\u9FA5A-Za-z0-9]{1,30}$)", zero.OnlyToMe).SetBlock(true).SetPriority(prio). Handle(func(ctx *zero.Ctx) { if !bucket.Load(ctx.Event.UserID).Acquire() { // 频繁触发,不回复