mirror of
https://github.com/reality/dbot.git
synced 2024-11-30 16:09:27 +01:00
like
This commit is contained in:
parent
1a144c6459
commit
42b8b1f6ba
@ -65,10 +65,14 @@ 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(!defs[0].match(/plural/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 {
|
||||||
|
this.commands['rw'](event);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
event.reply(dbot.t('no_def', { 'word': query }));
|
event.reply(dbot.t('no_def', { 'word': query }));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user