The Group Bio Updater Bot is a sophisticated automation solution designed for Bale messenger that automatically updates group descriptions with real-time Persian time and date information. This enterprise-grade bot features a payment system, customizable bio templates, and efficient resource management for optimal performance.
- Asynchronous Processing: Built on
asynciofor high-concurrency operations - Optimized Database: SQLite with WAL mode and intelligent caching
- Rate Limiting: Custom lightweight rate limiter for API compliance
- Memory Management: Automated garbage collection and cache optimization
- Multi-threading: Dedicated update thread for background operations
The bot utilizes SQLite with the following optimizations:
- Write-Ahead Logging (WAL) mode for better concurrency
- Strategic indexing on frequently accessed columns
- Connection pooling and thread-safe operations
- Intelligent caching layer with TTL management
- Real-time Persian time display (12-hour and 24-hour formats)
- Accurate Persian calendar (Jalali) date updates
- Configurable update intervals (every minute)
- Support for custom bio templates
- One-time activation fee (15,000 Tomans)
- Integration with Bale payment providers
- Support for multiple payment methods
- Automated payment verification and activation
- Dynamic variable replacement (
{TIME},{DATE}) - Case-insensitive variable detection
- Custom text with bio variables (max 200 characters)
- Real-time preview functionality
- Admin-only command access
- Group status monitoring
- Activation/deactivation controls
- Usage statistics and analytics
- Concurrent update processing (10 simultaneous operations)
- Batch processing for efficient resource utilization
- Intelligent rate limiting (15 requests/minute)
- Memory usage optimization and cleanup
- Python 3.8+
- Bale Bot API library
- SQLite3
- Pytz for timezone management
- jdatetime for Persian calendar
- Minimum 150MB RAM allocation
- Stable internet connection
- Storage for database and logs
git clone https://github.com/Digix-Team/TimeBaleBot
cd TimeBaleBot
pip install -r requirements.txt- Obtain Bale Bot Token from @BotFather
- Configure payment provider token
- Set activation price and group limits
- Adjust performance parameters as needed
The bot automatically creates and optimizes the database on first run:
- Group information storage
- Payment records
- Custom bio templates
- Usage statistics
/enable- Activate bot (requires payment)/disable- Deactivate bot/setbio [text]- Set custom bio template/removebio- Remove custom bio/status- Check bot status/help- Display help information/about- Show bot information
/start- Initial setup guide/help- Detailed documentation/about- Technical specifications- Donation support via invoice system
{TIME}- Current Persian time (dual format){DATE}- Current Persian date- Variables are case-insensitive
- Maximum 200 characters per template
- Send
/enablecommand in group - Receive payment invoice
- Complete payment via supported methods
- Bot automatically activates upon verification
- Make bot administrator for full functionality
- Supports up to 300 concurrent active groups
- Efficient batch processing (20 groups/batch)
- Optimized database queries with caching
- Automatic load distribution
- Error handling and recovery mechanisms
- Connection timeout management
- Payment verification safeguards
- Regular backup and cleanup operations
- Comprehensive logging system
- Performance metrics tracking
- Resource usage optimization
- Automatic error reporting
- Admin-only command execution
- Secure payment processing
- SQL injection prevention
- Input validation and sanitization
- Secure token management
- Maximum 300 active groups simultaneously
- 200-character limit for custom bios
- 15 API requests per minute rate limit
- Bale-specific implementation
- Requires admin privileges in groups
- Dependent on Bale API availability
- Persian time/date focus
- One-time payment model
- Graceful degradation during API issues
- Automatic retry mechanisms
- Detailed error logging
- User-friendly error messages
- Regular performance optimizations
- Security patch implementation
- Feature enhancements
- Database maintenance routines
- Modular design with separation of concerns
- Asynchronous programming patterns
- Efficient resource management
- Scalable database design
- Adjustable performance parameters
- Configurable payment amounts
- Customizable group limits
- Template variable expansion
This bot is developed for commercial use with the following considerations:
- Payment system integration
- Group management capabilities
- Automated content updates
- Professional support structure
For technical support, feature requests, or bug reports:
- Utilize in-bot
/helpcommand - Monitor performance metrics
- Review system logs
- Contact development team through official channels