mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
✨ 搜图增加 yandex
This commit is contained in:
parent
30665ad8c6
commit
37033fe48d
@ -5,19 +5,21 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/FloatTech/AnimeAPI/ascii2d"
|
|
||||||
"github.com/FloatTech/AnimeAPI/pixiv"
|
|
||||||
"github.com/FloatTech/AnimeAPI/saucenao"
|
|
||||||
control "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/process"
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
|
|
||||||
|
"github.com/FloatTech/AnimeAPI/ascii2d"
|
||||||
|
"github.com/FloatTech/AnimeAPI/pixiv"
|
||||||
|
"github.com/FloatTech/AnimeAPI/saucenao"
|
||||||
|
"github.com/FloatTech/AnimeAPI/yandex"
|
||||||
|
|
||||||
|
"github.com/FloatTech/zbputils/control"
|
||||||
"github.com/FloatTech/zbputils/control/order"
|
"github.com/FloatTech/zbputils/control/order"
|
||||||
|
"github.com/FloatTech/zbputils/ctxext"
|
||||||
|
"github.com/FloatTech/zbputils/file"
|
||||||
|
"github.com/FloatTech/zbputils/img/pool"
|
||||||
|
"github.com/FloatTech/zbputils/process"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { // 插件主体
|
func init() { // 插件主体
|
||||||
@ -122,6 +124,23 @@ func init() { // 插件主体
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if result, err := yandex.Yandex(pic); err != nil {
|
||||||
|
ctx.SendChain(message.Text("ERROR: ", err))
|
||||||
|
} else {
|
||||||
|
// 返回SauceNAO的结果
|
||||||
|
ctx.SendChain(
|
||||||
|
message.Text("我有把握是这个!"),
|
||||||
|
message.Text(
|
||||||
|
"\n",
|
||||||
|
"标题:", result.Title, "\n",
|
||||||
|
"插画ID:", result.Pid, "\n",
|
||||||
|
"画师:", result.UserName, "\n",
|
||||||
|
"画师ID:", result.UserId, "\n",
|
||||||
|
"直链:", "https://pixivel.moe/detail?id=", result.Pid,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
}
|
||||||
if result, err := ascii2d.Ascii2d(pic); err != nil {
|
if result, err := ascii2d.Ascii2d(pic); err != nil {
|
||||||
ctx.SendChain(message.Text("ERROR: ", err))
|
ctx.SendChain(message.Text("ERROR: ", err))
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user