diff --git a/go.mod b/go.mod index a4cbfae6..88cf5596 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/FloatTech/ZeroBot-Plugin go 1.18 require ( - github.com/FloatTech/AnimeAPI v1.3.4-0.20220502025309-31a6d419159b + github.com/FloatTech/AnimeAPI v1.3.4-0.20220505052643-ddd1de623794 github.com/FloatTech/sqlite v0.2.1 - github.com/FloatTech/zbputils v1.3.4-0.20220504132117-3a5af38dd86c + github.com/FloatTech/zbputils v1.3.4-0.20220505052538-84c0e9ec63e9 github.com/antchfx/htmlquery v1.2.4 github.com/corona10/goimagehash v1.0.3 github.com/fogleman/gg v1.3.0 diff --git a/go.sum b/go.sum index cb667f73..9d3e3cb0 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,9 @@ -github.com/FloatTech/AnimeAPI v1.3.4-0.20220502025309-31a6d419159b h1:mpNsief6QSIMxXa/HtnIrbnGx4FKeAweyaMUquoMIxE= -github.com/FloatTech/AnimeAPI v1.3.4-0.20220502025309-31a6d419159b/go.mod h1:jOKIH5uRC3LAjjCRKgABLeUZcuA/s4TGVv2kNYYoZWc= +github.com/FloatTech/AnimeAPI v1.3.4-0.20220505052643-ddd1de623794 h1:oX0/zACMcFrsmuEWRoY8SVZXxVKk7tpJL1qOB5JdiUg= +github.com/FloatTech/AnimeAPI v1.3.4-0.20220505052643-ddd1de623794/go.mod h1:q+7q1hStGYsk69rykzt4h0c9a1EP7cuacazi5jGbPOc= github.com/FloatTech/sqlite v0.2.1 h1:9t6Me48XJJCIoPy4nLRvcdhcVKfT0c2lilp7SEKROG8= github.com/FloatTech/sqlite v0.2.1/go.mod h1:6NfHRzqOo9RWeMJEoAQVuo51Omd5LFNxCNQhMF02/9U= -github.com/FloatTech/zbputils v1.3.4-0.20220502024941-dfe3f750de64 h1:LeEJpTCdh8GQxDmh0Yw82smpMNA1zuoyK4P5wn+vdr0= -github.com/FloatTech/zbputils v1.3.4-0.20220502024941-dfe3f750de64/go.mod h1:yYXxsdc8fouB9yd2XMr17wso2TV0fH1ukARwhV3U43M= -github.com/FloatTech/zbputils v1.3.4-0.20220504132117-3a5af38dd86c h1:oG8Mv4ikGm9Rle8HAN5NytwZ1atuvH8y2xLFkJGlDEU= -github.com/FloatTech/zbputils v1.3.4-0.20220504132117-3a5af38dd86c/go.mod h1:yYXxsdc8fouB9yd2XMr17wso2TV0fH1ukARwhV3U43M= +github.com/FloatTech/zbputils v1.3.4-0.20220505052538-84c0e9ec63e9 h1:fcUZGApzmSLSF1K8lauouRuYxQjocRYGpLwL3gNG10o= +github.com/FloatTech/zbputils v1.3.4-0.20220505052538-84c0e9ec63e9/go.mod h1:yYXxsdc8fouB9yd2XMr17wso2TV0fH1ukARwhV3U43M= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c h1:cNPOdTNiVwxLpROLjXCgbIPvdkE+BwvxDvgmdYmWx6Q= github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c/go.mod h1:KqZzu7slNKROh3TSYEH/IUMG6f4M+1qubZ5e52QypsE= diff --git a/plugin/bilibili/info.go b/plugin/bilibili/info.go index 9314818d..4a611967 100644 --- a/plugin/bilibili/info.go +++ b/plugin/bilibili/info.go @@ -43,9 +43,8 @@ func init() { _ = os.MkdirAll(cachePath, 0755) var getdb = ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { var err error - dbfile := engine.DataFolder() + "bilibili.db" - _, _ = file.GetLazyData(dbfile, false, false) - vdb, err = initialize(dbfile) + _, _ = engine.GetLazyData("bilibili.db", false) + vdb, err = initialize(engine.DataFolder() + "bilibili.db") if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false @@ -184,7 +183,7 @@ func init() { canvas.DrawImage(back, 0, 0) } canvas.SetColor(color.Black) - _, err = file.GetLazyData(text.BoldFontFile, false, true) + _, err = file.GetLazyData(text.BoldFontFile, true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) } diff --git a/plugin/book_review/book_review.go b/plugin/book_review/book_review.go index 9df8cc6e..1e5c0386 100644 --- a/plugin/book_review/book_review.go +++ b/plugin/book_review/book_review.go @@ -9,7 +9,6 @@ import ( "github.com/FloatTech/zbputils/binary" "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/FloatTech/zbputils/img/text" ) @@ -21,10 +20,9 @@ func init() { }) getdb := ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - dbpath := engine.DataFolder() - db.DBPath = dbpath + "bookreview.db" + db.DBPath = engine.DataFolder() + "bookreview.db" // os.RemoveAll(dbpath) - _, _ = file.GetLazyData(db.DBPath, false, true) + _, _ = engine.GetLazyData("bookreview.db", true) err := db.Create("bookreview", &book{}) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) diff --git a/plugin/chouxianghua/chouxianghua.go b/plugin/chouxianghua/chouxianghua.go index 2b4077ec..511f9c3f 100644 --- a/plugin/chouxianghua/chouxianghua.go +++ b/plugin/chouxianghua/chouxianghua.go @@ -8,7 +8,6 @@ import ( "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" ) func init() { @@ -20,10 +19,9 @@ func init() { en.OnRegex("^抽象翻译((\\s|[\\r\\n]|[\\p{Han}\\p{P}A-Za-z0-9])+)$", ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - dbpath := en.DataFolder() - db.DBPath = dbpath + "cxh.db" + db.DBPath = en.DataFolder() + "cxh.db" // os.RemoveAll(dbpath) - _, _ = file.GetLazyData(db.DBPath, false, true) + _, _ = en.GetLazyData("cxh.db", true) err := db.Create("pinyin", &pinyin{}) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) diff --git a/plugin/cpstory/cpstory.go b/plugin/cpstory/cpstory.go index c5120f92..f76fdbc4 100644 --- a/plugin/cpstory/cpstory.go +++ b/plugin/cpstory/cpstory.go @@ -10,7 +10,6 @@ import ( control "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/FloatTech/zbputils/math" ) @@ -22,10 +21,9 @@ func init() { }) getdb := ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - dbpath := engine.DataFolder() - db.DBPath = dbpath + "cp.db" + db.DBPath = engine.DataFolder() + "cp.db" // os.RemoveAll(dbpath) - _, _ = file.GetLazyData(db.DBPath, false, true) + _, _ = engine.GetLazyData("cp.db", true) err := db.Create("cp_story", &cpstory{}) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) diff --git a/plugin/curse/curse.go b/plugin/curse/curse.go index b04cecc7..025d5e74 100644 --- a/plugin/curse/curse.go +++ b/plugin/curse/curse.go @@ -8,7 +8,6 @@ import ( control "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/FloatTech/zbputils/process" ) @@ -25,9 +24,8 @@ func init() { }) getdb := ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - dbpath := engine.DataFolder() - db.DBPath = dbpath + "curse.db" - _, err := file.GetLazyData(db.DBPath, false, true) + db.DBPath = engine.DataFolder() + "curse.db" + _, err := engine.GetLazyData("curse.db", true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false diff --git a/plugin/diana/data/text.go b/plugin/diana/data/text.go index a9d1907b..6c9ecb3b 100644 --- a/plugin/diana/data/text.go +++ b/plugin/diana/data/text.go @@ -20,7 +20,7 @@ type text struct { // LoadText 加载小作文 func LoadText(dbfile string) error { - _, err := file.GetLazyData(dbfile, false, false) + _, err := file.GetLazyData(dbfile, false) db.DBPath = dbfile if err != nil { return err diff --git a/plugin/fortune/fortune.go b/plugin/fortune/fortune.go index 2a9f7e12..48045a56 100644 --- a/plugin/fortune/fortune.go +++ b/plugin/fortune/fortune.go @@ -90,7 +90,7 @@ func init() { }) en.OnFullMatchGroup([]string{"运势", "抽签"}, ctxext.DoOnceOnSuccess( func(ctx *zero.Ctx) bool { - data, err := file.GetLazyData(omikujson, true, false) + data, err := file.GetLazyData(omikujson, false) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false @@ -100,7 +100,7 @@ func init() { ctx.SendChain(message.Text("ERROR:", err)) return false } - _, err = file.GetLazyData(font, false, true) + _, err = file.GetLazyData(font, true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false @@ -126,7 +126,7 @@ func init() { } // 检查背景图片是否存在 zipfile := images + kind + ".zip" - _, err := file.GetLazyData(zipfile, false, false) + _, err := file.GetLazyData(zipfile, false) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return diff --git a/plugin/funny/laugh.go b/plugin/funny/laugh.go index a51d8f84..72bd7f04 100644 --- a/plugin/funny/laugh.go +++ b/plugin/funny/laugh.go @@ -11,7 +11,6 @@ import ( sql "github.com/FloatTech/sqlite" control "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" ) type joke struct { @@ -30,9 +29,8 @@ func init() { }) en.OnPrefixGroup([]string{"讲个笑话", "夸夸"}, ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - dbpath := en.DataFolder() - db.DBPath = dbpath + "jokes.db" - _, err := file.GetLazyData(db.DBPath, false, true) + db.DBPath = en.DataFolder() + "jokes.db" + _, err := en.GetLazyData("jokes.db", true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false diff --git a/plugin/genshin/ys.go b/plugin/genshin/ys.go index aee9a37c..c9f54e77 100644 --- a/plugin/genshin/ys.go +++ b/plugin/genshin/ys.go @@ -15,7 +15,6 @@ import ( "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/FloatTech/zbputils/img/writer" "github.com/FloatTech/zbputils/process" "github.com/golang/freetype" @@ -69,7 +68,7 @@ func init() { engine.OnFullMatch("原神十连", ctxext.DoOnceOnSuccess( func(ctx *zero.Ctx) bool { zipfile := engine.DataFolder() + "Genshin.zip" - _, err := file.GetLazyData(zipfile, false, false) + _, err := engine.GetLazyData("Genshin.zip", false) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false diff --git a/plugin/jandan/jandan.go b/plugin/jandan/jandan.go index 95959b25..97f232ee 100644 --- a/plugin/jandan/jandan.go +++ b/plugin/jandan/jandan.go @@ -10,7 +10,6 @@ import ( "github.com/FloatTech/zbputils/binary" "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/antchfx/htmlquery" "github.com/sirupsen/logrus" zero "github.com/wdvxdr1123/ZeroBot" @@ -29,9 +28,8 @@ func init() { }) getdb := ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - dbpath := engine.DataFolder() - db.DBPath = dbpath + "pics.db" - _, _ = file.GetLazyData(db.DBPath, false, false) + db.DBPath = engine.DataFolder() + "pics.db" + _, _ = engine.GetLazyData("pics.db", false) err := db.Create("picture", &picture{}) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) diff --git a/plugin/omikuji/sensou.go b/plugin/omikuji/sensou.go index 16cae129..12d53393 100644 --- a/plugin/omikuji/sensou.go +++ b/plugin/omikuji/sensou.go @@ -14,7 +14,6 @@ import ( control "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/FloatTech/zbputils/img/text" ) @@ -43,9 +42,8 @@ func init() { // 插件主体 }) engine.OnFullMatch("解签", ctxext.DoOnceOnSuccess( func(ctx *zero.Ctx) bool { - dbpath := engine.DataFolder() - db.DBPath = dbpath + "kuji.db" - _, err := file.GetLazyData(db.DBPath, false, true) + db.DBPath = engine.DataFolder() + "kuji.db" + _, err := engine.GetLazyData("kuji.db", true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false diff --git a/plugin/reborn/load.go b/plugin/reborn/load.go index e9430864..c4403e83 100644 --- a/plugin/reborn/load.go +++ b/plugin/reborn/load.go @@ -8,7 +8,7 @@ import ( // load 加载rate数据 func load(area *rate, jsonfile string) error { - data, err := file.GetLazyData(jsonfile, true, true) + data, err := file.GetLazyData(jsonfile, true) if err != nil { return err } diff --git a/plugin/score/sign_in.go b/plugin/score/sign_in.go index ce030daf..c67b75e9 100644 --- a/plugin/score/sign_in.go +++ b/plugin/score/sign_in.go @@ -94,7 +94,7 @@ func init() { monthWord := now.Format("01/02") hourWord := getHourWord(now) - _, err = file.GetLazyData(text.BoldFontFile, false, true) + _, err = file.GetLazyData(text.BoldFontFile, true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return @@ -107,7 +107,7 @@ func init() { canvas.DrawString(hourWord, float64(back.Bounds().Size().X)*0.1, float64(back.Bounds().Size().Y)*1.2) canvas.DrawString(monthWord, float64(back.Bounds().Size().X)*0.6, float64(back.Bounds().Size().Y)*1.2) nickName := ctx.CardOrNickName(uid) - _, err = file.GetLazyData(text.FontFile, false, true) + _, err = file.GetLazyData(text.FontFile, true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return @@ -192,7 +192,7 @@ func init() { ctx.SendChain(message.Text("ERROR:目前还没有人签到过")) return } - _, err = file.GetLazyData(text.FontFile, false, true) + _, err = file.GetLazyData(text.FontFile, true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return diff --git a/plugin/setutime/setu_geter.go b/plugin/setutime/setu_geter.go index adec45c6..0c1c4a54 100644 --- a/plugin/setutime/setu_geter.go +++ b/plugin/setutime/setu_geter.go @@ -62,7 +62,7 @@ func init() { // 插件主体 getdb := ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { // 如果数据库不存在则下载 pool.db.DBPath = engine.DataFolder() + "SetuTime.db" - _, _ = fileutil.GetLazyData(pool.db.DBPath, false, false) + _, _ = engine.GetLazyData("SetuTime.db", false) err := pool.db.Open() if err != nil { ctx.SendChain(message.Text("ERROR:", err)) diff --git a/plugin/tarot/tarot.go b/plugin/tarot/tarot.go index 6a7d5af2..00509570 100644 --- a/plugin/tarot/tarot.go +++ b/plugin/tarot/tarot.go @@ -9,7 +9,6 @@ import ( "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" ) @@ -27,8 +26,8 @@ type card struct { type cardset = map[string]card var cardMap = make(cardset, 256) -var reasons = []string{"您抽到的是~\n", "锵锵锵,塔罗牌的预言是~\n", "诶,让我看看您抽到了~\n"} -var position = []string{"正位", "逆位"} +var reasons = [...]string{"您抽到的是~\n", "锵锵锵,塔罗牌的预言是~\n", "诶,让我看看您抽到了~\n"} +var position = [...]string{"正位", "逆位"} func init() { engine := control.Register("tarot", &control.Options{ @@ -41,8 +40,7 @@ func init() { engine.OnFullMatch("抽塔罗牌", ctxext.DoOnceOnSuccess( func(ctx *zero.Ctx) bool { - tarotPath := engine.DataFolder() + "tarots.json" - data, err := file.GetLazyData(tarotPath, true, true) + data, err := engine.GetLazyData("tarots.json", true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false diff --git a/plugin/thesaurus/chat.go b/plugin/thesaurus/chat.go index f673e39d..7dbff9fb 100644 --- a/plugin/thesaurus/chat.go +++ b/plugin/thesaurus/chat.go @@ -6,7 +6,6 @@ import ( "math/rand" control "github.com/FloatTech/zbputils/control" - "github.com/FloatTech/zbputils/file" "github.com/sirupsen/logrus" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" @@ -21,7 +20,7 @@ func init() { PublicDataFolder: "Chat", }) go func() { - data, err := file.GetLazyData(engine.DataFolder()+"kimoi.json", true, false) + data, err := engine.GetLazyData("kimoi.json", false) if err != nil { panic(err) } diff --git a/plugin/tiangou/tiangou.go b/plugin/tiangou/tiangou.go index 7f97a2a4..68070389 100644 --- a/plugin/tiangou/tiangou.go +++ b/plugin/tiangou/tiangou.go @@ -5,7 +5,6 @@ import ( sql "github.com/FloatTech/sqlite" "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/sirupsen/logrus" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" @@ -28,9 +27,8 @@ func init() { en.OnFullMatch("舔狗日记", ctxext.DoOnceOnSuccess( func(ctx *zero.Ctx) bool { - dbpath := en.DataFolder() - db.DBPath = dbpath + "tiangou.db" - _, err := file.GetLazyData(db.DBPath, false, true) + db.DBPath = en.DataFolder() + "tiangou.db" + _, err := en.GetLazyData("tiangou.db", true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false diff --git a/plugin/vtb_quotation/vtb_quotation.go b/plugin/vtb_quotation/vtb_quotation.go index 33f388ee..18393a97 100644 --- a/plugin/vtb_quotation/vtb_quotation.go +++ b/plugin/vtb_quotation/vtb_quotation.go @@ -43,7 +43,7 @@ func init() { ctx.SendChain(message.Text("ERROR:", err)) return false } - _, err = file.GetLazyData(dbfile, false, false) + _, err = engine.GetLazyData("vtb.db", false) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false diff --git a/plugin/word_count/word_count.go b/plugin/word_count/word_count.go index 4bf06662..c169ade0 100644 --- a/plugin/word_count/word_count.go +++ b/plugin/word_count/word_count.go @@ -40,7 +40,7 @@ func init() { _ = os.RemoveAll(cachePath) _ = os.MkdirAll(cachePath, 0755) engine.OnRegex(`^热词\s?(\d*)\s?(\d*)$`, zero.OnlyGroup, ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - _, err := file.GetLazyData(engine.DataFolder()+"stopwords.txt", false, false) + _, err := engine.GetLazyData("stopwords.txt", false) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false @@ -56,7 +56,7 @@ func init() { return true })).Limit(ctxext.LimitByUser).SetBlock(true). Handle(func(ctx *zero.Ctx) { - _, err := file.GetLazyData(text.FontFile, false, true) + _, err := file.GetLazyData(text.FontFile, true) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return diff --git a/plugin/wordle/wordle.go b/plugin/wordle/wordle.go index 5ed2267f..63d4b552 100644 --- a/plugin/wordle/wordle.go +++ b/plugin/wordle/wordle.go @@ -13,12 +13,10 @@ import ( "time" "github.com/FloatTech/AnimeAPI/tl" - "github.com/sirupsen/logrus" "github.com/FloatTech/zbputils/binary" "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" "github.com/FloatTech/zbputils/img/writer" "github.com/fogleman/gg" zero "github.com/wdvxdr1123/ZeroBot" @@ -87,8 +85,7 @@ func init() { wg.Add(2) go func(i int) { defer wg.Done() - dc, err := file.GetLazyData(fmt.Sprintf("%scet-4_%d.txt", en.DataFolder(), i), true, true) - logrus.Debugln("[wordle] get", fmt.Sprintf("%scet-4_%d.txt", en.DataFolder(), i)) + dc, err := en.GetLazyData(fmt.Sprintf("cet-4_%d.txt", i), true) if err != nil { atomic.AddUint32(&errcnt, 1) return @@ -103,8 +100,7 @@ func init() { }(i) go func(i int) { defer wg.Done() - dd, err := file.GetLazyData(fmt.Sprintf("%sdict_%d.txt", en.DataFolder(), i), true, true) - logrus.Debugln("[wordle] get", fmt.Sprintf("%sdict_%d.txt", en.DataFolder(), i)) + dd, err := en.GetLazyData(fmt.Sprintf("dict_%d.txt", i), true) if err != nil { atomic.AddUint32(&errcnt, 1) return diff --git a/plugin/ymgal/ymgal.go b/plugin/ymgal/ymgal.go index 739df257..ebb902b8 100644 --- a/plugin/ymgal/ymgal.go +++ b/plugin/ymgal/ymgal.go @@ -6,7 +6,6 @@ import ( "github.com/FloatTech/zbputils/control" "github.com/FloatTech/zbputils/ctxext" - "github.com/FloatTech/zbputils/file" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" ) @@ -17,9 +16,9 @@ func init() { Help: "月幕galgame\n- 随机galCG\n- 随机gal表情包\n- galCG[xxx]\n- gal表情包[xxx]\n- 更新gal\n", PublicDataFolder: "Ymgal", }) - dbfile := engine.DataFolder() + "ymgal.db" getdb := ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool { - _, err := file.GetLazyData(dbfile, false, false) + dbfile := engine.DataFolder() + "ymgal.db" + _, err := engine.GetLazyData("ymgal.db", false) if err != nil { ctx.SendChain(message.Text("ERROR:", err)) return false