Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

Environment Variables

Aahnik Daw edited this page Apr 3, 2021 · 3 revisions

Telewater needs some variables to run successfully. These can be passed as CLI options as described in CLI Usage, or by setting environment variables.

A detailed description is given below:

Variable name Description CLI option
API_ID Obtain it from my.telegram.org for your telegram account. --API_ID
API_HASH Obtain it from my.telegram.org for your telegram account. --API_HASH
BOT_TOKEN Create a bot account using @BotFather and get its token. --token or -t
BOT_USERNAME The user name of the bot account you are using. --name or -n
LOUD Boolean value (true/false), to control verbosity of logging. --loud or -l

How to set environment variables?

In UNIX you can use the export statement. Like,

export VAR_NAME=VALUE

Easier ways

Create a .env file

Telewater reads the .env file from the directory from which it is invoked.

Fill the .env file like this:

API_ID=13.....1
API_HASH=49111111ed8...........b09fb7dd1
BOT_TOKEN=1452222220:AAG_...................tbssssQ8
BOT_USERNAME=yourAwesomeName_bot

Pass via CLI options

As described in CLI Usage, you can pass the value of these variables via the CLI options.