diff --git a/apps/query.js b/apps/query.js index e0842e8..e247969 100644 --- a/apps/query.js +++ b/apps/query.js @@ -237,13 +237,26 @@ export class query extends plugin { e.reply("暂无番剧信息"); return; } - const findRes = Object.entries(animeList).find(([key, value]) => key.includes(title)); + const findRes = Object.entries(animeList).filter(([key, value]) => key.includes(title)); if (findRes == null) { e.reply("未找到相关番剧"); return; } - const { cover, shortLink, shortLink2 } = findRes[1]; - e.reply([segment.image(cover), `《${findRes[0]}》\n\n🪶 在线观看: ${ shortLink }\n🌸 在线观看: ${ shortLink2 }\n${DIVIDING_LINE.replace("{}", "收录信息")}\n当前管理员已经收录了: ${ Object.keys(animeList).length } 个番剧`]); + let forwardMsg = [{ + message: { type: 'text', text: `当前管理员已经收录了: ${ Object.keys(animeList).length } 个番剧`}, + nickname: this.e.sender.card || this.e.user_id, + user_id: this.e.user_id, + }]; + for (let item of findRes) { + const { cover, shortLink, shortLink2 } = item[1]; + forwardMsg.push({ + message: [segment.image(cover), `《${ item[0] }》\n\n🪶 在线观看: ${ shortLink }\n🌸 在线观看: ${ shortLink2 }`], + nickname: this.e.sender.card || this.e.user_id, + user_id: this.e.user_id, + }); + } + + e.reply(await Bot.makeForwardMsg(forwardMsg)); return true; }