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-10-31 04:19:05 +00:00
parent d91c014b53
commit a45c578037

View File

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