Skip to content

Commit

Permalink
🔥 Deleting suppressCacheVersion, not really necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbnt committed Feb 16, 2023
1 parent dd4d8a9 commit 3a3a0d8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}`
}
Expand Down

0 comments on commit 3a3a0d8

Please sign in to comment.