This commit is contained in:
fumiama 2021-09-26 10:25:26 +08:00
parent a588ec9d18
commit f932e24573

View File

@ -18,13 +18,13 @@ import (
"github.com/wdvxdr1123/ZeroBot/message" "github.com/wdvxdr1123/ZeroBot/message"
"github.com/FloatTech/ZeroBot-Plugin/control" "github.com/FloatTech/ZeroBot-Plugin/control"
. "github.com/FloatTech/ZeroBot-Plugin/data" "github.com/FloatTech/ZeroBot-Plugin/data"
) )
// Pools 图片缓冲池 // Pools 图片缓冲池
type imgpool struct { type imgpool struct {
Lock sync.Mutex Lock sync.Mutex
DB *Sqlite DB *data.Sqlite
Path string Path string
Group int64 Group int64
List []string List []string
@ -40,7 +40,7 @@ const (
// NewPoolsCache 返回一个缓冲池对象 // NewPoolsCache 返回一个缓冲池对象
func newPools() *imgpool { func newPools() *imgpool {
cache := &imgpool{ cache := &imgpool{
DB: &Sqlite{DBPath: "data/SetuTime/SetuTime.db"}, DB: &data.Sqlite{DBPath: "data/SetuTime/SetuTime.db"},
Path: "data/SetuTime/cache/", Path: "data/SetuTime/cache/",
Group: 0, Group: 0,
List: []string{"涩图", "二次元", "风景", "车万"}, // 可以自己加类别,得自己加图片进数据库 List: []string{"涩图", "二次元", "风景", "车万"}, // 可以自己加类别,得自己加图片进数据库