@@ -18,16 +18,16 @@ import (
1818
1919var (
2020 cards = []string {}
21- re = regexp .MustCompile (`^\[(.*?)\](.*) - P\d+ \..*$` )
21+ re = regexp .MustCompile (`^\[(.*?)\](.*)\..*$` )
2222 engine = control .AutoRegister (& ctrl.Options [* zero.Ctx ]{
2323 DisableOnDefault : false ,
2424 Help : "- 抽老婆" ,
2525 Brief : "从老婆库抽每日老婆" ,
2626 PublicDataFolder : "Wife" ,
2727 }).ApplySingle (ctxext .DefaultSingle )
28- getJson = fcext .DoOnceOnSuccess (
28+ getJSON = fcext .DoOnceOnSuccess (
2929 func (ctx * zero.Ctx ) bool {
30- data , err := engine .GetLazyData ("wife.json" , false )
30+ data , err := engine .GetLazyData ("wife.json" , true )
3131 if err != nil {
3232 ctx .SendChain (message .Text ("ERROR: " , err ))
3333 return false
@@ -53,7 +53,7 @@ func card2name(card string) (string, string) {
5353
5454func init () {
5555 _ = os .MkdirAll (engine .DataFolder ()+ "wives" , 0755 )
56- engine .OnFullMatch ("抽老婆" , getJson ).SetBlock (true ).
56+ engine .OnFullMatch ("抽老婆" , getJSON ).SetBlock (true ).
5757 Handle (func (ctx * zero.Ctx ) {
5858 card := cards [fcext .RandSenderPerDayN (ctx .Event .UserID , len (cards ))]
5959 data , err := engine .GetLazyData ("wives/" + card , true )
0 commit comments