mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 18:20:27 +00:00
✨ 搜图下载使用animeapi,将文件判存移至utils
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
||||
wr "github.com/mroth/weightedrand"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
@@ -53,7 +54,7 @@ func init() {
|
||||
|
||||
// load 加载rate数据
|
||||
func load(area *rate) error {
|
||||
if _, err := os.Stat(jsonfile); err == nil || os.IsExist(err) {
|
||||
if file.IsExist(jsonfile) {
|
||||
f, err := os.Open(jsonfile)
|
||||
if err == nil {
|
||||
defer f.Close()
|
||||
|
||||
Reference in New Issue
Block a user