Docs: multiple chat ids config file option

This commit is contained in:
Sergei Sokolov 2020-09-23 22:31:25 +03:00
parent e6a8f2cf2d
commit 15ad5ee77e
1 changed files with 10 additions and 1 deletions

View File

@ -59,7 +59,7 @@ easily use this tool without this.
## Installation / configuration
* Grab the latest `telegram` file from this repository and put it somewhere.
* Grab the latest `telegram.sh` file from this repository and put it somewhere.
* Create a bot at telegram:
* Search for the user `@botfather` at telegram and start a chat with him.
* Use the `/newbot` command to create a new bot. BotFather will give you a
@ -92,6 +92,15 @@ TELEGRAM_TOKEN="123456:AbcDefGhi-JlkMno"
TELEGRAM_CHAT="12345678"
```
Multiple chat ids can be defined in a config file as a bash array:
```bash
TELEGRAM_TOKEN="123456:AbcDefGhi-JlkMno"
CHATS=(12345678, 23456789, 34567)
```
With such config command `telegram.sh "Hello world"` will deliver message to all listed chat ids.
Please be aware that you should keep your token a secret.
You can also add permanent proxy settings in there by adding: