优化代码结构

This commit is contained in:
源文雨
2022-10-05 12:09:09 +08:00
parent 6cf14fc7dd
commit 4609985b79
6 changed files with 128 additions and 9 deletions

View File

@@ -5,7 +5,6 @@ import (
"crypto/md5"
"encoding/hex"
"github.com/FloatTech/AnimeAPI/danbooru"
"github.com/FloatTech/floatbox/file"
"github.com/FloatTech/floatbox/img/writer"
ctrl "github.com/FloatTech/zbpctrl"
@@ -30,7 +29,7 @@ func init() { // 插件主体
Handle(func(ctx *zero.Ctx) {
ctx.SendChain(message.Text("少女祈祷中..."))
for _, url := range ctx.State["image_url"].([]string) {
t, err := danbooru.TagURL("", url)
t, err := tagurl("", url)
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
return