Add documentation about loading config values programmatically
parent
8dd6513ca3
commit
5d71312788
|
@ -1,7 +1,7 @@
|
|||
# Changelog
|
||||
|
||||
## v2.29.0
|
||||
* **Change default configuration format to .ini**
|
||||
* **Default configuration format is now .ini**
|
||||
* Existing `config.json` files will continue to work and will not be deprecated
|
||||
* This makes the default configuration format for the bot much more approachable than JSON
|
||||
* Config values can now also be loaded from environment variables
|
||||
|
|
|
@ -7,6 +7,7 @@ Haven't set up the bot yet? Check out [Setting up the bot](setup.md) first!
|
|||
- [Required options](#required-options)
|
||||
- [Other options](#other-options)
|
||||
- [config.ini vs config.json](#configini-vs-configjson)
|
||||
- [Other formats](#other-formats)
|
||||
- [Environment variables](#environment-variables)
|
||||
|
||||
## Configuration file
|
||||
|
@ -315,6 +316,11 @@ This is the second line of the greeting."
|
|||
}
|
||||
```
|
||||
|
||||
## Other formats
|
||||
Loading config values programmatically is also supported.
|
||||
Create a `config.js` in the bot's folder and export the config object with `module.exports`.
|
||||
All other configuration files take precedence, so make sure you don't have both.
|
||||
|
||||
## Environment variables
|
||||
Config options can be passed via environment variables.
|
||||
|
||||
|
|
Loading…
Reference in New Issue