mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🎈 perf: 优化竹白优先展示最新
This commit is contained in:
parent
1148d24ef5
commit
e075b86d18
@ -394,16 +394,18 @@ export class query extends plugin {
|
||||
)
|
||||
.then(async resp => {
|
||||
const res = resp.data.data;
|
||||
const content = await res.map(item => {
|
||||
const { pn, pa, zn, lu, pu, pq, aa, hl } = item;
|
||||
const template = `标题:${pn}\n${pa}\n期刊:${zn}\n发布日期距今:${lu}\n链接1:${pu}\n链接2:${pq}\n\n 大致描述:${hl
|
||||
.join("\n")
|
||||
.replace(/<\/?font[^>]*>/g, "")}`;
|
||||
return {
|
||||
message: [segment.image(aa), template],
|
||||
nickname: this.e.sender.card || this.e.user_id,
|
||||
user_id: this.e.user_id,
|
||||
};
|
||||
const content = res
|
||||
.sort((a, b) => b.luSort - a.luSort)
|
||||
.map(item => {
|
||||
const { pn, pa, zn, lu, pu, pq, aa, hl } = item;
|
||||
const template = `标题:${pn}\n${pa}\n期刊:${zn}\n发布日期距今:${lu}\n链接1:${pu}\n链接2:${pq}\n\n 大致描述:${hl
|
||||
.join("\n")
|
||||
.replace(/<\/?font[^>]*>/g, "")}`;
|
||||
return {
|
||||
message: [segment.image(aa), template],
|
||||
nickname: this.e.sender.card || this.e.user_id,
|
||||
user_id: this.e.user_id,
|
||||
};
|
||||
});
|
||||
e.reply(await Bot.makeForwardMsg(content));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user