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
1 changed files with 3 additions and 1 deletions

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 {