From b9ddcfc3d728ea43536e8ff78d4c6864fa817b10 Mon Sep 17 00:00:00 2001 From: fumiama Date: Mon, 6 Dec 2021 21:17:41 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=20=E5=B0=8F=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_nativewife/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_nativewife/main.go b/plugin_nativewife/main.go index 3a79ffa5af..bc2714feaa 100644 --- a/plugin_nativewife/main.go +++ b/plugin_nativewife/main.go @@ -33,7 +33,7 @@ func init() { DisableOnDefault: false, Help: "nativewife\n- 抽wife[@xxx]\n- 添加wife[名字][图片]\n- 删除wife[名字]\n- [让|不让]所有人均可添加wife", }) - engine.OnFullMatch("抽wife", zero.OnlyGroup).SetBlock(true).SetPriority(20). + engine.OnPrefix("抽wife", zero.OnlyGroup).SetBlock(true).SetPriority(20). Handle(func(ctx *zero.Ctx) { grpf := strconv.FormatInt(ctx.Event.GroupID, 36) wifes, err := os.ReadDir(base + "/" + grpf) @@ -65,7 +65,7 @@ func init() { } }) // 上传一张图 - engine.OnKeyword("添加wife", zero.OnlyGroup, chkAddWifePermission, picture.MustGiven).SetBlock(true).SetPriority(20). + engine.OnPrefix("添加wife", zero.OnlyGroup, chkAddWifePermission, picture.MustGiven).SetBlock(true).SetPriority(20). Handle(func(ctx *zero.Ctx) { name := "" for _, elem := range ctx.Event.Message {