public static void Update(string details, string state) { if (!cvarRpc.Valueb()) { return; } try { var rpc = new richPresence(); rpc.details = details; rpc.state = state; rpc.largeImageKey = "icon"; rpc.largeImageText = ""; rpc.smallImageKey = "icon_s"; rpc.smallImageText = ""; UpdatePresence(ref rpc); log.WriteLine("discord: updating status (" + details + ", " + state + ")"); current = rpc; } catch { log.WriteLine("discord: failed to update", log.LogMessageType.Error); } }
private static extern void UpdatePresence(ref richPresence presence);