Closed Tawmy closed 1 year ago
So it seems there is no way to validate user input. Hopefully an ephemeral can give the user some feedback without being all too distracting. It's not a great solution but it is the only one I can think of.
"Solution" (more like a workaround) has been implemented. When the user inputs invalid integer or decimal values, the bot now shows a more specific error like below.
Checks for QA:
Yes to everything.
Note: For time based configurations (Raid Time, Lockdown Duration, etc), I think it would be good for the end user to know what the value translates to - whether it's seconds, minutes, hours etc.
Thanks for the QA!
Note: For time based configurations (Raid Time, Lockdown Duration, etc), I think it would be good for the end user to know what the value translates to - whether it's seconds, minutes, hours etc.
I agree, this will be added in #15.
When using the /configure command and entering a value for an integer configuration option, the bot shows a modal with a text input (since that is the only kind of input it supports). This input allows the user to input any text, not just whole numbers like the integer field would require. When the user enters invalid text like "abc" and confirms the input, the modal loads for a few seconds, then shows a generic screenshot.
It is not possible to restrict the input to just numbers, so there needs to be a validation when the user submits the input.
Todo:
If they do:Validate input on submitInstead of generic error, show clear error about data type being wrong and show correct inputIf they do not:
The latter would not be great considering the user would only see it once they've closed the modal.