mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
Added check for params[1] to ~xkcd
This commit is contained in:
parent
451b7ea4d0
commit
4b7c2092b0
@ -34,7 +34,10 @@ var link = function(dbot) {
|
||||
},
|
||||
|
||||
'~xkcd': function(event) {
|
||||
var comicId = event.params[1];
|
||||
var comicId;
|
||||
if(!_.isUndefined(event.params[1])) {
|
||||
comicId = event.params[1];
|
||||
}
|
||||
if(comicId == "*"){
|
||||
request("http://xkcd.com/info.0.json", function(error, response, body){
|
||||
if (response.statusCode == "200") {
|
||||
@ -59,6 +62,7 @@ var link = function(dbot) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
'~ud': function(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user