.listquotes now shows this server's quotes
This commit is contained in:
		@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            IEnumerable<Quote> quotes;
 | 
			
		||||
            using (var uow = DbHandler.UnitOfWork())
 | 
			
		||||
            {
 | 
			
		||||
                quotes = uow.Quotes.GetGroup(page * 16, 16);
 | 
			
		||||
                quotes = uow.Quotes.GetGroup(channel.Guild.Id, page * 16, 16);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (quotes.Any())
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,6 @@ namespace NadekoBot.Services.Database.Repositories
 | 
			
		||||
    {
 | 
			
		||||
        IEnumerable<Quote> GetAllQuotesByKeyword(ulong guildId, string keyword);
 | 
			
		||||
        Task<Quote> GetRandomQuoteByKeywordAsync(ulong guildId, string keyword);
 | 
			
		||||
        IEnumerable<Quote> GetGroup(int skip, int take);
 | 
			
		||||
        IEnumerable<Quote> GetGroup(ulong guildId, int skip, int take);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -15,8 +15,8 @@ namespace NadekoBot.Services.Database.Repositories.Impl
 | 
			
		||||
        public IEnumerable<Quote> GetAllQuotesByKeyword(ulong guildId, string keyword) => 
 | 
			
		||||
            _set.Where(q => q.GuildId == guildId && q.Keyword == keyword);
 | 
			
		||||
 | 
			
		||||
        public IEnumerable<Quote> GetGroup(int skip, int take) => 
 | 
			
		||||
            _set.OrderBy(q => q.Keyword).Skip(skip).Take(take).ToList();
 | 
			
		||||
        public IEnumerable<Quote> GetGroup(ulong guildId, int skip, int take) => 
 | 
			
		||||
            _set.Where(q=>q.GuildId == guildId).OrderBy(q => q.Keyword).Skip(skip).Take(take).ToList();
 | 
			
		||||
 | 
			
		||||
        public Task<Quote> GetRandomQuoteByKeywordAsync(ulong guildId, string keyword)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user