🐞 fix: 修复波点音乐部分问题

This commit is contained in:
zhiyu1998 2023-03-22 10:12:04 +08:00
parent c51bc70ef4
commit 5bdae1ee0b

View File

@ -657,8 +657,6 @@ export class tools extends plugin {
if (res.data.lowUrl === null || res.data.highUrl === null) { if (res.data.lowUrl === null || res.data.highUrl === null) {
return; return;
} }
// 捕获一些未知错误
try {
// 波点音乐信息 // 波点音乐信息
const { songName, artist, coverUrl, highUrl, lowUrl, shortLowUrl } = res.data; const { songName, artist, coverUrl, highUrl, lowUrl, shortLowUrl } = res.data;
curMsg.reply([`${songName}-${artist}\n`, segment.image(coverUrl)]); curMsg.reply([`${songName}-${artist}\n`, segment.image(coverUrl)]);
@ -666,13 +664,11 @@ export class tools extends plugin {
await thisMethod.downloadVideo(lowUrl).then(path => { await thisMethod.downloadVideo(lowUrl).then(path => {
curMsg.reply(segment.video(path + "/temp.mp4")); curMsg.reply(segment.video(path + "/temp.mp4"));
}); });
} catch (err) { })
.catch(err => {
curMsg.reply("发生网络错误,请重新发送!"); curMsg.reply("发生网络错误,请重新发送!");
} finally {
thisMethod.finish("bodianMusicContext"); thisMethod.finish("bodianMusicContext");
}
}); });
this.finish("bodianMusicContext");
} }
/** /**