Possible fix for #11758

This commit is contained in:
Anuken
2026-03-15 11:57:18 -04:00
parent ddfe45856f
commit 29b54f0a93
5 changed files with 20 additions and 5 deletions

View File

@@ -149,11 +149,11 @@ public class DesktopLauncher extends ClientLauncher{
this.args = args;
if(useDiscord){
Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::close));
Threads.daemon(() -> {
try{
DiscordRPC.connect(discordID);
Log.info("Initialized Discord rich presence.");
Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::close));
}catch(NoDiscordClientException none){
//don't log if no client is found
useDiscord = false;