From 00e0baf7a6dcfe492087d6e9c39ca18776f6f223 Mon Sep 17 00:00:00 2001 From: zhiyu <542716863@qq.com> Date: Thu, 2 May 2024 14:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20pref:=20V1.6.7-lts=20=E6=8F=90?= =?UTF-8?q?=E5=8D=87netease=E5=81=A5=E5=A3=AE=E6=80=A7=20&=20netease?= =?UTF-8?q?=E5=9B=BD=E5=86=85=E4=BD=BF=E7=94=A8=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 提升netease健壮性 2. netease国内使用更换为全走临时接口 --- apps/tools.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 3acb7cb..56684e8 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1033,7 +1033,7 @@ export class tools extends plugin { }, }).then(async resp => { // 国内解决方案,替换API后这里也需要修改 - let url = isOversea ? await resp.data.data?.[0].url : await resp.data.data.url; + let url = await resp.data.data?.[0]?.url || null; // 获取歌曲信息 let title = await axios.get(AUTO_NETEASE_SONG_DETAIL.replace("{}", id)).then(res => { const song = res.data.songs[0]; @@ -1057,8 +1057,8 @@ export class tools extends plugin { } // 下载音乐 downloadMp3(url, this.getCurDownloadPath(e), title, 'follow').then(async path => { - // 发送语音(待测试) - // e.reply(segment.record(fs.readFileSync(path))); + // 发送语音 + // e.reply(segment.record(path)); // 判断是不是icqq if (e.bot?.sendUni) { e.group.fs.upload(path);