3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

what if i specifically ask for json

This commit is contained in:
reality 2013-12-27 16:38:59 +00:00
parent 6817c4568b
commit 2ae2b427b0

View File

@ -15,7 +15,9 @@ var words = function(dbot) {
'~etymology': function(event) { '~etymology': function(event) {
var query = event.params[1]; var query = event.params[1];
this.wn.etymologies(encodeURIComponent(query), function(err, defs) { this.wn.etymologies(encodeURIComponent(query), {
'format': 'json'
}, function(err, defs) {
if(!err && defs[0]) { if(!err && defs[0]) {
event.reply(query + ' etymology: ' + defs[0]); event.reply(query + ' etymology: ' + defs[0]);
} else { } else {