From 5bdae1ee0ba2e97c51ef38a607517c47ba0cceaf Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Wed, 22 Mar 2023 10:12:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=B3=A2=E7=82=B9=E9=9F=B3=E4=B9=90=E9=83=A8=E5=88=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 1047a1c..72ab64e 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -657,22 +657,18 @@ export class tools extends plugin { if (res.data.lowUrl === null || res.data.highUrl === null) { return; } - // 捕获一些未知错误 - try { - // 波点音乐信息 - const { songName, artist, coverUrl, highUrl, lowUrl, shortLowUrl } = res.data; - curMsg.reply([`${songName}-${artist}\n`, segment.image(coverUrl)]); - // 下载 && 发送 - await thisMethod.downloadVideo(lowUrl).then(path => { - curMsg.reply(segment.video(path + "/temp.mp4")); - }); - } catch (err) { - curMsg.reply("发生网络错误,请重新发送!"); - } finally { - thisMethod.finish("bodianMusicContext"); - } + // 波点音乐信息 + const { songName, artist, coverUrl, highUrl, lowUrl, shortLowUrl } = res.data; + curMsg.reply([`${songName}-${artist}\n`, segment.image(coverUrl)]); + // 下载 && 发送 + await thisMethod.downloadVideo(lowUrl).then(path => { + curMsg.reply(segment.video(path + "/temp.mp4")); + }); + }) + .catch(err => { + curMsg.reply("发生网络错误,请重新发送!"); + thisMethod.finish("bodianMusicContext"); }); - this.finish("bodianMusicContext"); } /**