.announce fix?

This commit is contained in:
Kwoth committed 2016-12-22 06:41:37 +01:00
1 parent 935d43f04f
commit e6e4f17eee
1 file changed
+3 -1
@@ -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);