ZeroBot-Plugin/plugin_drift_bottle/db.go
2022-02-14 14:46:33 +08:00

24 lines
316 B
Go

package driftbottle
import (
"os"
sql "github.com/FloatTech/sqlite"
)
const (
dbpath = "data/driftbottle/"
dbfile = dbpath + "sea.db"
)
var sea = &sql.Sqlite{DBPath: dbfile}
func init() {
_ = os.MkdirAll(dbpath, 0755)
err := sea.Open()
if err != nil {
panic(err)
}
_ = createChannel(sea, "global")
}