3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-26 20:52:39 +01:00
This commit is contained in:
reality 2014-10-31 04:21:33 +00:00
parent a45c578037
commit 0c8d0c8143

View File

@ -16,13 +16,15 @@ var words = function(dbot) {
'~like': function(event) {
var query = event.params[1];
this.wn.word(query, {}, function(err, word) {
if(!err && word) {
if(!err && word[0]) {
word.related({
'limit': 10
}, function(err, related) {
event.reply('Words related to ' + query + ': ' +
related[0].words.join(', ') + '.');
});
} else {
event.reply('Unknown word.');
}
});