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:
parent
bf2cff6eba
commit
451b7ea4d0
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user