From 29b51464bf97780c5130f1819a4ad5fabdb4bb80 Mon Sep 17 00:00:00 2001 From: Fate2077 <47292243+Fate2077@users.noreply.github.com> Date: Tue, 31 Dec 2024 20:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=93=94=E5=93=A9=E5=93=94=E5=93=A9=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 2c081b8..8652639 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -149,7 +149,7 @@ export class tools extends plugin { permission: 'master', }, { - reg: "(bilibili.com|b23.tv|t.bilibili.com|^BV[1-9a-zA-Z]{10}$)", + reg: "(bilibili.com|b23.tv|bili2233.cn|t.bilibili.com|^BV[1-9a-zA-Z]{10}$)", fnc: "bili", }, { @@ -731,7 +731,7 @@ export class tools extends plugin { return true; } const urlRex = /(?:https?:\/\/)?www\.bilibili\.com\/[A-Za-z\d._?%&+\-=\/#]*/g; - const bShortRex = /(http:|https:)\/\/b23.tv\/[A-Za-z\d._?%&+\-=\/#]*/g; + const bShortRex = /(http:|https:)\/\/(b23.tv|bili2233.cn)\/[A-Za-z\d._?%&+\-=\/#]*/g; let url = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim().replaceAll("\\", ""); // 直接发送BV号的处理 if (/^BV[1-9a-zA-Z]{10}$/.exec(url)?.[0]) { @@ -739,7 +739,7 @@ export class tools extends plugin { logger.info(url); } // 短号处理 - if (url.includes("b23.tv")) { + if (url.includes("b23.tv") || url.includes("bili2233.cn")) { const bShortUrl = bShortRex.exec(url)?.[0]; await fetch(bShortUrl, { method: "HEAD"