A comprehensive Telegram bot for uploading files to GoFile.io with advanced features including download from URLs, progress tracking, quality selection, force subscription, admin commands, and MongoDB database integration.
- File Upload: Upload any file sent to the bot to GoFile.io
- URL Download: Download from URLs (including YouTube) and upload to GoFile.io
- Progress Tracking: Real-time upload/download progress bars
- Quality Selection: Choose video/audio quality when multiple options available
- Force Subscription: Require users to join a channel before using the bot
- Admin Commands: Broadcast, stats, user management, ban/unban
- User Management: MongoDB database for user data and settings
- Async Processing: Handle multiple tasks concurrently
- GoFile.io Account Integration: Support for user GoFile.io accounts
- Install required packages:
pip install -r requirements.txt- Set up MongoDB database
- Configure environment variables in
config.py - Run the bot:
python bot.pybot.py- Main bot initialization and startupconfig.py- Configuration and environment variablesdatabase.py- MongoDB operations and modelshandlers.py- All bot command and message handlersutils.py- Utility functions for file operations and API callsrequirements.txt- Required Python packages
/start- Start the bot and register/help- Show available commands/upload- Upload file to GoFile.io (reply to file)/download <url>- Download from URL and upload to GoFile.io/settings- User preferences and account management/myfiles- List user's uploaded files/account- GoFile.io account integration/stats- Personal usage statistics
/admin- Access admin panel/broadcast <message>- Broadcast message to all users/stats_admin- Bot statistics and analytics/users- List all users/ban <user_id>- Ban a user/unban <user_id>- Unban a user/force_sub- Configure force subscription settings
Set these in your config.py file:
BOT_TOKEN- Your Telegram bot tokenMONGO_URI- MongoDB connection stringADMIN_IDS- List of admin user IDsFORCE_SUB_CHANNEL- Channel username for force subscriptionGOFILE_API_TOKEN- GoFile.io API token (optional)
This project is licensed under the MIT License.