Remove exception if no config exists

This commit is contained in:
Noikoio 2018-03-18 12:23:51 -07:00
parent 6e4348d0d5
commit 3e73be2048

View file

@ -51,10 +51,7 @@ namespace Noikoio.RegexBot
protected object GetConfig(ulong guildId)
{
var sc = RegexBot.Config.Servers.FirstOrDefault(g => g.Id == guildId);
if (sc == null)
{
throw new ArgumentException("There is no known configuration associated with the given Guild ID.");
}
if (sc == null) return null;
if (sc.ModuleConfigs.TryGetValue(this, out var item)) return item;
else return null;