mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
etymology
This commit is contained in:
parent
18780b59b0
commit
563a9adaf9
@ -13,6 +13,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() {
|
||||
return (Math.round(Math.random()) - 0.5);
|
||||
|
Loading…
Reference in New Issue
Block a user