Text-to-Picture Telegram Bot (TTPTB)
A powerful Telegram bot built on Cloudflare Workers that generates images from text descriptions using multiple AI models. The bot supports various state-of-the-art image generation models and provides a user-friendly interface for creating stunning visuals from text prompts. Blog Post | Live Bot
✨ Features
- 🎨 Multiple AI models support (SDXL, Lightning, Dreamshaper, etc.)
- 🚀 Fast image generation with Cloudflare Workers
- 🌍 Multi-language support (English and Turkish)
- 💾 User preferences persistence
- ⚡ High-performance image processing
- 🆓 Runs within Cloudflare’s free tier limits
🛠️ Technology Stack
- TypeScript
- Cloudflare Workers
- Cloudflare AI (Multiple AI Models)
- Telegram Bot API
- Workers KV for user preferences
📸 Screenshots
📝 Usage
Bot Commands
Command | Description |
---|---|
/start |
Start the bot and show help |
/help |
Show help message |
/draw |
Generate an image from text |
/setmodel |
Change the AI model |
/currentmodel |
Show current active model |
/about |
Show information about the bot |
Available AI Models
sdxl
- Stable Diffusion XL (Default)lightning
- SDXL Lightning (Faster)dreamshaper
- Dreamshaper 8 LCM (Creative)flux
- FLUX.1 Schnell (Modern)inpainting
- SD v1.5 Inpaintingimg2img
- SD v1.5 Image to Image
Example Commands
- Generate an image:
1
/draw a futuristic cityscape with flying cars and neon lights
- Change AI model:
1
/setmodel lightning
- Check current model:
1
/currentmodel
🔒 Security
- Webhook URL is protected
- User preferences are securely stored in Workers KV
- All API operations are properly authenticated
- Error logging system for monitoring
🐛 Troubleshooting
Common issues and solutions:
- Image Generation Fails
- Check if the prompt is in English
- Verify AI model availability
- Check for any error messages
- Bot Not Responding
- Verify bot token is correct
- Check webhook configuration
- Ensure worker is deployed properly
⚠️ Disclaimer
This bot is not affiliated with Telegram or any of the AI model providers. Use at your own risk and responsibility.
I am not responsible for any issues, damages, or consequences that may arise from using this bot. By using this bot, you agree to do so at your own discretion.
📧 Contact
Made with ❤️ by @fr0stb1rd
⚖️ License
This project is proprietary and confidential. Unauthorized copying, distribution, or modification of any part of this codebase is strictly prohibited. Access to the source code is restricted to authorized personnel only.