public bool CanRun(Command command, User user, ITextChannel channel, out string error) { if (_filterType == ModuleFilter.None || _filterType == ModuleFilter.AlwaysAllowPrivate || (channel.IsPublic && _manager.HasChannel(channel))) { error = null; return(true); } else { error = "This module is currently disabled."; return(false); } }
public bool CanRun(Command command, User user, Channel channel, out string error) { if (_filterType == FilterType.Unrestricted || _filterType == FilterType.AllowPrivate || _manager.HasChannel(channel)) { error = null; return(true); } else { error = "This module is currently disabled."; return(false); } }