Member Data Collection Tool for Discord Servers
Extract user IDs from message history, threads, and welcome logs
WARNING: This uses a Self-Bot, which is against Discord's rules.
Discord doesn't allow automated scripts to run on user accounts.
Your account could be permanently banned if detected.
Only use this for educational purposes or on servers you own.
This script helps you collect user IDs from a Discord server. It goes through all the text channels, looks at old messages, checks threads (even archived ones), and can read welcome messages from bots like Dyno or MEE6.
- User IDs from all text channels
- Users from active and old threads
- Users mentioned in welcome/entry logs
- Checks if users are still in the server (optional)
- Saves Progress: If the script stops, it can continue where it left off
- Chooses Best Channels First: Finds the most active channels automatically
- Handles Rate Limits: Won't get you banned from Discord's API
- Removes Duplicates: Same user won't be added twice
- Saves everything to a clean JSON file
- Shows progress while working
- Organizes data neatly
- Python 3.8 or newer
- Your Discord account token
- The ID of the server you want to scan
# Download the code
git clone https://github.com/pixelatedxp/discord-member-scraper.git
# Go to the folder
cd discord-member-scraper
# Install required packages
pip install -r requirements.txt
# Run the script
python main.pyWhen you run the script, it will ask you a few questions:
You can find it in your browser's developer tools.
The unique number for the Discord server you want to scan.
If your server has a welcome channel where new members are announced, put its ID here.
How far back to look in each channel. More messages = more users, but takes longer.
If you want to verify users are still in the server, say Yes here.
The script creates a file named SERVER_ID.json that looks like this:
{
"server_info": {
"id": "123456789012345678",
"scanned_on": "2023-12-01",
"total_users_found": 1250
},
"where_to_continue": {
"current_channel": "112233445566778899",
"last_message": "998877665544332211"
},
"all_user_ids": [
"123456789012345678",
"234567890123456789",
"345678901234567890"
]
}The script connects to Discord using your token.
It looks at the server and finds all the text channels.
It figures out which channels have the most messages and starts with those.
Goes through old messages in each channel and saves user IDs.
Looks at regular threads and archived threads (the ones you don't normally see).
If you gave a welcome channel ID, it reads bot messages there too.
Saves progress, moves to next channel, continues until done.
| Problem | What To Do |
|---|---|
| Can't log in | Check your token is correct and hasn't expired |
| No permission | Make sure your account can see the channels |
| Too many requests | The script will wait and try again automatically |
| Script stopped | Just run it again - it will continue where it left |
If the script stops (internet issues, computer sleep, etc.), just run it again. It reads the JSON file and continues from the last message it checked.
Discord has rules about how fast you can make requests:
- Don't scan too fast: The script has built-in delays
- Be patient: Large servers take time (hours, not minutes)
- Watch for errors: If you see "rate limited" messages, let it wait
- Set message depth to 5,000-10,000
- Should finish in 30-60 minutes
- Set message depth to 15,000-25,000
- Might take 2-4 hours
- Set message depth to 30,000-40,000
- Could take 6+ hours
- Consider running overnight
discord.pyPython library- Read access to server channels
- Stable internet connection
SERVER_ID.json- Your collected data- Temporary progress files (deleted when done)
- Uses about 50-100MB of RAM
- More for very large servers
- Use a separate account if possible, not your main account
- Don't run multiple scrapers at the same time
- Be respectful - try not to scrape servers you don't own
- Try To Keep the data private - user IDs are sensitive information
Q: Is this legal?
A: The code is legal, but using it violates Discord's Terms of Service.
Q: Will I definitely get banned?
A: Not definitely, but it's a risk. Use at your own risk.
Q: Does it download messages?
A: No, only user IDs. No message content is saved.
Q: Can I scan multiple servers?
A: Yes, run it once for each server.
If you have problems:
- Check the error message
- Make sure your token is still valid
- Verify you have access to the server
- Check Python and discord.py are installed correctly
For bugs or issues, you may DM me. My Discord
Things I might add later:
- Better progress display with estimates
- Option to export to CSV format
- Filtering options (by date, activity, etc.)
Made by pixelatedxpert
GitHub: https://github.com/pixelatedxpert
My Discord
This tool was created for server admins who need to backup their member lists.
MIT License - you can use, modify, and share this code, but I'm not responsible if your Discord account gets banned.
Remember: Use responsibly and respect others' privacy.
Last updated: February 2026