Package: bothub-cli
This package provides command line interface toBothub.studioservice.InstallationTo install bothub-cli:$ pip install bothub-clior, if you are not installing in avirtualenv:$ sudo pip install bothub-cliThe bothub-cli package works on python2 and 3 both.Getting StartedBefore using bothub-cli, you need to tell it about yourBothub.studiocredentials.$bothubconfigureUsername:myuserPassword:mysecretThen it stores access token on~/.bothubdirectory.To start build a new bot:$mkdirmybot$cdmybot$bothubinitProjectname:mybotNow you have a starter echo bot:.
|-- bothub
|   |-- bot.py
|   `-- __init__.py
|-- bothub.yml
|-- requirements.txt
`-- testsEdit bot.py below for your purpose.# -*- coding: utf-8 -*-from__future__import(absolute_import,division,print_function,unicode_literals)frombothub_client.botimportBaseBotfrombothub_client.decoratorsimportchannelclassBot(BaseBot):"""Represent a Bot logic which interacts with a user.

    BaseBot superclass have methods belows:

    * Send message
      * self.send_message(message, chat_id=None, channel=None)
    * Data Storage
      * self.set_project_data(data)
      * self.get_project_data()
      * self.set_user_data(data, user_id=None, channel=None)
      * self.get_user_data(user_id=None, channel=None)
    * Channel Handler
      from bothub_client.decorators import channel
      @channel('<channel_name>')
      def channel_handler(self, event, context):
        # Handle a specific channel message
    * Command Handler
      from bothub_client.decorators import command
      @command('<command_name>')
      def command_handler(self, event, context, args):
          # Handle a command('/<command_name>')
    * Intent Handler
      from bothub_client.decorators import intent
      @intent('<intent_id>')
      def intent_result_handler(self, event, context, answers):
          # Handle a intent result
          # answers is a dict and contains intent's input data
            {
              "<intent slot id>" : <entered slot value>
              ...
            }
    """@channel()defdefault_handler(self,event,context):and deploy it.$bothubdeployYou also need to configure channel to use.$bothubchanneladdtelegram--api-key=<my-api-key>UsageUsage: bothub [OPTIONS] COMMAND [ARGS]...

Bothub is a command line tool that configure, init, and deploy bot codes
to BotHub.Studio service

Options:
  --help  Show this message and exit.

Commands:
  channel    Setup channels of current project
  clone      Clone existing project
  configure  Setup credentials
  deploy     Deploy project
  init       Initialize project
  logs       Show error logs
  ls         List projects
  nlu        Manage project NLU integrations
  property   Manage project properties
  rm         Delete a project
  test       Run test chat sessionSetupAuthorize a user and get access token.$bothubconfigureProject managementInitialize project on current directory. Create a echo chatbot code.$bothubinitDeploy current project.$bothubclone<project_name>Clone an existing project.$bothubdeployList of projects.$bothublsDelete a project.$bothubrm<project_name>Show error logs.$bothublogsRun current project on local machine for test.$bothubtestChannel managementList of channels for current project.$bothubchannellsAdd a channel for current project.$bothubchanneladdtelegram--api-key=<api_key>$bothubchanneladdfacebook--app-id=<app_id>--app-secret=<app_secret>--page-access-token=<page_access_token>Remove a channel from current project.$bothubchannelrm<channel>NLU integration managemtList of NLU(Natural Language Understanding) integration for current project.$bothubnlulsAdd a NLU integration for current project.$bothubnluaddapiai--api-key=<api_key>Remove a NLU integration from current project.$bothubnlurm<nlu>LicenseApache License 2.0