From 42b8b1f6ba46cf2f2eab7a8e6c638e315681f54d Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 29 Nov 2014 05:02:11 +0000 Subject: [PATCH] like --- modules/words/words.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/words/words.js b/modules/words/words.js index 06c89a8..ecf3c13 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -65,10 +65,14 @@ var words = function(dbot) { if(!err && word) { this.wn.definitions(encodeURIComponent(word.word), function(err, defs) { if(!err && defs[0]) { - event.reply(dbot.t('def', { - 'word': word.word, - 'definition': defs[0].text - })); + if(!defs[0].match(/plural/i)) { + event.reply(dbot.t('def', { + 'word': word.word, + 'definition': defs[0].text + })); + } else { + this.commands['rw'](event); + } } else { event.reply(dbot.t('no_def', { 'word': query })); }