Skip to content

πŸ€– Discord Bot | πŸ“„ PDF Management Automates PDF file forwarding with rich embeds Features: β€’ Smart PDF detection β€’ Beautiful embed messages β€’ Secure configuration β€’ Error handling

Notifications You must be signed in to change notification settings

mahmutmft/pdf-file-forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“„ PDF File Forwarder Bot πŸ€–

A powerful and reliable Discord bot for automatically forwarding PDF files from one channel to another, with embedded messages and error handling.

✨ Features

  • πŸ“‚ Automatic PDF file detection and forwarding
  • 🎨 Beautiful embedded messages with file information
  • πŸ”’ Secure environment variable configuration
  • πŸ›‘οΈ Robust error handling
  • πŸ”„ Easy deployment process

πŸ› οΈ Requirements

  • Node.js: v16.9.0 or higher
  • Discord Bot Token: From Discord Developer Portal
  • Channel IDs: Source and target channel IDs from your Discord server

πŸš€ Quick Start

  1. Clone the repository

    git clone https://github.com/your-username/pdf-file-forwarder-bot.git
    cd pdf-file-forwarder-bot
  2. Install dependencies

    npm install
  3. Configure environment variables

    cp .env.example .env

    Edit the .env file with your configuration:

    DISCORD_BOT_TOKEN=your_bot_token_here
    SOURCE_CHANNEL_ID=your_source_channel_id
    TARGET_CHANNEL_ID=your_target_channel_id
    PREFIX=!
  4. Start the bot

    # Production
    npm start
    
    # Development with auto-reload
    npm run dev

πŸ”§ Configuration

Bot Token

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Navigate to the "Bot" section
  4. Click "Reset Token" to get your bot token
  5. Enable necessary Privileged Gateway Intents

Channel IDs

  1. Enable Developer Mode in Discord (User Settings > App Settings > Advanced)
  2. Right-click any channel and select "Copy ID"

Bot Intents

  1. Go to Discord Developer Portal
  2. Select your bot application
  3. Click on "Bot" in the left sidebar
  4. Scroll down to "Privileged Gateway Intents"
  5. Enable these required intents:
    • MESSAGE CONTENT INTENT
    • SERVER MEMBERS INTENT
    • PRESENCE INTENT

⚠️ Important: Your bot needs these intents to function properly. Without them, the bot will fail to connect.

πŸ›‘οΈ Security

  • Never commit your .env file
  • Keep your bot token private
  • Regularly rotate your bot token if compromised
  • Use environment variables for sensitive data

πŸ” Troubleshooting

Common Issues

  1. Bot doesn't start

    • Check if Node.js version is 16.9.0 or higher
    • Verify environment variables are set correctly
    • Ensure all dependencies are installed
  2. Bot doesn't forward files

    • Verify channel IDs are correct
    • Check bot permissions in both channels
    • Ensure bot has necessary intents enabled

πŸ“š Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

πŸ“ License

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

🀝 Support

If you need help or want to report issues:


GitHub License Made with love

Β© 2024 Mahmut. All rights reserved.

About

πŸ€– Discord Bot | πŸ“„ PDF Management Automates PDF file forwarding with rich embeds Features: β€’ Smart PDF detection β€’ Beautiful embed messages β€’ Secure configuration β€’ Error handling

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published