mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
🐛 fix fontfile notfound error
This commit is contained in:
@@ -5,7 +5,9 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/FloatTech/zbputils/file"
|
||||
"github.com/FloatTech/zbputils/process"
|
||||
"github.com/FloatTech/zbputils/txt2img"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,6 +23,14 @@ var sdb *scoredb
|
||||
func init() {
|
||||
go func() {
|
||||
process.SleepAbout1sTo2s()
|
||||
_, err := file.GetLazyData(txt2img.BoldFontFile, false, true)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
_, err = file.GetLazyData(txt2img.FontFile, false, true)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
_ = os.MkdirAll(dbpath, 0755)
|
||||
os.RemoveAll(cachePath)
|
||||
_ = os.MkdirAll(cachePath, 0755)
|
||||
|
||||
Reference in New Issue
Block a user