private static void OnPresenceUpdate(object sender, PresenceMessage args) { RichPresenceHelper.Log(args.Type, args.TimeCreated, string.Format("Now playing {0}.", args.Presence == null ? "nothing" : args.Presence.State)); }
private static void OnConnectionFailed(object sender, ConnectionFailedMessage args) { RichPresenceHelper.Log(args.Type, args.TimeCreated, string.Format("Pipe connection failed on #{0}.", args.FailedPipe)); RichPresenceHelper.IsInitialized = false; }
private static void OnConnectionEstablished(object sender, ConnectionEstablishedMessage args) { RichPresenceHelper.Log(args.Type, args.TimeCreated, string.Format("Pipe connection established on #{0}.", args.ConnectedPipe)); }
private static void OnError(object sender, ErrorMessage args) { RichPresenceHelper.Log(args.Type, args.TimeCreated, string.Format("Error occured within discord. ({1}) {0}", args.Message, args.Code)); }
private static void OnClose(object sender, CloseMessage args) { RichPresenceHelper.Log(args.Type, args.TimeCreated, string.Format("Lost connection with client because of '{0}'.", args.Reason)); RichPresenceHelper.IsInitialized = false; }
private static void OnReady(object sender, ReadyMessage args) { RichPresenceHelper.Log(args.Type, args.TimeCreated, string.Format("Ready (RPC version {0})", args.Version)); RichPresenceHelper.IsInitialized = true; }