-
-
Save AllGistsEqual/3cab2f122294044fa6cfd01ef7815c0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: src/index.js | |
bot.loadConfig = function loadConfig(config, callback) { | |
bot.log.info(`Checking for config file...`) | |
const configExists = fs.existsSync(this.configFile) | |
/* [ALPHA] | |
* If the file does not exist, create it | |
*/ | |
/* [BETA] | |
* Load the config file from the directory | |
*/ | |
/* [GAMMA] | |
* iterate over the given config, check all values and sanitise | |
*/ | |
/* [DELTA] | |
* write the changed/created config file to the directory | |
*/ | |
/* | |
* read the new file from the directory again | |
* - assign it to the bot's config | |
* - execute callback() or abort on error | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment