From e6e4f17eee3e3fdbb4bae6b9a4772fdb54dfcb8a Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 22 Dec 2016 06:41:37 +0100 Subject: [PATCH] .announce fix? --- src/NadekoBot/Modules/Administration/Administration.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 196aaea5..673d4ae6 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -615,7 +615,9 @@ namespace NadekoBot.Modules.Administration g.GetDefaultChannelAsync() )).ConfigureAwait(false); - await Task.WhenAll(channels.Select(c => c.SendConfirmAsync($"🆕 Message from {umsg.Author} `[Bot Owner]`:", message))) + if (channels == null) + return; + await Task.WhenAll(channels.Where(c => c != null).Select(c => c.SendConfirmAsync($"🆕 Message from {umsg.Author} `[Bot Owner]`:", message))) .ConfigureAwait(false); await umsg.Channel.SendConfirmAsync("🆗").ConfigureAwait(false);