Created
July 28, 2017 10:06
-
-
Save jazzedge/b2d4b7958e05413806a6580645322c16 to your computer and use it in GitHub Desktop.
Bot - Set default error messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //See: https://stackoverflow.com/questions/40437773/how-do-i-define-the-default-behaviors-of-a-bot-in-node-js | |
| To change the default error messages, we can simply add a file called 'BotBuilder.json' inside the folder | |
| BotProject/locale/<languageCode>/BotBuilder.json | |
| So the file contains the text message which override the default error as follows: | |
| { | |
| "default_text": "I didn't understand. Please try again.", | |
| "default_number": "I didn't recognize that as a number. Please enter a number.", | |
| "default_confirm": "I didn't understand. Please answer 'yes' or 'no'.", | |
| "default_choice": "I didn't understand. Please choose an option from the list.", | |
| "default_time": "I didn't recognize the time you entered. Please try again using a format of (MM/DD/YYYY HH:MM:SS).", | |
| "default_file": "I didn't receive a file. Please try again.", | |
| "default_error": "Oops. Something went wrong and we need to start over." | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment