MediaDownload

🤖 Media Download Bot

A powerful Discord bot for downloading and organizing media files from channels with smart categorization and Top.gg vote verification.

✨ Features

🚀 Quick Start

Prerequisites

Installation

  1. Clone the repository
    git clone https://github.com/yourusername/media-download-bot.git
    cd media-download-bot
    
  2. Install dependencies
    pip install -r requirements.txt
    
  3. Configure environment variables
    cp env.example .env
    # Edit .env with your tokens
    
  4. Run the bot
    python bot.py
    

⚙️ Configuration

Environment Variables

Variable Description Required
DISCORD_TOKEN Discord Bot Token ✅ Yes
TOP_GG_TOKEN Top.gg API Token ❌ No
LOGS_CHANNEL_ID Logs Channel ID ❌ No
WEBHOOK_URL Webhook URL ❌ No
GOFILE_TOKEN GoFile Token ❌ No

Intents & Permissions

Getting Your Tokens

Discord Bot Token

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Go to “Bot” section
  4. Copy the token

Top.gg API Token

  1. Go to Top.gg
  2. Click “Edit Bot”
  3. Go to “Webhooks” section
  4. Copy your Authorization token

🎮 Usage

Commands

Download Options

Vote System

Users must vote on Top.gg to access download features:

🏗️ Project Structure

media-download-bot/
├── bot.py                 # Main bot file
├── config.py              # Configuration settings
├── cogs/                  # Bot commands
│   ├── download.py        # Download functionality
│   ├── help.py           # Help command
│   └── stats.py          # Statistics
├── utils/                 # Utility modules
│   ├── interactive_menu.py # Interactive menus
│   ├── media_extractor.py  # Attachment+embed media extraction (no message content needed)
│   ├── topgg_checker.py   # Vote verification
│   ├── smart_classifier.py # File organization
│   └── catbox.py         # External hosting
├── requirements.txt       # Dependencies
├── env.example           # Environment template
└── README.md             # This file

🔧 Development

Setting up Development Environment

  1. Create virtual environment
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  2. Install development dependencies
    pip install -r requirements.txt
    
  3. Configure local environment
    cp env.example .env
    # Add your tokens to .env
    

Testing

# Check environment variables
python check_env.py

# Test Top.gg API connection
python test_topgg.py

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

If you encounter any issues:

  1. Check the documentation
  2. Verify your environment variables
  3. Check the bot logs
  4. Open an issue on GitHub

🙏 Acknowledgments


Made with ❤️ for the Discord community