css-telegram-bot-api

0.3.2 • Public • Published

css-telegram-bot-api

npm GitHub repo size in bytes JavaScript Style Guide license

Now you can write Telegram bots in CSS.

Installation

Requirements

  • node v6.0.0+
$ [sudo] npm i -g css-telegram-bot-api

Usage

$ css-telegram-bot [options] <path/to/css/file>

or

$ css-telegram-bot-api [options] <path/to/css/file>

Example

[tg-root] {
  /* Replace the value below with the API token you receive from Bot Father */
  tg-token: 254259451:AA5cAlGQj51K9AD37v_522HC-5lFgB;
}

[tg-command="/start"] {
  tg-method: sendMessage text Start;
  /* example: */
  /* tg-method: methodName param1 value1 param2 value2; */
}

[tg-command="/help"] {
  tg-method: sendMessage text 'Help 1';
}

[tg-command="/echo (.+)"], .tg-regex {
  /* echobot */
  tg-method: sendMessage text $1;
}

[tg-command="/photo"] {
  tg-method: sendPhoto photo https://www.w3.org/html/logo/downloads/HTML5_Badge_64.png;
}

[tg-command="/hello"] {
  tg-method: sendMessage text "Hello, world!";
}

Related

CLI Options

  • -V, --version - output the version number

  • -h, --help - output usage information

/css-telegram-bot-api/

    Package Sidebar

    Install

    npm i css-telegram-bot-api

    Weekly Downloads

    3

    Version

    0.3.2

    License

    MIT

    Last publish

    Collaborators

    • comonoid