mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Reduced logs by Discord RPC
This commit is contained in:
parent
e0f3dc578b
commit
aec372feb8
1 changed files with 3 additions and 10 deletions
|
@ -24,11 +24,9 @@ public class DiscordIntegration : IPlugin
|
||||||
var discordConfig = _configuration.GetSection("Integrations:Discord");
|
var discordConfig = _configuration.GetSection("Integrations:Discord");
|
||||||
Client = new(discordConfig["ApplicationId"]);
|
Client = new(discordConfig["ApplicationId"]);
|
||||||
|
|
||||||
#if DEBUG
|
Client.Logger = new ConsoleLogger() { Level = DiscordRPC.Logging.LogLevel.Warning };
|
||||||
Client.Logger = new ConsoleLogger() { Level = DiscordRPC.Logging.LogLevel.Info };
|
|
||||||
Client.OnReady += OnReady;
|
Client.OnReady += OnReady;
|
||||||
Client.OnPresenceUpdate += OnPresenceUpdate;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Capy64.Instance.Discord = this;
|
Capy64.Instance.Discord = this;
|
||||||
|
|
||||||
|
@ -56,11 +54,6 @@ public class DiscordIntegration : IPlugin
|
||||||
|
|
||||||
private void OnReady(object sender, ReadyMessage e)
|
private void OnReady(object sender, ReadyMessage e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Received Ready from user {0}", e.User.Username);
|
Console.WriteLine("Discord RPC: Received Ready from user {0}", e.User.Username);
|
||||||
}
|
|
||||||
|
|
||||||
private void OnPresenceUpdate(object sender, PresenceMessage e)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Received Update! {0}", e.Presence);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue