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:
parent
4d743b3e1b
commit
783b876e09
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue