Remove exception if no config exists
This commit is contained in:
parent
6e4348d0d5
commit
3e73be2048
1 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue