diff --git a/src/Tgstation.Server.Api/Models/ChatBot.cs b/src/Tgstation.Server.Api/Models/ChatBot.cs index 716469fd6e..578e84446e 100644 --- a/src/Tgstation.Server.Api/Models/ChatBot.cs +++ b/src/Tgstation.Server.Api/Models/ChatBot.cs @@ -21,9 +21,9 @@ namespace Tgstation.Server.Api.Models switch (Provider) { case ChatProvider.Discord: - return Channels.Select(x => x.DiscordChannelId.HasValue && x.IrcChannel == null).All(x => x); + return Channels?.Select(x => x.DiscordChannelId.HasValue && x.IrcChannel == null).All(x => x) ?? true; case ChatProvider.Irc: - return Channels.Select(x => !x.DiscordChannelId.HasValue && x.IrcChannel != null).All(x => x); + return Channels?.Select(x => !x.DiscordChannelId.HasValue && x.IrcChannel != null).All(x => x) ?? true; default: throw new InvalidOperationException("Invalid provider type!"); }