All of these "interfaces" kind of suck, frankly. They were written in essentially one sitting each as a schlocky proof-of-concept to get some kind of formatted output for these commands on Discord. Some of it is on the right track, but overall they need to be cleaned up; some vastly more than others (cancel).
In general, these structured "Result" objects should be more tightly designed, not a mix of namedtuples and dataclasses, and defined in one place. I feel that refactoring CommandHelp will trigger or coincide with a refactor of Command objects in general.
The core_command_* callbacks could probably even be squashed into one generic core_command event handler with the command name as a parameter, similar to core events.
All of these "interfaces" kind of suck, frankly. They were written in essentially one sitting each as a schlocky proof-of-concept to get some kind of formatted output for these commands on Discord. Some of it is on the right track, but overall they need to be cleaned up; some vastly more than others (
cancel
).In general, these structured "Result" objects should be more tightly designed, not a mix of namedtuples and dataclasses, and defined in one place. I feel that refactoring
CommandHelp
will trigger or coincide with a refactor of Command objects in general.The
core_command_*
callbacks could probably even be squashed into one genericcore_command
event handler with the command name as a parameter, similar to core events.