First, install Node.js. Then, install the latest Botonic command-line tools in your terminal. Windows is not supported yet.
Create a new bot from the tutorial template. Botonic will automatically scaffold the project structure, install all the required dependencies and make the first build.
Feel free to browse through the files and read the code, we've included lots of comments so you can understand what every piece of code does.
Start an interactive chat session in your terminal. Type "start" and follow the dialog with the bot, it will teach you some basic concepts. When you're done exit with /q or Ctrl+C.
Now we're going to make the chatbot answer to the input "What time is it?".
Edit the file botonic.config.js and add a new rule in the "routes" array. The code in the right side shows how to map any input whose text matches a regular expression with an action. In this case, we're mapping all inputs that contain the word "time" to an action that we'll create in the next step.
Actions are just React components in the folder src/actions. Create a new file time.js there and copy the code on the left. You'll notice that components don't output regular HTML but RCML (Rich Conversational Markup Language), a language that unifies all the different types of messages you can send on messaging apps like Facebook Messenger, Telegram, etc.
Now you can execute botonic run again and ask your bot "what time is it?".
Upload your bot to hubtype.com cloud. You can create an account right from the terminal. Then enter a name for your bot and that's it, your bot will be deployed in a few seconds!
Log in to Hubtype's dashboard and integrate a messenger like Telegram or Facebook Messenger so that users can reach you.