mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
like
This commit is contained in:
parent
1a144c6459
commit
42b8b1f6ba
@ -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 }));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user