Open HassanAbouelela opened 2 years ago
This is way beyond the scope of what this script is for. It's meant to be run using the specific layouts I specified. If anything, this would generate the config.yaml
and you just add on the relevant extra stuff you need. This wouldn't require you to add anything back. The config-default.yaml
stuff would still apply. You only would need to add what you're modifying. So there shouldn't be any additional moving by hand stuff.
Unless I'm misunderstanding.
We do use variables for roles and channels at the very least, so it would mean you'd need to modify the output of the script by hand to include those variables.
You'd also need to copy across other stuff that needs to be modified and modify it (such as the variables for the site API I linked in the original message). This would also mean having to maintain a fourth unrelated list of variables that aren't in the auto-guild config, but you need to add by hand.
The YAML library allows you to add arbitrary constructors, and use variables which are parsed at runtime in your config. Here are a few examples:
https://github.com/python-discord/bot/blob/b91820a30af9dcae0c1952432639661889c74970/config-default.yml#L360-L362
https://github.com/python-discord/bot/blob/b91820a30af9dcae0c1952432639661889c74970/config-default.yml#L369-L372
These are currently unsupported by the tool, as it'll error on the unknown constructors, and won't carry variables across. This is problematic as it means end users will have to modify their configs by hand at the end to add the variables back, and config makers can't use any constructors.
I see a few possible options here:
Constructors, representers, resolvers
.