新增 插件冲突检测、b14 加解密 添加随机等待 1~2s 工具函数

This commit is contained in:
fumiama
2021-10-28 21:03:09 +08:00
parent dd32aec462
commit d205d48166
13 changed files with 191 additions and 23 deletions

View File

@@ -3,15 +3,14 @@ package reborn
import (
"encoding/json"
"io"
"math/rand"
"net/http"
"os"
"time"
wr "github.com/mroth/weightedrand"
log "github.com/sirupsen/logrus"
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
)
const (
@@ -31,7 +30,7 @@ var (
func init() {
go func() {
time.Sleep(time.Second + time.Millisecond*time.Duration(rand.Intn(1000)))
process.SleepAbout1sTo2s()
err := os.MkdirAll(datapath, 0755)
if err != nil {
panic(err)