lets require that too

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

4
bot.js
View file

@ -7,6 +7,10 @@ var CHANNEL = process.env.CHANNEL;
if (!SLACK_TOKEN) { if (!SLACK_TOKEN) {
throw new Error('SLACK_TOKEN env var required'); throw new Error('SLACK_TOKEN env var required');
} }
if (!CHANNEL) {
throw new Error('CHANNEL env var required');
}
var bot = new SlackBot({ var bot = new SlackBot({
token: SLACK_TOKEN, token: SLACK_TOKEN,