etymology

This commit is contained in:
reality 2013-12-27 16:24:16 +00:00
parent 18780b59b0
commit 563a9adaf9

View File

@ -12,6 +12,17 @@ var words = function(dbot) {
}
});
},
'~etymology': function(event) {
var query = event.params[1];
this.wn.etymologies(encodeURIComponent(query), function(err, defs) {
if(!err && defs[0]) {
event.reply(query + ' etymology: ' + defs[0].text);
} else {
event.reply('No etymology found for ' + query);
}
});
},
'~jimble': function(event) {
event.reply(event.params[1].split('').sort(function() {