Update QuoteRepository.cs
handle all standard cases (matches text that contains the exact, upper, or lowercase forms of the input text to search)
This commit is contained in:
parent
6773d1e86d
commit
72de465c34
@ -27,7 +27,8 @@ namespace NadekoBot.Services.Database.Repositories.Impl
|
||||
{
|
||||
var rngk = new NadekoRandom();
|
||||
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();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user