0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-12 22:55:06 +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)
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;
}
@ -103,7 +105,7 @@ public class DiscordBot {
if (args.Channel is DiscordDmChannel)
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;
//run command
try {