Skip to content

atifahmed9461/Discord-Mass-Unban

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Discord Mass Unban

Discord Mass Unban

A Python script to unban all banned users from a Discord server.

⚠️ Warning

This script will unban ALL banned users from your Discord server. Use with extreme caution and only if you're absolutely sure you want to unban everyone.

Prerequisites

  • Python 3.6 or higher
  • A Discord bot token with "Ban Members" permission
  • The server ID where you want to unban users

Setup

  1. Clone or download this repository

  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up environment variables: Create a .env file in the root directory with the following:

    DISCORD_BOT_TOKEN=your_discord_bot_token
    DISCORD_SERVER_ID=your_server_id_here

Getting Your Bot Token

  1. Go to the Discord Developer Portal
  2. Create a new application or select an existing one
  3. Go to the "Bot" section
  4. Copy the token under "Token"
  5. Make sure your bot has the "Ban Members" permission in your server

Getting Your Server ID

  1. Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
  2. Right-click on your server name
  3. Select "Copy Server ID"

Usage

Run the script:

python main.py

The script will:

  1. Validate your environment variables
  2. Show a warning and ask for confirmation
  3. Fetch all banned users
  4. Unban each user with progress tracking
  5. Display a summary of results

Features

  • Secure: Uses environment variables instead of hardcoded credentials
  • Safe: Requires explicit confirmation before proceeding
  • Robust: Handles rate limits and network errors gracefully
  • Informative: Shows progress and detailed results
  • Modern: Clean code with proper error handling

Security Notes

  • Never commit your bot token to version control
  • Keep your bot token secure and regenerate it if compromised
  • Only run this script when you're certain you want to unban all users

Troubleshooting

"Unauthorized" error: Check that your bot token is correct and valid

"Missing Permissions" error: Ensure your bot has the "Ban Members" permission

"Bad Request" error: Verify your server ID is correct

Rate limiting: The script automatically handles Discord's rate limits

Support Server

Join our Discord for help and community support: https://discord.gg/tsbBKz2k53

Creator

Created by Atif Ahmed 🖤

License

This project is open source. Use responsibly and at your own risk.

About

A Python script to unban all banned users from a Discord server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages