mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
imgur better
This commit is contained in:
parent
88037de55e
commit
d82108de83
@ -11,7 +11,7 @@ var imgur = function(dbot) {
|
|||||||
'getRandomImage': function(callback) {
|
'getRandomImage': function(callback) {
|
||||||
var testUrl = 'http://i.imgur.com/' +
|
var testUrl = 'http://i.imgur.com/' +
|
||||||
Math.random().toString(36).substr(2,6) +
|
Math.random().toString(36).substr(2,6) +
|
||||||
'.jpg';
|
'.png';
|
||||||
var image = request(testUrl, function(error, response, body) {
|
var image = request(testUrl, function(error, response, body) {
|
||||||
// 492 is body.length of a removed image
|
// 492 is body.length of a removed image
|
||||||
if(!error && response.statusCode == 200 && body.length != 492) {
|
if(!error && response.statusCode == 200 && body.length != 492) {
|
||||||
|
Loading…
Reference in New Issue
Block a user