Named options for MSC4332 In-room bot commands #4338
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I don't believe it is sensible to allow freedom in the
body
representation of a command in regards to how options look. We already have to make some decisions we are imposing on bots (that options can only appear once). https://github.com/matrix-org/matrix-spec-proposals/pull/4332/files#r2313755345It is possible to attempt this via a pathway of adding a special variadic argument for options that allows freedom in how options are represented, but not their position in the command1. But by doing so we would remove the ability for the client to structurally understand options and set them individually, defeating the purpose of the MSC.
Signed-off-by: Gnuxie [email protected]
Footnotes
This restriction on position will break compatibility with a bot. And i raise it specifically because i no longer think we should design the command description system with
body
as a fallback for backwards compatibility with existing bots. Because it is requiring to make poor decisions. ↩