Added debug option to the Discord Bridge chat bot.

This commit is contained in:
Milutinke 2022-10-21 15:08:11 +02:00
parent 8fb74c63a6
commit 614e98d424
2 changed files with 9 additions and 2 deletions

View file

@ -141,7 +141,8 @@ namespace MinecraftClient.ChatBots
TokenType = TokenType.Bot,
AutoReconnect = true,
Intents = DiscordIntents.All,
MinimumLogLevel = LogLevel.None
MinimumLogLevel = Settings.Config.Logging.DebugMessages ?
(LogLevel.Trace | LogLevel.Information | LogLevel.Debug | LogLevel.Critical | LogLevel.Error | LogLevel.Warning) : LogLevel.None
});
try
@ -156,6 +157,9 @@ namespace MinecraftClient.ChatBots
UnloadBot();
return;
}
LogDebugToConsole("Exception when trying to find the guild:");
LogDebugToConsole(e);
}
try
@ -170,6 +174,9 @@ namespace MinecraftClient.ChatBots
UnloadBot();
return;
}
LogDebugToConsole("Exception when trying to find the channel:");
LogDebugToConsole(e);
}
_client.MessageCreated += async (source, e) =>