only warn about the Discord channel settings when a Token is set

Servers that don't use Discord (default settings) don't need to be warned about not setting Discord channels.
This commit is contained in:
Robin C. Ladiges 2022-10-10 21:55:24 +02:00 committed by Sanae
parent 122a3cd80d
commit f0d837190a
1 changed files with 1 additions and 1 deletions

View File

@ -24,11 +24,11 @@ public class DiscordBot {
Task.Run(Reconnect);
return "Restarting Discord bot";
});
if (Config.Token == null) return;
if (Config.CommandChannel == null)
Logger.Warn("You probably should set your CommandChannel in settings.json");
if (Config.LogChannel == null)
Logger.Warn("You probably should set your LogChannel in settings.json");
if (Config.Token == null) return;
Settings.LoadHandler += SettingsLoadHandler;
}