From ca646fc5ee2520498313ab78adaa35bbd428d72b Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Wed, 30 Apr 2025 23:17:49 +0200 Subject: [PATCH] Fix downloadImage not returning 2 when content-type isn't image --- commands/misc/tdoss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/misc/tdoss.js b/commands/misc/tdoss.js index 2c44fa5..d172ec5 100644 --- a/commands/misc/tdoss.js +++ b/commands/misc/tdoss.js @@ -84,7 +84,7 @@ module.exports = { async downloadImage(url, path) { const res = await fetch(url); if(!res.ok) return 1; - if(!res.headers.get('content-type').startsWith("image")) 2; + if(!res.headers.get('content-type').startsWith("image")) return 2; const stream = Readable.fromWeb(res.body) await writeFile(path, stream); return 0;