mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
what if i specifically ask for json
This commit is contained in:
parent
6817c4568b
commit
2ae2b427b0
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user