lets require that too

This commit is contained in:
Alex Grintsvayg 2016-07-13 16:48:11 -04:00
parent 002ae49089
commit cfbbba8e31

6
bot.js
View file

@ -7,6 +7,10 @@ var CHANNEL = process.env.CHANNEL;
if (!SLACK_TOKEN) {
throw new Error('SLACK_TOKEN env var required');
}
if (!CHANNEL) {
throw new Error('CHANNEL env var required');
}
var bot = new SlackBot({
token: SLACK_TOKEN,
@ -50,4 +54,4 @@ bot.on('start', function() {
// Post every hour
setInterval(getData, 3600000);
getData();
});
});