3
0
mirror of https://github.com/reality/dbot.git synced 2025-01-11 20:42:37 +01:00

fix for not found

This commit is contained in:
reality 2013-08-25 19:04:42 +00:00
parent 760780537a
commit ab9cfb1469
2 changed files with 8 additions and 3 deletions

View File

@ -179,12 +179,14 @@ var imgur = function(dbot) {
'q': term
}
}, function(err, response, body) {
if(body.data) {
if(body.data && body.data[0] != undefined) {
this.api.getGalleryInfo(body.data[0].id, function(gal) {
event.reply(dbot.t('imgurinfo', {
'info': this.internalAPI.galleryInfoString(gal)
}) + ' - ' + gal.data.link);
}.bind(this));
} else {
event.reply(dbot.t('imgur_noresults'));
}
}.bind(this));
}

View File

@ -12,5 +12,8 @@
"en": "[{info}]",
"fr": "[{info}]",
"it": "[{info}]"
},
"imgur_noresults": {
"en": "No results found."
}
}