check if dood returns a valid url

This commit is contained in:
Jorrin
2024-03-11 14:49:21 +01:00
parent 2aa7585b79
commit 284ad4d222

View File

@@ -30,6 +30,8 @@ export const doodScraper = makeEmbed({
}); });
const downloadURL = `${doodPage}${nanoid()}?token=${dataForLater}&expiry=${Date.now()}`; const downloadURL = `${doodPage}${nanoid()}?token=${dataForLater}&expiry=${Date.now()}`;
if (!downloadURL.startsWith('http')) throw new Error('Invalid URL');
return { return {
stream: [ stream: [
{ {