Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AmiraliNotFound/dummy-gemini-bot/llms.txt

Use this file to discover all available pages before exploring further.

Dummy Gemini Bot reads its core secrets and paths from a .env file in the project root. Configuration is loaded at startup via python-dotenv, so any variable set in .env is available to the process before any other module initialises.

.env.example

Copy this file to .env and fill in your values before starting the bot:
# Telegram Bot Token (Get it from @BotFather on Telegram)
TELEGRAM_TOKEN=your_telegram_bot_token_here

# Gemini API Key (Get it from Google AI Studio)
GEMINI_API_KEY=your_gemini_api_key_here

# SQLite Database Filename (Optional: default is chat_history.db)
DB_FILE=chat_history.db

# Comma-separated list of Telegram usernames allowed to access /admin commands
ALLOWED_ADMINS=AmiraliNotFound,AnotherAdmin

Variable Reference

VariableRequiredDefaultDescription
TELEGRAM_TOKEN✅ YesBot API token from @BotFather
GEMINI_API_KEY✅ YesGoogle Gemini API key from Google AI Studio
DB_FILENochat_history.dbPath to the SQLite database file used to store chat history and config
WEBAPP_URLNo(empty)HTTPS URL of the admin dashboard. Required to show the /admin Mini App button
ENCRYPTION_KEYNo(auto-generated)AES-256 Fernet key for message encryption. Auto-generated and saved to encryption_key.key on first run
ALLOWED_ADMINSNoAmiraliNotFoundComma-separated Telegram usernames with admin access. Usernames are compared case-insensitively
The ENCRYPTION_KEY is auto-generated on first run and persisted to encryption_key.key alongside the database. Do NOT delete this file — losing it makes all stored message history unreadable. Back it up alongside your database whenever you take snapshots.
WEBAPP_URL must be an HTTPS URL. Telegram Mini Apps reject non-HTTPS origins. Use Cloudflare Tunnel or a reverse proxy such as Nginx to terminate TLS in front of the local admin server.

Applying Changes

The bot reads .env only at startup. After editing the file you must restart the process for changes to take effect. Bare Python:
# Stop the running process, then:
python main.py
Docker Compose:
docker-compose down && docker-compose up -d

Build docs developers (and LLMs) love