This is a Telegram bot that uses Replicate's AI models to generate images from text prompts. It features user authentication, image history, and sharing capabilities.
- 🔐 User authentication with password
- 🖼️ AI-powered image generation from text prompts
- 🔄 Regenerate images with same prompt
- 📤 Share generated images via inline query
- 📅 Image history with timestamps
- ⏳ Rate limiting to prevent abuse
- Node.js (v18 or higher)
- Telegram account
- Replicate account
- Open Telegram and search for @BotFather
- Start a chat and use
/newbot
command - Follow the instructions to create your bot
- Save the API token you receive
- Go to Replicate
- Create an account if you don't have one
- Get your API token from account settings
- Create a
.env
file in the project root with these variables:
BOT_TOKEN=your_telegram_bot_token
REPLICATE_API_TOKEN=your_replicate_api_token
BOT_PASSWORD=your_secure_password
npm install
node bot.js
-
Add automatic prompt improvement using LLM
- Integrate with OpenAI or similar service
- Create theme-based templates
- Add style modifiers based on user preferences
-
Implement prompt templates
- Predefined styles (anime, realistic, cyberpunk, etc.)
- Aspect ratio options
- Style transfer capabilities
-
Add image editing capabilities
- Inpainting/outpainting
- Style transfer
- Resolution enhancement
- Add command for viewing image history
- Implement batch image generation
- Add progress indicators for generation
- Create user profiles with preferences
- Add database support for persistent storage
- Implement proper error handling and retries
- Add rate limiting per user
- Create admin interface for management
- Implement proper user authentication
- Add logging and monitoring
- Create backup system for images
- Add abuse detection and prevention
Pull requests are welcome! Please follow these guidelines:
- Create a new branch for your feature
- Write clear commit messages
- Update documentation as needed
- Test your changes thoroughly