From 0b5055262388af9468e2dd632fa92a56ffdafb6a Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Tue, 29 Nov 2011 13:18:59 +0000 Subject: [PATCH] total quote count --- modules/quotes.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/quotes.js b/modules/quotes.js index d7225f2..af0983b 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -89,6 +89,12 @@ var quotes = function(dbot) { } else { dbot.say(data.channel, 'No quotes under ' + q[1]); } + } else { // Give total quote count + var totalQuoteCount = 0; + for(var category in dbot.db.quotes) { + totalQuoteCount += category.length; + } + dbot.say(data.channel, 'There are ' + totalQuoteCount + ' quotes in total.'); } },