- Overview
- Key Improvements
- Features
- Installation
- Configuration
- Database Structure
- Admin Commands
- User Commands
- API Integration
- Reminder System
- Technical Details
- License
- Contributing
ChoLu is a versatile Telegram bot (version 3.2) designed with user experience in mind, featuring an intuitive interface built with aiogram for better inline keyboard support. The bot offers multiple functionalities including cryptocurrency price tracking, message forwarding, user management, and food reservation reminders. The bot now uses aiogram framework which provides better inline keyboard support and more responsive UI compared to the previous implementation.
- User-Friendly Interface: Migrated from legacy library to aiogram framework for better inline keyboard support and user-friendly interface
- Enhanced Performance: Multi-stage Docker build for optimized container size
- Improved Reliability: Better error handling and logging mechanisms
- User Experience: Redesigned menu system with intuitive navigation
- Multifunctional: Has two versions: button and command only
- User Management: Add/remove users, ban/unban functionality
- Admin Tools: Special commands for bot administrators
- Cryptocurrency Tracking: Real-time price data from CoinMarketCap API
- Message System: Anonymous messaging and broadcast capabilities
- Reminder System: Automated food reservation reminders
- Database Export: CSV export functionality for admins
- Activity Logging: Comprehensive logging of all user interactions
- Python 3.8+
- Docker (optional)
- Telegram bot token from BotFather
# Build and run standard version
docker build -t cholu-bot .
docker run -d --name cholu-bot --restart unless-stopped \
-v ./data:/app/data \
cholu-bot
# For CM version (using same image)
docker run -d --name cholu-bot-cm --restart unless-stopped \
-v ./data:/app/data \
-e BOT_MODE=CM \
cholu-bot
-
Create and activate virtual environment:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Configure the bot by creating
config.json
in root directory -
Run the bot:
python src/core/main.py # Standard version python src/core/main-cmversion.py # CM version
Create a config.json
file in the root directory with the following structure:
{
"BOT_TOKEN": "YOUR_TELEGRAM_BOT_TOKEN",
"OWNER_ID": "YOUR_TELEGRAM_USER_ID",
"LOG_USER_ID": "TELEGRAM_USER_ID_FOR_LOGS",
"TIMEZONE": "Asia/Tehran"
}
BOT_TOKEN
: Obtained from BotFatherOWNER_ID
: Your Telegram user ID (bot owner)LOG_USER_ID
: User ID where logs will be sentTIMEZONE
: Timezone for reminder system
The bot uses a CSV-based database (db.csv
) with the following columns:
Column | Type | Description |
---|---|---|
UserID | int | Telegram user ID |
Ban | int (0/1) | Whether user is banned |
Adminstration | int (0/1) | Admin status |
API | str | CoinMarketCap API key |
Reminder | int (0/1) | Food reminder subscription |
Name | str | User display name |
/admin_add [user_id]
- Add user as admin (owner only)/admin_remove [user_id]
- Remove admin (owner only)/user_ban [user_id]
- Ban a user/user_unban [user_id]
- Unban a user/user_manual_add [user_id]
- Manually add user to database
/send_message [user_id]
- Send message to specific user/send_message all
- Broadcast message to all users
/add_to_reminder [user_id]
- Add user to food reminder/remove_from_reminder [user_id]
- Remove user from food reminder
/database
- Export database as CSV
🆘 Help
- Show help information🔙 Back to Main Menu
- Return to main menu
💰 Coin
- Show cryptocurrency menu/set_api_key [api_key]
- Set CoinMarketCap API key/how_to_set_api_key
- Instructions for getting API key
📩 Message
- Send anonymous message to developer
⏰ Reminder
- Manage food reminders➕ Add to Food Reminder
- Subscribe to reminders➖ Stop Food Reminder
- Unsubscribe from reminders
The bot integrates with the CoinMarketCap API to provide cryptocurrency prices. Users need to:
- Get a free API key from CoinMarketCap
- Set it using
/set_api_key YOUR_API_KEY
Supported cryptocurrencies:
- BTC (₿), ETH (Ξ), USDT (💵), XRP (✕)
- BNB (ⓑ), SOL (◎), USDC (💲), DOGE (🐶)
- ADA (🅰), TRX (🅿), LINK (🔗), TON (⚡)
The bot automatically sends food reservation reminders:
- Every Wednesday between 22:00-23:00 (configurable timezone)
- Users can subscribe/unsubscribe via menu
- Admins can manage subscriptions for all users
- Framework: aiogram (replacing legacy library for better UI/UX)
- Database: CSV-based with automatic persistence
- API Integration: CoinMarketCap Pro API
- Timezone Support: Configurable (default: Asia/Tehran)
- Error Handling: Comprehensive logging and error recovery
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For major changes, please open an issue first to discuss the proposed changes.
Note: This bot requires Python 3.8+ and the dependencies listed in requirements.txt
. Ensure you have proper permissions before running admin commands.