From 447c3311ff3cccdcd5596aa3fed53a658dea9ec8 Mon Sep 17 00:00:00 2001 From: kmmiio99o <164557248+kmmiio99o@users.noreply.github.com> Date: Sun, 16 Nov 2025 20:12:31 +0100 Subject: [PATCH] Small clean up This commit removes the periodic bundle check functionality because it is no longer needed. --- src/core/plugins/index.ts | 3 +-- src/index.ts | 44 +-------------------------------------- 2 files changed, 2 insertions(+), 45 deletions(-) diff --git a/src/core/plugins/index.ts b/src/core/plugins/index.ts index 4af0c3f..3f2c292 100644 --- a/src/core/plugins/index.ts +++ b/src/core/plugins/index.ts @@ -9,8 +9,7 @@ interface CorePlugin { export const getCorePlugins = (): Record => ({ "bunny.quickinstall": { ...require("./quickinstall"), preenabled: true }, "bunny.badges": require("./badges"), - "bunny.enhancements": require("./shiggyenhancements"), - "bunny.notrack": { ...require("./notrack"), preenabled: true }, + "bunny.notrack": require("./notrack"), "bunny.messagefix": require("./messagefix"), "bunny.fixembed": require("./fixembed"), }); diff --git a/src/index.ts b/src/index.ts index 9e1a300..9bab7dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -119,48 +119,6 @@ export default async () => { setTimeout(runDeferred, 200); } - // Periodic bundle check: every 3 hours, check GitHub releases (ignore prereleases). - // We use the GitHub Releases API to find the latest non-prerelease release and compare its tag. - const checkBundle = async () => { - try { - const debugInfo = getDebugInfo(); - const releasesRes = await fetch( - "https://api.github.com/repos/kmmiio99o/ShiggyCord/releases", - { cache: "no-store" }, - ); - if (!releasesRes.ok) return; - const releases = await releasesRes.json(); - if (!Array.isArray(releases) || releases.length === 0) return; - - // Find first non-prerelease, non-draft release - const stable = releases.find((r: any) => !r.prerelease && !r.draft); - if (!stable) return; - - const latestTag = stable.tag_name ?? stable.name ?? null; - const latestUrl = stable.html_url ?? null; - const installed = debugInfo?.bunny?.version ?? null; - - updaterSettings.lastBundleChecked = new Date().toISOString(); - updaterSettings.lastBundleVersion = latestTag; - updaterSettings.bundleLatestTag = latestTag; - updaterSettings.bundleLatestUrl = latestUrl ?? null; - updaterSettings.bundleAvailable = - latestTag != null && - installed != null && - String(latestTag).replace(/^v/, "") !== - String(installed).replace(/^v/, ""); - } catch (err) { - logger.log("Bundle check failed:", err); - } - }; - - // Run initial bundle check after a short delay (1 minute) to avoid doing network work - // during the critical UI startup path, then run every 3 hours. - setTimeout(() => { - checkBundle().catch(() => {}); - }, 60 * 1000); - setInterval(checkBundle, 3 * 60 * 60 * 1000); - // Final ready log for basic UI availability. - logger.log("ShiggyCord is ready (UI available)."); + logger.log("ShiggyCord is ready."); };