diff --git a/DiscordPresence.cs b/DiscordPresence.cs index 98a4118..0ecb8e4 100644 --- a/DiscordPresence.cs +++ b/DiscordPresence.cs @@ -118,6 +118,12 @@ public static string RunDiscordRpc(string procName) return "User is focused on the Kaikki window. Clearing presence..."; } + if (procName == "Unknown") + { + Client.ClearPresence(); + return "Cannot get the process name of focused window. Clearing presence..."; + } + SetPresence("kaikki_logo", procName, "Kaikki logo"); return "Unsupported process"; }