A simple Python script used to scrape Discord guild info and roles.
- Git - Install Git
- Check if you have Git installed with
git --version
- Check if you have Git installed with
- Python (>=3) - Install Python (Windows), Install Python (Linux)
- Check if you have Python installed with
python3 --version
- Check if you have Python installed with
- Pip - Install Pip
- Check if you have Pip installed with
pip --version
- Check if you have Pip installed with
git clone https://github.com/vile/discord-role-scraper.git
cd discord-role-scraper
make venv
make deps
make start
After starting the script, follow the prompts given to input your token and server ID.
git clone https://github.com/vile/discord-role-scraper.git
cd discord-role-scraper
- At the top right of the repo on GitHub, click the green
Code
button, then underHTTPS
clickDownload ZIP
. - Extract the downloaded archive to a folder like your Desktop using any ZIP tool (such as WinRAR, 7Zip, or NanaZip)
- Navigate to the extracted folder (usually called
discord-role-scraper-2
)
In your terminal (CMD, Powershell, etc.), type the following command(s):
python -m venv .venv
.\.venv\Scripts\activate
In your terminal (CMD, Powershell, etc.), type the following command(s):
pip install -r requirements.txt
In your terminal (CMD, Powershell, etc.), type the following command(s):
python main.py
After starting the script, follow the prompts given to input your token and server ID.
The config.py
file contains all of the editable settings for this script.
Name | type | Default Value | Description |
---|---|---|---|
EXPORT_RESULTS | bool |
True |
Whether or not to export txt files of scrapes |
Name | type | Default Value | Description |
---|---|---|---|
SCRAPE_GUILD_INFO | bool |
True |
Whether or not to scrape the guild's info |
GUILD_INFO_TO_SCRAPE
is a dict
of bool
s.
Name | Default Value |
---|---|
id | True |
name | True |
icon | False |
description | True |
home_header | False |
splash | False |
discovery_splash | False |
features | False |
banner | False |
owner_id | True |
application_id | False |
region | True |
afk_channel_id | False |
afk_timeout | False |
system_channel_id | False |
system_channel_flags | False |
widget_enabled | False |
widget_channel_id | False |
verification_level | True |
Name | type | Default Value | Description |
---|---|---|---|
SCRAPE_PERMISSION_INFO | bool |
True |
Whether or not to scrape the guild's roles and associated permissions and/or properties |
PERMISSIONS_TO_SCRAPE
is a dict
of bool
s and bitwise (hex) flags.
All values starting with 0x
can not be changed, if you wish to not see (disable) a specific permission in your scrapes, comment the line (using a #
). Changing any of the 0x
values will break calculations associated with checking permissions.
Name | Type | Default Value |
---|---|---|
name | bool |
True |
position | bool |
True |
id | bool |
True |
mentionable | bool |
True |
administrator | bitwise | |
mention all | bitwise | |
manage guild | bitwise | |
manage roles | bitwise | |
manage channels | bitwise | |
manage events | bitwise | |
manage nicknames | bitwise | |
kick members | bitwise | |
ban members | bitwise | |
webhooks | bitwise | |
app commands | bitwise | |
tags | bool |
True |
Yes, your token is safe, it is only temporarily cached in memory for convience if you want to scrape multiple servers in the same session. After closing the script, your token is removed from memory. Your token is never saved on your computer, and is only ever sent to the official Discord API.
You're interacting with normally available API endpoints for user accounts in a normal way. However, Discord doesn't like when you script or automate any type of action, therefore there is always a risk of account termination. I am not responsible if you spam the API scraping servers and get your account terminated.
No, I will not help you with this script (follow the Linux and Windows sections above). No, I will not make you any scripts.