diff --git a/systems/quote.rb b/systems/quote.rb index b417735..de1f09b 100644 --- a/systems/quote.rb +++ b/systems/quote.rb @@ -43,7 +43,7 @@ module QuoteSystem end command(:quotecategories, aliases: [:qc]) do |event, *message| - categories = db.execute("SELECT DISTINCT category FROM quotes") + categories = db.execute("SELECT category FROM quotes GROUP BY category ORDER BY COUNT(*) DESC;") event.channel.send_message("**Categories**: #{categories[0..].join(' ')}") nil end