Skip to content

Commit

Permalink
chore: enable direct AV number or BVID
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovler-Young committed Jun 13, 2024
1 parent 0a0c0ca commit 103d2e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ bot.command("bili", async (ctx) => {
// console.log(ctx.message);
await handleBiliLink(ctx, text);
});

bot.hears(/https:\/\/b23.tv\/\S+|https:\/\/www.bilibili.com\/video\/\S+/i, async (ctx) => {
bot.hears(/(BV[a-zA-Z0-9]+)|(av\d+)|https:\/\/b23.tv\/\S+|https:\/\/www.bilibili.com\/video\/\S+/i, async (ctx) => {

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames High

This regular expression has an unescaped '.' before 'bilibili.com', so it might match more hosts than expected.
if (!ctx.message) {
return;
}
Expand Down

0 comments on commit 103d2e0

Please sign in to comment.