accept any delimiter for pixiv album links because discord doesn't include # in requests

This commit is contained in:
erin 2025-09-23 15:31:41 +00:00
parent 79797ae4df
commit 9ab4a9ebf6

View file

@ -2,7 +2,7 @@ import {createServer} from 'node:http';
const sites = [
{
pattern: /^(?:www\.)?pixiv\.net(?:\/\w+)?\/artworks\/(\d+)(?:#(\d+))?/i,
pattern: /^(?:www\.)?pixiv\.net(?:\/\w+)?\/artworks\/(\d+)(?:[^\w\d](\d+))?/i,
redirect: match => `https://pixiv.kmn5.li/${match[1]}${match[2] ? `_${parseInt(match[2], 10) - 1}` : ''}`,
},
{