mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: 新增指令#r番剧
This commit is contained in:
parent
1eaa43c91b
commit
5da5196808
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user