From e132972569e500353c8f8f5d18085979bd89598c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E6=9F=B3=E7=85=9C?= <101934327+fangliuyu@users.noreply.github.com> Date: Fri, 26 Sep 2025 23:01:45 +0800 Subject: [PATCH] reset personal change --- plugin/wife/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/wife/main.go b/plugin/wife/main.go index 7601a89b..dd60d863 100644 --- a/plugin/wife/main.go +++ b/plugin/wife/main.go @@ -18,16 +18,16 @@ import ( var ( cards = []string{} - re = regexp.MustCompile(`^\[(.*?)\](.*) - P\d+\..*$`) + re = regexp.MustCompile(`^\[(.*?)\](.*)\..*$`) engine = control.AutoRegister(&ctrl.Options[*zero.Ctx]{ DisableOnDefault: false, Help: "- 抽老婆", Brief: "从老婆库抽每日老婆", PublicDataFolder: "Wife", }).ApplySingle(ctxext.DefaultSingle) - getJson = fcext.DoOnceOnSuccess( + getJSON = fcext.DoOnceOnSuccess( func(ctx *zero.Ctx) bool { - data, err := engine.GetLazyData("wife.json", false) + data, err := engine.GetLazyData("wife.json", true) if err != nil { ctx.SendChain(message.Text("ERROR: ", err)) return false @@ -53,7 +53,7 @@ func card2name(card string) (string, string) { func init() { _ = os.MkdirAll(engine.DataFolder()+"wives", 0755) - engine.OnFullMatch("抽老婆", getJson).SetBlock(true). + engine.OnFullMatch("抽老婆", getJSON).SetBlock(true). Handle(func(ctx *zero.Ctx) { card := cards[fcext.RandSenderPerDayN(ctx.Event.UserID, len(cards))] data, err := engine.GetLazyData("wives/"+card, true)