I wrote this originally just for myself as .toJSON wrapper for Vencord, but I decided to make documentation and stabalize it for others.
I am sure its not perfect, so please leave issues, and comment any concerns.
Regarding your implied question here:
instead of using lib.types.str
you can use lib.types.enum
to restrict the values that can be provided for an option. It’s mentioned here and the page also has examples of its usage.
Freeform submodules could also help with cleaning up the config
/extraConfig
duplication, described here.
Thanks! I’ll definitely replace several string fields with enum ones.
This still doesn’t fix the larger issue though which is that all enum values need to map to an arbitrary int value set by the Vencord plugin author. It does help prevent users from inputting different values though which is great.
This will also make documentation more clear if I ever generate docs from source code.
This is now done ^