Update QuoteRepository.cs

This commit is contained in:
Shikhir Arora 2017-03-02 03:29:27 -05:00 committed by GitHub
parent 4dda0a24d7
commit 011b951a29

View File

@ -26,7 +26,8 @@ namespace NadekoBot.Services.Database.Repositories.Impl
public Task<Quote> SearchQuoteKeywordTextAsync(ulong guildId, string keyword, string text)
{
var rngk = new NadekoRandom();
return _set.Where(q => q.Text.Contains(text) && q.GuildId == guildId && q.Keyword == keyword).OrderBy(q => rngk.Next()).FirstOrDefaultAsync();
lowertext = text.toLowerInvariant();
return _set.Where(q => q.Text.Contains(text) || q.Text.Contains(lowertext) && q.GuildId == guildId && q.Keyword == keyword).OrderBy(q => rngk.Next()).FirstOrDefaultAsync();
}
}
}