From 6bf1d2c953f0129c33bdedf28f621e7756a378fc Mon Sep 17 00:00:00 2001 From: MiX1024 <116636746+MiX1024@users.noreply.github.com> Date: Sun, 24 Mar 2024 15:07:24 +0800 Subject: [PATCH] Update tools.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修下B站小程序 --- apps/tools.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/tools.js b/apps/tools.js index a00404a..0cf3e54 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -321,7 +321,8 @@ export class tools extends plugin { async biliCore(e) { const urlRex = /(?:https?:\/\/)?www\.bilibili\.com\/[A-Za-z\d._?%&+\-=\/#]*/g; const bShortRex = /(http:|https:)\/\/b23.tv\/[A-Za-z\d._?%&+\-=\/#]*/g; - let url = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim(); + let url1 = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim(); + let url = url1.replaceAll(/\\/g, "") // 短号处理 if (url.includes("b23.tv")) { const bShortUrl = bShortRex.exec(url)?.[0];