0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-27 21:53:05 +00:00

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

View file

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