Is your feature request related to a problem? Please describe.
Right now, if we want to change a token we would have to stop the bot, change the json manually and start the bot again, losing the queue and what's currently playing. For some services, this token can expire often, so it can be a hassle.
Describe the solution you'd like
Some commands to change certain elements from the configuration json and reload it without having to reboot the bot manually. It should have some kind of permission logic so that only certain users can use these commands.
Extra details
This issue will be used also to migrate the config.json file if it isn't fully updated. We should notify the user (via the Logger) that the config file is being migrated.
Also, we need to add some logic, like preserving the data on the config file and appending the new config added in order to make the json file valid again.
Also, we should have more logic in order to check if a new config, like "enabled": false added on the new version but the old version didn't have that enabled field, and the rest of fields of that class is populated, then we should add that enabled as true.
If a section is removed, and it was configured on the original config.json, we will remove this section entirely, as this isn't being supported anymore.
In any case, we will make a copy of the current config.json file, before being migrated, just in case something fails we won't remove the current working file. We will name it "config-.json" and move it to "archive" folder.
Finally, we should change some fields of the current configuration:
- "kokoro" class should have an "enable" field, in order to enable or disable this service.
- Update the following template values to valid ones:
- "default_voice" from "" to "am_santa"
- "default_lang_code" from "" to "en"
- remove the entire "hugging_chat" section.
Is your feature request related to a problem? Please describe.
Right now, if we want to change a token we would have to stop the bot, change the json manually and start the bot again, losing the queue and what's currently playing. For some services, this token can expire often, so it can be a hassle.
Describe the solution you'd like
Some commands to change certain elements from the configuration json and reload it without having to reboot the bot manually. It should have some kind of permission logic so that only certain users can use these commands.
Extra details
This issue will be used also to migrate the config.json file if it isn't fully updated. We should notify the user (via the Logger) that the config file is being migrated.
Also, we need to add some logic, like preserving the data on the config file and appending the new config added in order to make the json file valid again.
Also, we should have more logic in order to check if a new config, like "enabled": false added on the new version but the old version didn't have that enabled field, and the rest of fields of that class is populated, then we should add that enabled as true.
If a section is removed, and it was configured on the original config.json, we will remove this section entirely, as this isn't being supported anymore.
In any case, we will make a copy of the current config.json file, before being migrated, just in case something fails we won't remove the current working file. We will name it "config-.json" and move it to "archive" folder.
Finally, we should change some fields of the current configuration: