0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-25 04:35:18 +00:00

You can run commands in the command channel or log channel

This commit is contained in:
TheUbMunster 2022-08-22 18:54:56 -06:00 committed by Sanae
parent 4d743b3e1b
commit 783b876e09

View file

@ -26,6 +26,8 @@ public class DiscordBot {
}); });
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)
Logger.Warn("You probably should set your LogChannel in settings.json");
if (Config.Token == null) return; if (Config.Token == null) return;
Settings.LoadHandler += SettingsLoadHandler; Settings.LoadHandler += SettingsLoadHandler;
} }
@ -103,7 +105,7 @@ public class DiscordBot {
if (args.Channel is DiscordDmChannel) if (args.Channel is DiscordDmChannel)
return; //no dm'ing the bot allowed! return; //no dm'ing the bot allowed!
} }
else if (args.Channel.Id != CommandChannel.Id) else if (args.Channel.Id != CommandChannel.Id && (LogChannel != null && args.Channel.Id != LogChannel.Id))
return; return;
//run command //run command
try { try {