twilight
twilight copied to clipboard
refactor(model)!: flatten `CommandOption`
- Simplifies and fixes errors in
CommandOption
{de,}serialization by delegating to the derive implementation. - Removes duplicated shared fields for
CommandOption
andCommandOptionChocie
variants. - Documents all public fields.
- Added a note in the
command
module recommending users to use theCommandBuilder
. -
CommandBuilder
retains its API, but is internally more complicated.
Overall this PR reduces internal complexity by a lot.
I also want to improve Command
's documentation to be like CommandOption
's, but I think that should be in a separate PR as this PR is already big enough.
Should a follow-up PR be created to sync (duplicate) the docs on CommandOption
to the builders in util::builder::command
? Perhaps it's easier to cross link to the model docs (as the docs would otherwise risk getting out of sync)?
I think it would be good to just link to the docs in a follow up, yes
@Erk- PTAL