3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00
This commit is contained in:
reality 2014-11-29 05:02:11 +00:00
parent 1a144c6459
commit 42b8b1f6ba

View File

@ -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 }));
}