Merge pull request #2 from MiX1024/master

Update tools.js
This commit is contained in:
Zhiyu 2024-03-24 16:02:38 +08:00 committed by GitHub
commit be3aaeff92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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];