diff --git a/EventBot/EventBot.csproj b/EventBot/EventBot.csproj
index 67da6ae..a7df182 100644
--- a/EventBot/EventBot.csproj
+++ b/EventBot/EventBot.csproj
@@ -9,15 +9,15 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/EventBot/Program.cs b/EventBot/Program.cs
index f882ebf..d92329a 100644
--- a/EventBot/Program.cs
+++ b/EventBot/Program.cs
@@ -49,12 +49,7 @@ namespace EventBot
private ServiceProvider ConfigureServices()
{
return new ServiceCollection()
- .AddSingleton(s => new DiscordSocketClient(new DiscordSocketConfig() {
-#if DEBUG
- LogLevel = LogSeverity.Debug,
-#endif
- MessageCacheSize = 1500
- }))
+ .AddSingleton(s => new DiscordSocketClient(getDiscordSocketConfig()))
.AddSingleton()
.AddSingleton()
.AddSingleton()
@@ -69,5 +64,19 @@ namespace EventBot
//.AddSingleton()
.BuildServiceProvider();
}
+
+ private DiscordSocketConfig getDiscordSocketConfig()
+ {
+ var config = new DiscordSocketConfig()
+ {
+ MessageCacheSize = 1500
+ };
+#if DEBUG
+ config.LogLevel = LogSeverity.Debug;
+#endif
+ if(Environment.GetEnvironmentVariable("DEBUG") != null)
+ config.LogLevel = LogSeverity.Debug;
+ return config;
+ }
}
}