mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 11:42:36 +01:00
fix for not found
This commit is contained in:
parent
760780537a
commit
ab9cfb1469
@ -179,12 +179,14 @@ var imgur = function(dbot) {
|
|||||||
'q': term
|
'q': term
|
||||||
}
|
}
|
||||||
}, function(err, response, body) {
|
}, function(err, response, body) {
|
||||||
if(body.data) {
|
if(body.data && body.data[0] != undefined) {
|
||||||
this.api.getGalleryInfo(body.data[0].id, function(gal) {
|
this.api.getGalleryInfo(body.data[0].id, function(gal) {
|
||||||
event.reply(dbot.t('imgurinfo', {
|
event.reply(dbot.t('imgurinfo', {
|
||||||
'info': this.internalAPI.galleryInfoString(gal)
|
'info': this.internalAPI.galleryInfoString(gal)
|
||||||
}) + ' - ' + gal.data.link);
|
}) + ' - ' + gal.data.link);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
} else {
|
||||||
|
event.reply(dbot.t('imgur_noresults'));
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,14 @@
|
|||||||
"nl": "bevat mogelijk gevoelige beelden",
|
"nl": "bevat mogelijk gevoelige beelden",
|
||||||
"de": "Könnte 18+ Material enthalten",
|
"de": "Könnte 18+ Material enthalten",
|
||||||
"fr": "peut être risqué pour le travail (NSFW)",
|
"fr": "peut être risqué pour le travail (NSFW)",
|
||||||
"it": "può essere rischioso al lavoro (NSFW)"
|
"it": "può essere rischioso al lavoro (NSFW)"
|
||||||
},
|
},
|
||||||
"imgurinfo": {
|
"imgurinfo": {
|
||||||
"en": "[{info}]",
|
"en": "[{info}]",
|
||||||
"fr": "[{info}]",
|
"fr": "[{info}]",
|
||||||
"it": "[{info}]"
|
"it": "[{info}]"
|
||||||
|
},
|
||||||
|
"imgur_noresults": {
|
||||||
|
"en": "No results found."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user