From ecbde2185e24c76510fa189859c0887b6c45be4a Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Sun, 12 Mar 2023 03:15:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=BD=91=E6=98=93=E4=BA=91=E5=87=BA=E7=8E=B0=E7=9A=84iPad?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=92=8CAndroid=E3=80=81iPhone=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/tools.js b/apps/tools.js index 01d30d5..d6050f1 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -644,7 +644,7 @@ export class tools extends plugin { async netease(e) { const message = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim(); const musicUrlReg = /(http:|https:)\/\/music.163.com\/song\/media\/outer\/url\?id=(\d+)/; - const id = /id=(\d+)/.exec(message)[1] || musicUrlReg.exec(message)[2]; + const id = musicUrlReg.exec(message)[2] || /id=(\d+)/.exec(message)[1]; console.log(id); fetch(`https://api.vvhan.com/api/music?id=${id}&type=song&media=netease`, { headers: {