3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

Merge branch 'master' of github.com:reality/dbot

This commit is contained in:
reality 2014-12-03 04:16:45 +00:00
commit 36b41156a5

View File

@ -65,18 +65,18 @@ var words = function(dbot) {
if(!err && word) { if(!err && word) {
this.wn.definitions(encodeURIComponent(word.word), function(err, defs) { this.wn.definitions(encodeURIComponent(word.word), function(err, defs) {
if(!err && defs[0]) { if(!err && defs[0]) {
if(!String(defs[0]).match(/plural/i)) { if(!defs[0].text.match(/plural/i) && !defs[0].text.match(/participle/i)) {
event.reply(dbot.t('def', { event.reply(dbot.t('def', {
'word': word.word, 'word': word.word,
'definition': defs[0].text 'definition': defs[0].text
})); }));
} else { } else {
this.commands['rw'](event); dbot.commands['rw'](event);
} }
} else { } else {
event.reply(dbot.t('no_def', { 'word': query })); event.reply(dbot.t('no_def', { 'word': query }));
} }
}); }.bind(this));
} }
}.bind(this)); }.bind(this));
}, },