From 1fdc4a65a640b73db755f9522bf889d05330ccb4 Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Wed, 8 Mar 2023 20:34:07 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=B7=BB=E5=8A=A0=E5=93=94?= =?UTF-8?q?=E5=93=A9=E5=93=94=E5=93=A9=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= 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 d799b1f..72d9133 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -284,7 +284,7 @@ export class tools extends plugin { async bili(e) { const urlRex = /(http:|https:)\/\/www.bilibili.com\/[A-Za-z\d._?%&+\-=\/#]*/g; const bShortRex = /(http:|https:)\/\/b23.tv\/[A-Za-z\d._?%&+\-=\/#]*/g; - let url = e.msg.trim(); + let url = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") :e.msg.trim(); // 短号处理 if (url.includes("b23.tv")) { const bShortUrl = bShortRex.exec(url)[0];