forked from GitHub/dbot
Cleaned up code based on feedback.
This commit is contained in:
parent
c3e569be41
commit
bf2cff6eba
@ -41,10 +41,8 @@ var link = function(dbot) {
|
|||||||
data = JSON.parse(body);
|
data = JSON.parse(body);
|
||||||
comicId = data.num;
|
comicId = data.num;
|
||||||
comicId = (Math.floor(Math.random() * comicId) + 1);
|
comicId = (Math.floor(Math.random() * comicId) + 1);
|
||||||
event.message = '~xkcd ' + comicId;
|
event.params[1] = comicId;
|
||||||
event.action = 'PRIVMSG';
|
dbot.commands['~xkcd'](event);
|
||||||
event.params = event.message.split(' ');
|
|
||||||
dbot.instance.emit(event);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else {
|
}else {
|
||||||
|
Loading…
Reference in New Issue
Block a user