From a02737ef1b6bcc4f3b2017a71695a5de1bb1f3c4 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Thu, 18 Jan 2024 19:47:39 +0100 Subject: [PATCH] remove unused module --- src/discord/richPresence.js | 56 ------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 src/discord/richPresence.js diff --git a/src/discord/richPresence.js b/src/discord/richPresence.js deleted file mode 100644 index f59b494..0000000 --- a/src/discord/richPresence.js +++ /dev/null @@ -1,56 +0,0 @@ -const DiscordRPC = require("discord-auto-rpc"); -const { appName, appVersion } = require("../../appInfo"); - -const clientId = "1032772293220384808"; -let richPresence; - -let currentStatus = { - state: " ", - details: "Idle in Launcher...", - startTimestamp: new Date(), - largeImageKey: "ezppfarm", - largeImageText: `${appName} ${appVersion}`, - smallImageKey: " ", - smallImageText: " ", - buttons: [ - { - label: "Download the Launcher", - url: "https://git.ez-pp.farm/EZPPFarm/EZPPLauncher/releases/latest" - }, - { - label: "Join EZPPFarm", - url: "https://ez-pp.farm/discord" - } - ], - instance: false - -} - -module.exports = { - connect: () => { - if (!richPresence) { - richPresence = new DiscordRPC.AutoClient({ transport: "ipc" }); - richPresence.endlessLogin({ clientId }); - richPresence.once("ready", () => { - setInterval(() => { - richPresence.setActivity(currentStatus); - }, 2500) - }); - } - }, - disconnect: async () => { - if (richPresence) { - await richPresence.clearActivity(); - await richPresence.destroy(); - richPresence = null; - } - }, - updateStatus: ({ state, details }) => { - currentStatus.state = state ?? " "; - currentStatus.details = details ?? " "; - }, - updateVersion: (osuVersion) => { - currentStatus.smallImageKey = osuVersion ? "osu" : " "; - currentStatus.smallImageText = osuVersion ? `osu! ${osuVersion}` : " "; - } -} \ No newline at end of file