forked from GitHub/dbot
Cleaned up link slightly.
This commit is contained in:
parent
bf2cff6eba
commit
451b7ea4d0
@ -39,9 +39,7 @@ var link = function(dbot) {
|
|||||||
request("http://xkcd.com/info.0.json", function(error, response, body){
|
request("http://xkcd.com/info.0.json", function(error, response, body){
|
||||||
if (response.statusCode == "200") {
|
if (response.statusCode == "200") {
|
||||||
data = JSON.parse(body);
|
data = JSON.parse(body);
|
||||||
comicId = data.num;
|
event.params[1] = (Math.floor(Math.random() * data.num) + 1);
|
||||||
comicId = (Math.floor(Math.random() * comicId) + 1);
|
|
||||||
event.params[1] = comicId;
|
|
||||||
dbot.commands['~xkcd'](event);
|
dbot.commands['~xkcd'](event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user