From 1d10083b86061e9557f4f7099eb97da76226f273 Mon Sep 17 00:00:00 2001 From: itsskaiya Date: Sat, 22 Nov 2025 22:52:35 -0500 Subject: [PATCH] Fixed DiscordRPC crashing the app on startup if you didn't have discord open. --- package.json | 2 +- src/discord-rpc.js | 5 +++++ src/updateNotification.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 65ea0ce..63d9f75 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waifu-board", - "version": "v1.6.0", + "version": "v1.6.1", "description": "An image board app to store and browse your favorite waifus!", "main": "main.js", "scripts": { diff --git a/src/discord-rpc.js b/src/discord-rpc.js index 48cf124..ca7c87a 100644 --- a/src/discord-rpc.js +++ b/src/discord-rpc.js @@ -55,6 +55,10 @@ function initDiscordRPC() { }, 1000); }); + rpcClient.on('error', (err) => { + console.log('[Discord RPC] Background warning:', err.message); + }); + rpcClient.on('disconnected', () => { if (!app.isPackaged) { console.log('Discord RPC: Disconnected. Attempting to reconnect in 10s...'); @@ -69,6 +73,7 @@ function initDiscordRPC() { try { rpcClient.connect().catch(err => { console.error('Discord RPC: Connection failed', err.message); + return; }); } catch (err) { console.error('Discord RPC: Error initializing', err); diff --git a/src/updateNotification.js b/src/updateNotification.js index 4775358..1232f38 100644 --- a/src/updateNotification.js +++ b/src/updateNotification.js @@ -1,6 +1,6 @@ const GITHUB_OWNER = 'ItsSkaiya'; const GITHUB_REPO = 'WaifuBoard'; -const CURRENT_VERSION = 'v1.6.0'; +const CURRENT_VERSION = 'v1.6.1'; const UPDATE_CHECK_INTERVAL = 5 * 60 * 1000; let currentVersionDisplay;