From 3e73be2048ba5248bcf29d423d0adac4ee6c3a3d Mon Sep 17 00:00:00 2001 From: Noikoio Date: Sun, 18 Mar 2018 12:23:51 -0700 Subject: [PATCH] Remove exception if no config exists --- BotModule.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/BotModule.cs b/BotModule.cs index e0e5fd5..6e1540c 100644 --- a/BotModule.cs +++ b/BotModule.cs @@ -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;