mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added more error-messages on crashing because of missing files. Closes #227
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
var path = require('path');
|
||||
var time_regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/;
|
||||
var key = require(path.join(__dirname, '../config/api_key.js'));
|
||||
try {
|
||||
var key = require(path.join(__dirname, '../config/api_key.js'));
|
||||
} catch(e) {
|
||||
console.log("Error - missing file");
|
||||
console.log("Seems you forgot to create the file api_key.js in /server/config/. Have a look at api_key.example.js.");
|
||||
process.exit();
|
||||
}
|
||||
|
||||
function get_correct_info(song_generated, channel, broadcast) {
|
||||
request({
|
||||
|
||||
Reference in New Issue
Block a user