feat: 添加哔哩哔哩小程序支持

This commit is contained in:
zhiyu1998 2023-03-08 20:34:07 +08:00
parent 7397722cbc
commit 1fdc4a65a6

View File

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