mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
that might do it
This commit is contained in:
parent
2c988b0f77
commit
0efa8d0217
@ -80,9 +80,9 @@ var imgur = function(dbot) {
|
||||
dbot.db.imgur.totalHttpRequests += 1;
|
||||
var image = request(testUrl, function(error, response, body) {
|
||||
// 492 is body.length of a removed image
|
||||
var img = gm(body);
|
||||
gm(body).size(function(err, val) {
|
||||
if(!error && response.statusCode == 200 && body.length != 492 &&
|
||||
img.height > 300 && img.width > 300) {
|
||||
val && val.height > 300 && val.width > 300) {
|
||||
dbot.db.imgur.totalImages += 1;
|
||||
var hash = crypto.createHash('md5').update(body).digest("hex");
|
||||
if(_.has(dbot.modules, 'quotes')){
|
||||
@ -102,6 +102,7 @@ var imgur = function(dbot) {
|
||||
this.api.getRandomImage(callback);
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
'getImageInfoString': function(slug, callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user