From 3a3a0d8096811f512eb5dcf9876a455cb34f6242 Mon Sep 17 00:00:00 2001 From: Thomas Bnt Date: Thu, 16 Feb 2023 20:59:30 +0100 Subject: [PATCH] :fire: Deleting suppressCacheVersion, not really necessary. --- src/index.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/index.js b/src/index.js index d07bd0f..cb4db44 100644 --- a/src/index.js +++ b/src/index.js @@ -9,12 +9,6 @@ * Even after a change on your side, Discord can still keep the old version in its cache. */ -/** - * @param {number} suppressCacheVersion - */ - -const suppressCacheVersion = "1" - module.exports = { /** * @param {string} baseURL @@ -27,7 +21,7 @@ module.exports = { if (baseURL === null || !baseURL) return console.error("[suppressCache] Error : baseURL is not defined. Please define it.") if (file === null || !file) return console.error("[suppressCache] Error : file is not defined. Please define it.") baseURL.endsWith("/") ? baseURL = baseURL.slice(0, -1) : baseURL - !disabled ? (genNumberCache = Math.round(Math.random() * 0xffffffffff).toString(30)) : genNumberCache = suppressCacheVersion + !disabled ? (genNumberCache = Math.round(Math.random() * 0xffffffffff).toString(30)) : 1 log ? console.log(`[suppressCache] Output : ${baseURL}/${file}?suppressCache=${genNumberCache}`) : null return `${baseURL}/${file}?suppressCache=${genNumberCache}` }