Bot-side validation of command arguments #4884
Unanswered
Rodentman87
asked this question in
API Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Duplicate of #3510 ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, when submitting a command the only way for a bot to let the user know there was an issue with the command is responding the a message detailing the error (which is fine), however, this also clears the command input from the text box. This means the user has to either copy paste or retype everything manually. What I'm proposing is a new response type that shows an ephemeral message on the user's client alongside loading the command input back into the chat box. The response would include both a message as well as a list of option names that were invalid. The included option names would then be highlighted in red to show there was a validation error. This allows for custom validation by the bot without needing to run anything client side and makes the input experience for users better when correcting errors.
Alternatives Considered
Ephemeral messages work ok for showing an option was invalid, however, this still leaves the user needing to copy/paste or retype the whole command which can be difficulty especially for a command with lots of options.
Beta Was this translation helpful? Give feedback.
All reactions