diff --git a/index.js b/index.js index 02450a1..94a856a 100644 --- a/index.js +++ b/index.js @@ -205,10 +205,10 @@ async function pageUpdate() { if (!fs.existsSync(fp)) { return 'imgs/notFound.png' - } else if (fs.readFileSync(fp).length < 1) { + } else if (fs.statSync(fp).size < 1000) { fs.rmSync(fp) } - + return '/cached/' + fn } @@ -275,8 +275,8 @@ async function pageUpdate() {
Playing ${activity.name}
-
${activity.details || activity.assets.large_text || " "}
-
${activity.state || activity.assets.small_text || " "}
+
${(activity.details || activity.assets.large_text || " ")}
+
${(activity.state || activity.assets.small_text || " ")}
${gameTimeFormatter((Date.now() - time) / 1000)}
${activity.name}
-
${activity.details || activity.assets.large_text || " "}
-
${activity.state || activity.assets.small_text || " "}
+
${(activity.details || activity.assets.large_text || " ")}
+
${(activity.state || activity.assets.small_text || " ")}
${gameTimeFormatter((Date.now() - time) / 1000)}