Skip to content

Commit 557251a

Browse files
committed
saucenao 搜图 使用合并转发
1 parent 696783b commit 557251a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

plugin/saucenao/searcher.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,15 @@ func init() { // 插件主体
9494
"直链: ", "https://pixivel.moe/detail?id=", illust.Pid,
9595
)
9696
if imgs != nil {
97-
// 发送搜索结果
98-
ctx.Send(append(imgs, message.Text("\n"), txt))
97+
if zero.OnlyGroup(ctx) {
98+
ctx.SendGroupForwardMessage(ctx.Event.GroupID, message.Message{
99+
ctxext.FakeSenderForwardNode(ctx, txt),
100+
ctxext.FakeSenderForwardNode(ctx, imgs...),
101+
})
102+
} else {
103+
// 发送搜索结果
104+
ctx.Send(append(imgs, message.Text("\n"), txt))
105+
}
99106
} else {
100107
// 图片下载失败,仅发送文字结果
101108
ctx.SendChain(txt)

0 commit comments

Comments
 (0)