Update QuoteRepository.cs
whoops xD
This commit is contained in:
parent
0a55c6f09c
commit
97b314d611
@ -26,8 +26,8 @@ namespace NadekoBot.Services.Database.Repositories.Impl
|
|||||||
public Task<Quote> SearchQuoteKeywordTextAsync(ulong guildId, string keyword, string text)
|
public Task<Quote> SearchQuoteKeywordTextAsync(ulong guildId, string keyword, string text)
|
||||||
{
|
{
|
||||||
var rngk = new NadekoRandom();
|
var rngk = new NadekoRandom();
|
||||||
lowertext = text.ToLowerInvariant();
|
string lowertext = text.ToLowerInvariant();
|
||||||
uppertext = text.ToUpperInvariant();
|
string uppertext = text.ToUpperInvariant();
|
||||||
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();
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user