From 0a55c6f09c05b0f152684b4d33368a3572b0b0ed Mon Sep 17 00:00:00 2001 From: Shikhir Arora Date: Thu, 2 Mar 2017 04:09:12 -0500 Subject: [PATCH] Update QuoteRepository.cs syntax cleanup --- .../Services/Database/Repositories/Impl/QuoteRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs index fff61d22..26639165 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs @@ -28,7 +28,7 @@ namespace NadekoBot.Services.Database.Repositories.Impl var rngk = new NadekoRandom(); lowertext = text.ToLowerInvariant(); uppertext = text.ToUpperInvariant(); - return _set.Where(q => q.Text.Contains(text) || q.Text.Contains(lowertext) || q.Text.Contains(uppertext) && q.GuildId == guildId && q.Keyword == keyword).OrderBy(q => rngk.Next()).FirstOrDefaultAsync(); + return _set.Where(q => q.GuildId == guildId && q.Keyword == keyword && (q.Text.Contains(text) || q.Text.Contains(lowertext) || q.Text.Contains(uppertext))).OrderBy(q => rngk.Next()).FirstOrDefaultAsync(); } } }