Obafunso Ridwan

Usage

Telegraf CLI can be used using telegraf-cli longhand or tcli shorthand.

  $ telegraf-cli [command]
  $ tcli [command]

Available Commands 💪

  -y, --yes                   Create new telegraf template (default)
  -n, --new [name]            Create new telegraf template
  -c, --create:command [name] Create new telegraf bot command
  -v, --version               Output the version number
  -h, --help                  Output usage information
  -u, --update                Update telegraf-cli version

Usage 1

  # bootstrap project using the default template/boilerplate
  $ tcli --yes

  Generating Bot-f13038...
#1 Generate telegraf bot project
#2 Initialize a git repository
#3 Install dependencies

  STEP 1:  Run the following command(s)
  1.  cd Bot-f13038

  STEP 2:  Configure Bot-f13038 project
  1.  For development - create dev.env file and paste the content inside example.dev.env into it.
  2.  For production -  create prod.env file and paste the content inside example.prod.env into it.
  Open dev.env and prod.env and update your environments variables.

  STEP 3:  Start Telegraf bot
  1.  For development - npm run dev:bot
  2.  For production -  npm run prod:bot

  DONE

Usage 2

  # bootstrap project using one's preferred choice
  $ telegraf-cli --new PizzaBot

  Generating PizzaBot...
  ? Please choose which telegraf template to use? Simple
  ? Please choose which Node.js server to use? None
  ? Please choose which language to use? JavaScript
  ? Initialize a git repository? No
  ? Install dependencies? No
#1 Generate telegraf bot project

  STEP 1:  Run the following command(s)
  1.  cd PizzaBot
  2.  git init
  3.  npm i

  STEP 2:  Configure PizzaBot project
  1.  For development - create dev.env file and paste the content inside example.dev.env into it.
  2.  For production -  create prod.env file and paste the content inside example.prod.env into it.
  Open dev.env and prod.env and update your environments variables.

  STEP 3:  Start Telegraf bot
  1.  For development - npm run dev:bot
  2.  For production -  npm run prod:bot

  DONE

Usage 3

  # create bot command
  $ tcli --create:command orderPizza

  Creating orderPizza command...

  [INFO] Command orderPizza successfully generated.

  DONE

⏮️ Getting Started | Bot Command ⏭️