From aec372feb8561772513e8cfc4c67d5091e8e93c3 Mon Sep 17 00:00:00 2001 From: Alessandro Proto Date: Fri, 3 Feb 2023 22:57:49 +0100 Subject: [PATCH] Reduced logs by Discord RPC --- Capy64/Integrations/DiscordIntegration.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Capy64/Integrations/DiscordIntegration.cs b/Capy64/Integrations/DiscordIntegration.cs index c824ae5..d686889 100644 --- a/Capy64/Integrations/DiscordIntegration.cs +++ b/Capy64/Integrations/DiscordIntegration.cs @@ -24,11 +24,9 @@ public class DiscordIntegration : IPlugin var discordConfig = _configuration.GetSection("Integrations:Discord"); Client = new(discordConfig["ApplicationId"]); -#if DEBUG - Client.Logger = new ConsoleLogger() { Level = DiscordRPC.Logging.LogLevel.Info }; + Client.Logger = new ConsoleLogger() { Level = DiscordRPC.Logging.LogLevel.Warning }; + Client.OnReady += OnReady; - Client.OnPresenceUpdate += OnPresenceUpdate; -#endif Capy64.Instance.Discord = this; @@ -56,11 +54,6 @@ public class DiscordIntegration : IPlugin private void OnReady(object sender, ReadyMessage e) { - Console.WriteLine("Received Ready from user {0}", e.User.Username); - } - - private void OnPresenceUpdate(object sender, PresenceMessage e) - { - Console.WriteLine("Received Update! {0}", e.Presence); + Console.WriteLine("Discord RPC: Received Ready from user {0}", e.User.Username); } }