mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-24 10:40:09 +08:00
✏️ 修复 sql 加载失败
This commit is contained in:
parent
0e026a8b3b
commit
37e36fb886
@ -5,11 +5,15 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
|
||||
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.Println("[vtb/cron] 开启vtb数据库日常更新")
|
||||
vtbDaily()
|
||||
go func() {
|
||||
process.SleepAbout1sTo2s()
|
||||
log.Println("[vtb/cron] 开启vtb数据库日常更新")
|
||||
vtbDaily()
|
||||
}()
|
||||
}
|
||||
|
||||
func vtbDaily() {
|
||||
|
||||
@ -20,7 +20,7 @@ type Sqlite struct {
|
||||
// 返回错误
|
||||
func (db *Sqlite) Create(table string, objptr interface{}) (err error) {
|
||||
if db.DB == nil {
|
||||
database, err := sql.Open("sqlite", db.DBPath)
|
||||
database, err := sql.Open("sqlite3", db.DBPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user