From 2df9f533fe5939030ae3ff1be569834cbc41b06a Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Thu, 4 May 2023 21:22:51 +0200 Subject: [PATCH] set buttons to constant array --- discordPresence.js | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/discordPresence.js b/discordPresence.js index 332afb3..2514d57 100644 --- a/discordPresence.js +++ b/discordPresence.js @@ -7,22 +7,23 @@ let client = undefined; let lastState = "Idle in Launcher..."; let presenceEnabled = true; let startDate = new Date(); +const actionButtons = [ + { + label: "Download the Launcher", + url: "https://git.ez-pp.farm/EZPPFarm/EZPPLauncher/releases/latest" + }, + { + label: "Join EZPPFarm", + url: "https://ez-pp.farm/discord" + } +] let lastActivity = { details: " ", state: lastState, startTimestamp: startDate, largeImageKey: "ezppfarm", largeImageText: appInfo.appName + " " + appInfo.appVersion, - buttons: [ - { - label: "Download the Launcher", - url: "https://git.ez-pp.farm/EZPPFarm/EZPPLauncher/releases/latest" - }, - { - label: "Join EZPPFarm", - url: "https://ez-pp.farm/discord" - } - ], + buttons: actionButtons, instance: false, }; @@ -53,16 +54,7 @@ module.exports = { smallImageText: osuVersion ? osuVersion : " ", largeImageKey: "ezppfarm", largeImageText: appInfo.appName + " " + appInfo.appVersion, - buttons: [ - { - label: "Download the Launcher", - url: "https://ez-pp.farm/download" - }, - { - label: "Join EZPPFarm", - url: "https://discord.com/invite/g8Bh7RaKPg" - } - ], + buttons: actionButtons, instance: false, } }