3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 03:33:07 +01:00

fix thing

This commit is contained in:
reality 2013-04-13 18:37:47 +00:00
parent 234e84010c
commit a6ca9bb9c8

View File

@ -16,10 +16,14 @@ var imgur = function(dbot) {
if(imgData.title) {
info += imgData.title + ' is ';
}
if(imgData.animated) {
info += 'an animated ' + imgData.type.split('/')[1] + ' with ';
if(imgData.type) {
if(imgData.animated) {
info += 'an animated ' + imgData.type.split('/')[1] + ' with ';
} else {
info += 'a non-animated ' + imgData.type.split('/')[1] + ' with ';
}
} else {
info += 'a non-animated ' + imgData.type.split('/')[1] + ' with ';
info += 'an image with ';
}
info += imgData.views + ' views (';
info += imgData.width + 'x' + imgData.height + ')].';