Minimal, modular Telegram bot that generates images and videos with Google Gemini. Powered by AuraLabs.
- 🖼️ Generate images from text prompts
- 🎥 Create videos from text or images
- 📐 Multiple aspect ratios (1:1, 9:16, 16:9, 4:3, 3:4)
- 🌍 Multi-language support (English/Amharic)
- 💰 Credit-based usage system (2 free images per user)
- 🎨 Preset prompt suggestions for quick generation
- 🔄 Image-to-image generation
- ⚙️ User settings (language, aspect ratio preferences)
- Start bot with
/start- select language if new user - Choose between Image or Video generation
- For images: Select text-only or upload reference image
- Enter prompt or use preset suggestions
- Bot generates content and deducts credits
- Repeat until credits exhausted, then top-up message appears
- Python 3.10+
- Create and activate a virtualenv
- Install requirements:
pip install -r requirements.txt
- Create
.env(see.env.example) and set:TELEGRAM_BOT_TOKENGEMINI_API_KEY
Example .env:
TELEGRAM_BOT_TOKEN=123456789:ABCDEF
GEMINI_API_KEY=your_gemini_api_keypython main.pyInstall Streamlit (already in requirements.txt), then run:
streamlit run admin/dashboard.pyThe dashboard lets you:
- View user list with credits and plan details.
- Reset image/video credits for selected users.
You can also use the CLI:
python -m admin.cli list --limit 20
python -m admin.cli reset-credits 12345 --image 5 --video 1
python -m admin.cli delete 12345- User credits and preferences are stored in SQLite (
bot_database.db) - Database is automatically created on first run
- User settings (language, aspect ratio) are stored in-memory and reset on restart
- Run tests:
python -m pytest tests/ - Add new translations in
tg_bot/translations.py - Add new keyboard buttons in
tg_bot/keyboards.py