Skip to content

Commit

Permalink
Merge pull request #81 from codywill/master
Browse files Browse the repository at this point in the history
Added path module, updated config capture mechanism
  • Loading branch information
ryzokuken authored Oct 7, 2017
2 parents 7d43702 + ca5f4b1 commit 8b456f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"express": "^4.15.4",
"github": "^9.2.0",
"irc": "^0.5.2",
"path": "^0.12.7",
"readline": "^1.3.0"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ const state = {
offsetTime: 1000
};

const path = require('path');
const greetBehavior = require('./behaviors/greet');
const helpBehavior = require('./behaviors/help').helpBehavior;
const ftoBehavior = require('./behaviors/fto')(state);
const heatBehavior = require('./behaviors/heat');
const unresponsiveBehavior = require('./behaviors/unresponsive')(state);

// Read file synchronously because we'd need this object in later steps anyway.
const config = JSON.parse(fs.readFileSync('../config.json', 'utf8'));
const configFile = path.join(__dirname, '../', 'config.json');
const config = JSON.parse(fs.readFileSync(configFile, 'utf8'));

let client;
if (process.env.TEST) {
Expand Down

0 comments on commit 8b456f0

Please sign in to comment.