Environment variables

Note

Remember to name the file .env!

API_HASH=0123456789abcdef0123456789abcdef
# The api_hash part of your Telegram API Key, as string.
# From https://docs.pyrogram.org/api/client#pyrogram.Client.
# Get your own at https://my.telegram.org.

API_ID=12345
# The api_id part of your Telegram API Key, as integer.
# From https://docs.pyrogram.org/api/client#pyrogram.Client.
# Get your own at https://my.telegram.org.

BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
# The unique authentication token of the bot, as string.
# Get your own via BotFather on Telegram (https://t.me/BotFather).

MEDIA_CHAT_ID=-1001234567890
# The unique ID for the chat which is used to send
# media and get their own file identification numbers.
# It is recommended to create a supergroup and make use
# of it as a media storage.

REDIS_DB=0
# The number of the database which is used, as integer.

REDIS_HOST=localhost
# The host which is being used for Redis, as string.

REDIS_PORT=6379
# The port which is being used for Redis, as integer.

SESSION_NAME=example
# This name will be used to save a file on disk that
# stores details needed to reconnect without asking
# again for credentials, as string.
# From https://docs.pyrogram.org/api/client#pyrogram.Client.

USE_REDIS=false
# If Redis shall be used, as boolean.
# If it is set to false (which is so by default),
# a DictDatabase is going to be created instead.
# You should always use a Redis database instead
# of a dictionary, unless you're debugging the program.