From 908df9d77393d79450d6311df5e0904c7355951c Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 2 Jan 2017 12:06:51 +0100 Subject: [PATCH] Fixed ~hentaibomb error --- src/NadekoBot/Modules/NSFW/NSFW.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/NSFW/NSFW.cs b/src/NadekoBot/Modules/NSFW/NSFW.cs index 4c4ce138..aed0b42b 100644 --- a/src/NadekoBot/Modules/NSFW/NSFW.cs +++ b/src/NadekoBot/Modules/NSFW/NSFW.cs @@ -114,13 +114,14 @@ namespace NadekoBot.Modules.NSFW GetKonachanImageLink(tag), GetYandereImageLink(tag)).ConfigureAwait(false); - if (links.All(l => l == null)) + var linksEnum = links.Where(l => l != null); + if (!linksEnum.Any()) { await channel.SendErrorAsync("No results found.").ConfigureAwait(false); return; } - await channel.SendMessageAsync(String.Join("\n\n", links)).ConfigureAwait(false); + await channel.SendMessageAsync(String.Join("\n\n", linksEnum)).ConfigureAwait(false); }