From c3356950fd92e32074e5aab787307e236584f818 Mon Sep 17 00:00:00 2001 From: Bingus_Violet Date: Fri, 26 Jan 2024 20:55:47 -0600 Subject: [PATCH] Activities work now --- index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/index.js b/index.js index 1e96e58..c36ec54 100644 --- a/index.js +++ b/index.js @@ -237,6 +237,27 @@ function pageUpdate() {
${gameTimeFormatter((Date.now() - time) / 1000)}

+ + ` + } else if (activity.type != 4) { + var time = activity.created_at + if (activity.timestamps) { + time = activity.timestamps.start + } + if (!activity.assets) { + activity.assets = {"large_text": " ", "small_text": " "} + } + + addedHTML += ` +
+ +

+ ${activity.name} +
${activity.details || activity.assets.large_text || " "} +
${activity.state || activity.assets.small_text || " "} +
${gameTimeFormatter((Date.now() - time) / 1000)} +

+
` }