mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 02:00:24 +00:00
🎨 update deps
This commit is contained in:
@@ -17,13 +17,14 @@ import (
|
||||
"github.com/wdvxdr1123/ZeroBot/message"
|
||||
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
||||
|
||||
fcext "github.com/FloatTech/floatbox/ctxext"
|
||||
"github.com/FloatTech/floatbox/file"
|
||||
"github.com/FloatTech/floatbox/img/writer"
|
||||
"github.com/FloatTech/floatbox/math"
|
||||
ctrl "github.com/FloatTech/zbpctrl"
|
||||
"github.com/FloatTech/zbputils/control"
|
||||
"github.com/FloatTech/zbputils/ctxext"
|
||||
"github.com/FloatTech/zbputils/file"
|
||||
"github.com/FloatTech/zbputils/img/pool"
|
||||
"github.com/FloatTech/zbputils/img/writer"
|
||||
"github.com/FloatTech/zbputils/math"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -87,7 +88,7 @@ func init() {
|
||||
}
|
||||
ctx.SendChain(message.Text("没有这个底图哦~"))
|
||||
})
|
||||
en.OnFullMatchGroup([]string{"运势", "抽签"}, ctxext.DoOnceOnSuccess(
|
||||
en.OnFullMatchGroup([]string{"运势", "抽签"}, fcext.DoOnceOnSuccess(
|
||||
func(ctx *zero.Ctx) bool {
|
||||
data, err := file.GetLazyData(omikujson, false)
|
||||
if err != nil {
|
||||
@@ -139,7 +140,7 @@ func init() {
|
||||
}
|
||||
|
||||
// 随机获取签文
|
||||
randtextindex := ctxext.RandSenderPerDayN(ctx.Event.UserID, len(omikujis))
|
||||
randtextindex := fcext.RandSenderPerDayN(ctx.Event.UserID, len(omikujis))
|
||||
title, text := omikujis[randtextindex]["title"], omikujis[randtextindex]["content"]
|
||||
digest := md5.Sum(helper.StringToBytes(zipfile + strconv.Itoa(index) + title + text))
|
||||
cachefile := cache + hex.EncodeToString(digest[:])
|
||||
@@ -171,7 +172,7 @@ func randimage(path string, ctx *zero.Ctx) (im image.Image, index int, err error
|
||||
}
|
||||
defer reader.Close()
|
||||
|
||||
file := reader.File[ctxext.RandSenderPerDayN(ctx.Event.UserID, len(reader.File))]
|
||||
file := reader.File[fcext.RandSenderPerDayN(ctx.Event.UserID, len(reader.File))]
|
||||
f, err := file.Open()
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user