mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Show Discord RPC logs on debug only
This commit is contained in:
parent
732311a730
commit
9b5d463f4a
1 changed files with 7 additions and 6 deletions
|
@ -3,6 +3,7 @@ using DiscordRPC;
|
|||
using DiscordRPC.Logging;
|
||||
using DiscordRPC.Message;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -21,15 +22,15 @@ public class DiscordIntegration : IPlugin
|
|||
_configuration = configuration;
|
||||
|
||||
var discordConfig = _configuration.GetSection("Integrations:Discord");
|
||||
Client = new(discordConfig["ApplicationId"])
|
||||
{
|
||||
Logger = new ConsoleLogger() { Level = LogLevel.Warning }
|
||||
};
|
||||
|
||||
Capy64.Instance.Discord = this;
|
||||
Client = new(discordConfig["ApplicationId"]);
|
||||
|
||||
#if DEBUG
|
||||
Client.Logger = new ConsoleLogger() { Level = DiscordRPC.Logging.LogLevel.Info };
|
||||
Client.OnReady += OnReady;
|
||||
Client.OnPresenceUpdate += OnPresenceUpdate;
|
||||
#endif
|
||||
|
||||
Capy64.Instance.Discord = this;
|
||||
|
||||
if (discordConfig.GetValue("Enable", false))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue