reset personal change

This commit is contained in:
方柳煜 2025-09-26 23:01:45 +08:00 committed by GitHub
parent 1afe660e81
commit e132972569
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)