🐞 fix: 增加netease解析健壮性

This commit is contained in:
zhiyu1998 2023-03-16 18:31:41 +08:00
parent 4e6fe09e4f
commit 8440fa171f

View File

@ -166,7 +166,7 @@ export class neteasepro extends plugin {
} else {
// 非小程序
const title = await getSongDetail(id).then(res => {
const song = res?.songs[0];
const song = res.songs?.[0];
return song.length > 0 ? `${song?.name}-${song?.ar?.[0].name}`.replace(/[\/\?<>\\:\*\|".… ]/g, "") : "暂无信息";
});
e.reply(`识别:网易云音乐,${title}`);