modify ;quotecategories command to order by the ammount of quotes a category has
This commit is contained in:
parent
19b4c97134
commit
48cb0bf8e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user