diff --git a/index.js b/index.js index ac30e9a..fdbbea1 100755 --- a/index.js +++ b/index.js @@ -7,6 +7,10 @@ let Parser = require('rss-parser'); let parser = new Parser(); const xmpp = require('simple-xmpp'); +try { + fs.readFileSync('./config.ini', 'utf-8'); + + const config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')); const api_pass = config.api_pass; const api_url = config.api_url; @@ -266,3 +270,6 @@ xmpp.connect({ // Checks the XMPP server for new 'friend' requests console.log(xmpp.getRoster()); +} catch(e) { + console.log("Please create a config.ini"); +} \ No newline at end of file