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

Cleaned up link slightly.

This commit is contained in:
Daniel Dowling 2013-01-31 15:53:45 +00:00
parent bf2cff6eba
commit 451b7ea4d0

View File

@ -39,9 +39,7 @@ var link = function(dbot) {
request("http://xkcd.com/info.0.json", function(error, response, body){
if (response.statusCode == "200") {
data = JSON.parse(body);
comicId = data.num;
comicId = (Math.floor(Math.random() * comicId) + 1);
event.params[1] = comicId;
event.params[1] = (Math.floor(Math.random() * data.num) + 1);
dbot.commands['~xkcd'](event);
}
});