From 62871dc80e47486095613ff7a8d5a39e38a4a8ed Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 8 Jul 2013 11:02:27 +0000 Subject: [PATCH] jimble command --- modules/words/words.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/words/words.js b/modules/words/words.js index eac90b0..d26a648 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -11,8 +11,15 @@ var words = function(dbot) { event.reply('No definitions found for ' + query); } }); - } + }, + + '~jimble': function(event) { + event.reply(event.params[1].split('').sort(function() { + return (Math.round(Math.random()) - 0.5); + }).join('')); + } }; + this.commands['~jimble'].regex = [/^~jimble (.+)$/, 2]; this.onLoad = function() { this.wn = new Wordnik({