- moved the discord token and youtube api key to ` api.botToken` and `api.youTubeApiKey` in the `config.json` file
- added `lib.utils.ConfigChecker` class to check for missing required attributes in the config
- Updated README to new circumstances
The arguments are optional because the token and youtube-api-key that the bot needs to run can also be defined in the config.json in the bot's directory:
```json5
// config.json
{
"prefix": "_",
"token": "DISCORD BOT TOKEN",
"ytapikey": "YOUTUBE API KEY",
"presence": "THE DEFAULT GAME IF NO presences.txt IS FOUND IN ./data/",
"presence_duration": 300000,
"presence": "STRING", // this will be shown when no presences are set in data/presences.txt
"presence_duration": 300000, // how long does the bot have one presence
"api": {
"botToken": "YOUR DISCORD BOT TOKEN",
"youTubeApiKey": "YOUR YOUTUBE API KEY"
},
"owners": [
"SPECIFY A LIST OF BOT-OWNERS"
"DISCORD NAME" // specify a list of bot owners that can use the owner commands
],
"music": {
"timeout": 300000
@ -23,6 +25,17 @@ The arguments are optional because the token and youtube-api-key that the bot ne
}
```
If the keys are missing from the config file, the bot exits. This behaviour can be deactivated by setting the `-i` commandline flag.