mlem
This commit is contained in:
parent
9986d8c410
commit
9bceeb6060
|
@ -546,10 +546,10 @@ async function wordFilters(message: Message) {
|
|||
const content = message.content.replace(/\u200b/g, "");
|
||||
|
||||
try {
|
||||
const RE_POKETUBE_VIDEO = /https?:\/\/(poketube.fun|poketube.sudovanilla.com)\/watch\?([^\s\/]+&)?v=(?<videoid>[^\s\/?&]{1,16})(&\S*)?/gi;
|
||||
const RE_YOUTUBE_PROXY = /https?:\/\/(\w+\.)?(poketube\.fun|poketube\.sudovanilla\.com|piped\.video)\/watch\?([^\s\/]+&)?v=(?<videoid>[^\s\/?&]{1,16})(&\S*)?/gi;
|
||||
const results: string[] = [];
|
||||
|
||||
for (const result of content.matchAll(RE_POKETUBE_VIDEO)) {
|
||||
for (const result of content.matchAll(RE_YOUTUBE_PROXY)) {
|
||||
var id = result.groups?.videoid;
|
||||
if (id) results.push(`https://youtu.be/${id}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue