Dummy Gemini Bot reads its core secrets and paths from aDocumentation 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.
.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:
Variable Reference
| Variable | Required | Default | Description |
|---|---|---|---|
TELEGRAM_TOKEN | ✅ Yes | — | Bot API token from @BotFather |
GEMINI_API_KEY | ✅ Yes | — | Google Gemini API key from Google AI Studio |
DB_FILE | No | chat_history.db | Path to the SQLite database file used to store chat history and config |
WEBAPP_URL | No | (empty) | HTTPS URL of the admin dashboard. Required to show the /admin Mini App button |
ENCRYPTION_KEY | No | (auto-generated) | AES-256 Fernet key for message encryption. Auto-generated and saved to encryption_key.key on first run |
ALLOWED_ADMINS | No | AmiraliNotFound | Comma-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: