forked from GitHub/dbot
like
This commit is contained in:
parent
a45c578037
commit
0c8d0c8143
@ -16,13 +16,15 @@ var words = function(dbot) {
|
|||||||
'~like': function(event) {
|
'~like': function(event) {
|
||||||
var query = event.params[1];
|
var query = event.params[1];
|
||||||
this.wn.word(query, {}, function(err, word) {
|
this.wn.word(query, {}, function(err, word) {
|
||||||
if(!err && word) {
|
if(!err && word[0]) {
|
||||||
word.related({
|
word.related({
|
||||||
'limit': 10
|
'limit': 10
|
||||||
}, function(err, related) {
|
}, function(err, related) {
|
||||||
event.reply('Words related to ' + query + ': ' +
|
event.reply('Words related to ' + query + ': ' +
|
||||||
related[0].words.join(', ') + '.');
|
related[0].words.join(', ') + '.');
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
event.reply('Unknown word.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user