mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-22 08:10:09 +08:00
✏️ 根据 PID 搜图增加删图判断
This commit is contained in:
parent
843c77e9ba
commit
be49ba83b3
@ -27,21 +27,25 @@ func init() { // 插件主体
|
|||||||
ctx.SendChain(message.Text("ERROR: ", err))
|
ctx.SendChain(message.Text("ERROR: ", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 改用 i.pixiv.cat 镜像站
|
if illust.Pid > 0 {
|
||||||
link := illust.ImageUrls
|
// 改用 i.pixiv.cat 镜像站
|
||||||
link = strings.ReplaceAll(link, "i.pximg.net", "i.pixiv.cat")
|
link := illust.ImageUrls
|
||||||
// 发送搜索结果
|
link = strings.ReplaceAll(link, "i.pximg.net", "i.pixiv.cat")
|
||||||
ctx.SendChain(
|
// 发送搜索结果
|
||||||
message.Image(link),
|
ctx.SendChain(
|
||||||
message.Text(
|
message.Image(link),
|
||||||
"\n",
|
message.Text(
|
||||||
"标题:", illust.Title, "\n",
|
"\n",
|
||||||
"插画ID:", illust.Pid, "\n",
|
"标题:", illust.Title, "\n",
|
||||||
"画师:", illust.UserName, "\n",
|
"插画ID:", illust.Pid, "\n",
|
||||||
"画师ID:", illust.UserId, "\n",
|
"画师:", illust.UserName, "\n",
|
||||||
"直链:", "https://pixivel.moe/detail?id=", illust.Pid,
|
"画师ID:", illust.UserId, "\n",
|
||||||
),
|
"直链:", "https://pixivel.moe/detail?id=", illust.Pid,
|
||||||
)
|
),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
ctx.Send("图片不存在!")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// 以图搜图
|
// 以图搜图
|
||||||
zero.OnKeywordGroup([]string{"以图搜图", "搜索图片", "以图识图"}, picture.CmdMatch, picture.MustGiven).SetBlock(true).FirstPriority().
|
zero.OnKeywordGroup([]string{"以图搜图", "搜索图片", "以图识图"}, picture.CmdMatch, picture.MustGiven).SetBlock(true).FirstPriority().
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user