css-telegram-bot-api
v0.3.2
Published
Now you can write Telegram bots in CSS.
Downloads
20
Maintainers
Readme
css-telegram-bot-api
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